CN116339646B - Flight test data storage method, device, equipment and storage medium - Google Patents

Flight test data storage method, device, equipment and storage medium Download PDF

Info

Publication number
CN116339646B
CN116339646B CN202310623865.2A CN202310623865A CN116339646B CN 116339646 B CN116339646 B CN 116339646B CN 202310623865 A CN202310623865 A CN 202310623865A CN 116339646 B CN116339646 B CN 116339646B
Authority
CN
China
Prior art keywords
data
packet
storage disk
address
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310623865.2A
Other languages
Chinese (zh)
Other versions
CN116339646A (en
Inventor
杨花卫
刘诚睿
任晓斌
惠增强
杨博
宋俊飞
付福祥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xi'an Zhongfei Aviation Test Technology Development Co ltd
Original Assignee
Xi'an Zhongfei Aviation Test Technology Development Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xi'an Zhongfei Aviation Test Technology Development Co ltd filed Critical Xi'an Zhongfei Aviation Test Technology Development Co ltd
Priority to CN202310623865.2A priority Critical patent/CN116339646B/en
Publication of CN116339646A publication Critical patent/CN116339646A/en
Application granted granted Critical
Publication of CN116339646B publication Critical patent/CN116339646B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0643Management of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

The disclosure provides a flight test data storage method, a device, equipment and a storage medium, and relates to the technical field of aviation testing. The present disclosure may receive flight test data to be stored through a high-speed shared buffer; dividing a first data packet into n data blocks and/or residual data according to a preset data block size which optimizes the performance of the storage disk, wherein the first data packet is obtained according to a first data frame in flight test data; writing n data blocks into the storage disk according to the effective data address of the storage disk; dividing a second data packet into m data blocks and/or residual data according to the preset data block size, wherein the second data packet is obtained according to a second data frame in flight test data and the residual data in a temporary buffer area; and writing the m data blocks into the storage disk according to the data addresses of the data blocks of the last written first data packet. The method and the device utilize the storage performance of the storage disk to the maximum extent, and improve the storage efficiency of the flight test data.

Description

Flight test data storage method, device, equipment and storage medium
Technical Field
The disclosure relates to the technical field of aviation test, in particular to the technical fields of data storage, data unloading and the like, and can be applied to scenes such as flight test data storage, flight test data unloading and the like, in particular to a flight test data storage method, a device, equipment and a storage medium.
Background
In aircraft flight testing, it is necessary to use on-board test equipment to collect parameters in the aircraft flight test. With the development of flight test technology, the flight test parameters which can be collected by the airborne test equipment are more and more, and the data volume which is collected by the airborne test equipment is also more and more.
At present, the data storage system can compress and store collected data by adopting a lossless compression algorithm, so that the data storage system can store more data, but the processing resources of the data storage system are occupied when the lossless compression algorithm is adopted, and the data storage rate cannot be improved.
Disclosure of Invention
The disclosure provides a flight test data storage method, a flight test data storage device, flight test data storage equipment and a flight test data storage medium, which can improve the data storage rate.
According to a first aspect of the present disclosure, there is provided a flight test data storage method comprising: receiving flight test data to be stored through a high-speed shared buffer zone, wherein the high-speed shared buffer zone comprises a first data frame and a second data frame of the flight test data to be stored; acquiring an effective data address, wherein the effective data address is a data address of writable data in a storage disk; retrieving a first data frame from the cache shared buffer; obtaining a first data packet according to the first data frame; dividing the first data packet into n data blocks and/or residual data according to the preset data block size, wherein n is a positive integer, the residual data is data with the residual size smaller than the preset data block size after the data packet is divided into the data blocks, and the preset data block size is the data block size which enables the performance of the storage disk to be optimal; according to the effective data address, writing n data blocks into a storage disk in turn; retrieving a second data frame from the cache shared buffer; obtaining a second data packet according to the second data frame and the data in the temporary buffer area, wherein the temporary buffer area is used for storing the residual data; dividing the second data packet into m data blocks and/or residual data according to the preset data block size, wherein m is a positive integer; and sequentially writing the m data blocks into the storage disk according to the data address corresponding to the data block of the first data packet which is finally written into the storage disk.
Optionally, the storage disc includes a directory area and a data area, and after acquiring the valid data address, the method further includes: according to the directory area, an effective directory address is obtained, wherein the effective directory address is a directory address in the directory area, in which file information can be written, the directory area is used for storing file information of each data file stored in the data area, and the data files comprise flight test data to be stored; writing file information according to the effective directory address, wherein the file information comprises a file name, a file starting address, a file size and generation time, the file starting address is an effective data address, and the file size is a preset size.
Optionally, acquiring the valid data address includes: and acquiring an effective data address according to the file information in the directory area, wherein the effective data address is a data address in which data can be written in the data area.
Optionally, writing the n data blocks to the storage disk sequentially according to the valid data address includes: writing a start data packet into the storage disk based on the effective data address, wherein the start data packet is used for marking the start data address of the flight test data to be stored in the storage disk; and writing the n data blocks into the storage disk in turn based on the data address of the initial data packet in the storage disk.
Optionally, writing n data blocks to the storage disk sequentially based on the data address of the start data packet in the storage disk includes: writing a first time packet into the storage disk based on a data address of the initial data packet in the storage disk, wherein the first time packet is a data packet containing the current time; and writing the n data blocks into the storage disk in turn based on the data address in the storage disk of the first time packet.
Optionally, after writing the first time packet to the storage disk, the method further comprises: and writing a second time packet into the storage disk at intervals of a preset time length, wherein the second time packet is used for identifying the time when the second time packet is written into the storage disk.
Optionally, the method further comprises: and updating the file size of the target data file according to the target data file obtained after the flight test data to be stored is written into the data area.
Optionally, the method further comprises: acquiring user unloading configuration information from an upper computer; determining data addresses of data to be offloaded in a storage disk according to user offloading configuration information; according to the data address of the data to be unloaded in the storage disk, the data to be unloaded is sequentially unloaded to an unloading buffer area according to the data blocks when the data to be unloaded is written into the storage disk; and sending the data to be unloaded in the unloading buffer area to the upper computer.
Optionally, the data file corresponding to the data to be offloaded includes a third time packet and a fourth time packet; the third time packet is used for indicating the time when the data block of the data to be unloaded starts to be written into the storage disk; the fourth time packet is after the third time packet and is used for indicating the time when the next data block after the fourth time packet starts to be written into the storage disk; the intervals between the third time packet and the fourth time packet and between any two fourth time packets are preset for a long time; the user unloading configuration information comprises a target time period, and the data to be unloaded in the unloading buffer area is sent to the upper computer, and comprises the following steps: determining target data to be unloaded corresponding to a target time period from the data to be unloaded in the unloading buffer area according to the third time packet and the fourth time packet; and sending the target data to be offloaded to the upper computer.
Optionally, the user unloading configuration information includes a target data type, and sending data to be unloaded in an unloading buffer area to the upper computer includes: determining target data to be offloaded which accords with the target data type from the data to be offloaded in the offloading buffer; and sending the target data to be offloaded to the upper computer.
According to a second aspect of the present disclosure, there is provided a flight test data storage device, the device comprising: an acquisition module and a processing module.
The acquisition module is used for receiving the flight test data to be stored through the high-speed shared buffer zone, wherein the high-speed shared buffer zone comprises a first data frame and a second data frame of the flight test data to be stored; and acquiring an effective data address, wherein the effective data address is a data address of writable data in a storage disk.
A processing module, configured to obtain a first data frame from the high-speed shared buffer; obtaining a first data packet according to the first data frame; dividing the first data packet into n data blocks and/or residual data according to the preset data block size, wherein n is a positive integer, the residual data is data with the residual size smaller than the preset data block size after the data packet is divided into the data blocks, and the preset data block size is the data block size which enables the performance of the storage disk to be optimal; according to the effective data address, writing n data blocks into a storage disk in turn; retrieving a second data frame from the cache shared buffer; obtaining a second data packet according to the second data frame and the data in the temporary buffer area, wherein the temporary buffer area is used for storing the residual data; dividing the second data packet into m data blocks and/or residual data according to the preset data block size, wherein m is a positive integer; and sequentially writing the m data blocks into the storage disk according to the data address corresponding to the data block of the first data packet which is finally written into the storage disk.
Optionally, the storage disc includes a directory area and a data area, and the obtaining module is further configured to: after the effective data address is obtained, the effective directory address is obtained according to a directory area, wherein the effective directory address is a directory address in the directory area, in which file information can be written, the directory area is used for storing file information of each data file stored in a data area, and the data file comprises flight test data to be stored; writing file information according to the effective directory address, wherein the file information comprises a file name, a file starting address, a file size and generation time, the file starting address is an effective data address, and the file size is a preset size.
Optionally, the acquiring module is specifically configured to: and acquiring an effective data address according to the file information in the directory area, wherein the effective data address is a data address in which data can be written in the data area.
Optionally, the processing module is specifically configured to: writing a start data packet into the storage disk based on the effective data address, wherein the start data packet is used for marking the start data address of the flight test data to be stored in the storage disk; and writing the n data blocks into the storage disk in turn based on the data address of the initial data packet in the storage disk.
Optionally, the processing module is specifically configured to: writing a first time packet into the storage disk based on a data address of the initial data packet in the storage disk, wherein the first time packet is a data packet containing the current time; and writing the n data blocks into the storage disk in turn based on the data address in the storage disk of the first time packet.
Optionally, the processing module is further configured to: after the first time packet is written into the storage disk, writing a second time packet into the storage disk every preset time, wherein the second time packet is used for identifying the time when the second time packet is written into the storage disk.
Optionally, the processing module is further configured to: and updating the file size of the target data file according to the target data file obtained after the flight test data to be stored is written into the data area.
Optionally, the processing module is further configured to: acquiring user unloading configuration information from an upper computer; determining data addresses of data to be offloaded in a storage disk according to user offloading configuration information; according to the data address of the data to be unloaded in the storage disk, the data to be unloaded is sequentially unloaded to an unloading buffer area according to the data blocks when the data to be unloaded is written into the storage disk; and sending the data to be unloaded in the unloading buffer area to the upper computer.
Optionally, the data file corresponding to the data to be offloaded includes a third time packet and a fourth time packet; the third time packet is used for indicating the time when the data block of the data to be unloaded starts to be written into the storage disk; the fourth time packet is after the third time packet and is used for indicating the time when the next data block after the fourth time packet starts to be written into the storage disk; the intervals between the third time packet and the fourth time packet and between any two fourth time packets are preset for a long time; the processing module is specifically used for: determining target data to be unloaded corresponding to a target time period from the data to be unloaded in the unloading buffer area according to the third time packet and the fourth time packet; and sending the target data to be offloaded to the upper computer.
Optionally, the user uninstallation configuration information includes a target data type, and the processing module is further configured to: determining target data to be offloaded which accords with the target data type from the data to be offloaded in the offloading buffer; and sending the target data to be offloaded to the upper computer.
According to a third aspect of the present disclosure, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method as in the first aspect.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method according to the first aspect.
According to a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method according to the first aspect.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram of a data storage system according to an embodiment of the present disclosure;
FIG. 2 is a flow chart of a method for storing flight test data according to an embodiment of the present disclosure;
fig. 3 is a schematic flow chart of dividing a first data packet according to an embodiment of the disclosure;
FIG. 4 is a schematic flow chart of another method for storing flight test data according to an embodiment of the disclosure;
fig. 5 is a schematic flow chart of S206 in fig. 2 according to an embodiment of the disclosure;
Fig. 6 is a schematic flow chart of S502 in fig. 5 according to an embodiment of the disclosure;
FIG. 7 is a schematic flow chart of a further method for storing flight test data according to an embodiment of the disclosure;
fig. 8 is a schematic flow chart of S704 in fig. 7 according to an embodiment of the disclosure;
fig. 9 is another flow chart of S704 in fig. 7 provided in an embodiment of the disclosure;
FIG. 10 is a schematic diagram of the composition of a flight test data storage device provided by an embodiment of the present disclosure;
fig. 11 is a schematic diagram of the composition of an electronic device according to an embodiment of the disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be appreciated that in embodiments of the present disclosure, the character "/" generally indicates that the context associated object is an "or" relationship. The terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
In aircraft flight testing, it is necessary to use on-board test equipment to collect parameters in the aircraft flight test. With the development of flight test technology, the flight test parameters which can be collected by the airborne test equipment are more and more, and the data volume which is collected by the airborne test equipment is also more and more.
At present, the data storage system can adopt a lossless compression algorithm to compress and store the acquired data volume, so that the data storage system can store more data, but the lossless compression algorithm occupies the processing resources of the data storage system and cannot improve the data storage rate.
Under the background technology, the present disclosure provides a flight test data storage method, which can improve the data storage rate.
The execution main body of the flight test data storage method provided by the embodiment of the disclosure can be a computer or a server, or can also be other electronic equipment with data processing capability; alternatively, the execution subject of the method may be a processor (e.g., a central processing unit (central processing unit, CPU)) in the above-described electronic device; still alternatively, the execution subject of the method may be an Application (APP) installed in the electronic device and capable of implementing the function of the method; alternatively, the execution subject of the method may be a functional module, a unit, or the like having the function of the method in the electronic device. The subject of execution of the method is not limited herein.
Illustratively, fig. 1 is a schematic structural diagram of a data storage system according to an embodiment of the present disclosure. The flight test data storage method provided by the present disclosure may be performed by a data storage system as shown in fig. 1. As shown in fig. 1, the data storage system may include: a data receiving module 101, a data storage module 102 and a data unloading module 103; the data storage module 102 may include: a time synchronization unit 10201, a storage disk formatting unit 10202, a first directory reading unit 10203, a file creating unit 10204, a start packet generating unit 10205, a packet generating unit 10206, a high-speed shared buffer 10207, a data reorganizing unit 10208, a temporary buffer 10209, a divided data block unit 10210, a data block writing unit 10211, and a storage disk 10212; the data unloading module 103 may include a second directory reading unit 1031, a user configuration receiving unit 1032, an unloading unit 1033, an unloading buffer 1034, a data transmitting unit 1035, a time parsing unit 1036, and a data type parsing unit 1037.
The time synchronization unit is used for synchronizing the system time with the external time source time, the storage disk formatting unit is used for formatting the storage disk, and the time synchronization and the formatting of the storage disk can be finished in advance before the flight test data storage method is implemented.
The flight test data storage method is exemplarily described below with reference to the accompanying drawings.
Fig. 2 is a flow chart of a flight test data storage method according to an embodiment of the disclosure. As shown in fig. 2, the method may include the following S201 to S206.
S201, receiving flight test data to be stored through a high-speed shared buffer zone, wherein the high-speed shared buffer zone comprises a first data frame and a second data frame of the flight test data to be stored.
The first data frame may be a first frame data frame in flight test data to be stored, and the second data frame may be a second frame data frame in flight test data to be stored. That is, the first data frame may be a first frame data frame collected during a flight test, and the second data frame may be a second frame data frame collected during the flight test.
The flight test data to be stored may be from a data source such as a data acquisition device, or other data transmission device, for example. For example, flight test data to be stored (i.e., test data generated during aircraft testing) may be obtained from an acquisition device that acquires aircraft test data.
The manner in which the flight test data to be stored is obtained may be, for example, active or passive.
Alternatively, in the embodiment of the present application, the data receiving module 101 shown in fig. 1 may receive the flight test data to be stored, for example, the collecting device directly sends the collected aircraft test data (i.e., the flight test data to be stored) to the data receiving module, so as to obtain the flight test data to be stored through the data receiving module. For another example, a request for acquiring aircraft test data (i.e., flight test data to be stored) may be sent to the acquisition device by the data receiving module, so that the acquisition device sends the aircraft test data acquired by the acquisition device to the data receiving module according to the request, so as to acquire the flight test data to be stored by the data receiving module.
S202, acquiring an effective data address, wherein the effective data address is a data address of writable data in a storage disk.
Illustratively, the effective data address is obtained by performing traversal inquiry on the data address of the storage disk, so as to obtain the effective data address. Of course, the valid data address may be obtained in other ways, without limitation.
S203, acquiring a first data frame from the high-speed shared buffer.
S204, obtaining a first data packet according to the first data frame.
Illustratively, the first data packet may be obtained by adding a data packet header to the first data frame by the data reassembly unit 10208 as shown in fig. 1, where the data packet header may include a data packet sync word, a channel number, a packet length, a data length, a packet sequence number, and the like.
S205, dividing the first data packet into n data blocks and/or residual data according to the preset data block size, wherein n is a positive integer, the residual data is data with the residual size smaller than the preset data block size after the data packet is divided into the data blocks, and the preset data block size is the data block size which enables the performance of the storage disk to be optimal.
For example, the divided remaining data may be put in a temporary buffer 10209 as shown in fig. 1.
The preset data block size may be 4096 bytes or an integer multiple of 4096 bytes, and the value of the preset data block size is not limited.
Illustratively, the preset data block size may be a data block size that maximizes the speed of the storage data of the storage disk.
Fig. 3 is a schematic flow chart of dividing a first data packet according to an embodiment of the disclosure. As shown in fig. 3, a first ratio result may be obtained by calculating a ratio of the size of the first data packet to a preset data block size by the dividing data block unit 10210 shown in fig. 1; when the first ratio result is less than 1, the data in the first data packet may be written as remaining data into the temporary buffer by the data block writing unit 10211 as shown in fig. 1; when the first ratio result is an integer greater than or equal to 1, the first data packet may be divided into n data blocks according to a preset data block size by the division data block unit 10210 as shown in fig. 1; when the first ratio result is a non-integer greater than or equal to 1, the first data packet may be divided into n data blocks and remaining data according to a preset data block size by the dividing data block unit 10210 shown in fig. 1, and the remaining data may be written into the temporary buffer by the data block writing unit 10211 shown in fig. 1. Where n may be a value obtained by rounding down the first ratio result, for example, when the first ratio result is 2.5, n may be 2. Correspondingly, the data of the first data packet after the n data blocks are removed is the rest data.
S206, according to the effective data address, writing the n data blocks into the storage disk in turn.
Illustratively, a first data block of the n data blocks may be written to the storage disk by the data block writing unit 10211 as shown in fig. 1, starting with a valid data address; the second data block of the n data blocks may be written to the storage disk by starting from the next data address of the last data address corresponding to the first data block of the n data blocks by the data block writing unit 10211 shown in fig. 1; similarly, the remaining data blocks may be sequentially written to the storage disk by the data block writing unit 10211 as shown in fig. 1.
S207, acquiring a second data frame from the high-speed shared buffer.
S208, obtaining a second data packet according to the second data frame and the data in the temporary buffer area, wherein the temporary buffer area is used for storing the residual data.
Illustratively, the second data packet may be obtained by adding a data packet header to the second data frame first by the data reassembly unit 10208 as shown in fig. 1, and then reassembling the data of the second data frame after adding the data packet header and the data in the temporary buffer; the second data packet may also be obtained by the data reassembling unit 10208 shown in fig. 1, firstly reassembling the data of the second data frame and the data in the temporary buffer, and then adding a data packet header to the reassembled data.
For example, when there is no data in the temporary buffer, a header may be added to only the second data frame, resulting in a second data packet.
S209, dividing the second data packet into m data blocks and/or residual data according to the preset data block size, wherein m is a positive integer.
Illustratively, S209 is similar to S205 and will not be described again here.
S210, sequentially writing m data blocks into the storage disk according to the data address corresponding to the data block of the last written first data packet in the storage disk.
Illustratively, a first data block of m data blocks may be written to the storage disk by the data block writing unit 10211 as shown in fig. 1, starting from a next data address of a last data address of data addresses corresponding to the data block of the last written first data packet; the second data block of the m data blocks may be written to the storage disk by the data block writing unit 10211 as shown in fig. 1, starting from the next data address of the last data address of the first data block of the m data blocks to the storage disk; similarly, the remaining data blocks may be sequentially written to the storage disk by the data block writing unit 10211 as shown in fig. 1.
The above description is given taking the first data frame and the second data frame included in the flight test data to be stored as an example. Of course, in practical application, the flight test data to be stored may further include a plurality of data frames, and therefore, when the flight test data to be stored further includes other data frames than the first data frame and the second data frame, the other data frames may be written into the storage disk with reference to S207 to S210 in the above example, respectively. Wherein, when writing different other data frames, the initial position is only different from the initial position when writing the second data frame. That is, when writing a packet obtained from another data frame, the data address corresponding to the last data block is written in the data block divided from the last data packet written. The last data packet is a data packet obtained by combining the last written data frame with the data in the temporary data area.
For example, when the flight test data to be stored further includes a third frame data frame, the data packet obtained according to the third frame data frame is written, where the data address corresponding to the last data block is written in the data block obtained by dividing the data packet obtained according to the previous frame data frame (the second data packet for the third frame data frame).
When dividing a data packet obtained according to a last frame of data frame in flight test data to be stored according to a preset data block size, if a plurality of data blocks and residual data are obtained, storing the residual data corresponding to the last frame of data frame as the last data block.
Therefore, the flight test data to be stored can be sequentially stored according to the effective data addresses, so that the effective data addresses are ensured to be the data addresses occupied by the last stored data, the effective data addresses are not required to be continuously inquired in the process of storing the data, only the effective data addresses adjacent to the data addresses occupied by the last stored data are required to be inquired once before the flight test data to be stored are required to be stored, and then the flight test data to be stored are sequentially and continuously stored based on the effective data addresses, so that the data storage efficiency is improved.
In some possible embodiments, prior to performing the flight test data storage methods of the present disclosure, time synchronization may also be performed to synchronize the time of the device performing the method with external time. The storage disk may also be formatted first. For example, the time of the data storage system described above may be synchronized with an external time source by a time synchronization unit as shown in fig. 1; the embedded file system is bypassed, the storage disc is directly opened, and the storage disc is formatted by the storage disc formatting unit 10202 as shown in fig. 1. The storage disk formatting process may be performed only when the storage disk is used for storing the flight test data to be stored for the first time.
According to the embodiment of the disclosure, flight test data to be stored are acquired and stored in a high-speed shared buffer area, an effective data address is acquired, a first data packet is obtained according to a first data frame, the first data packet is divided into n data blocks and/or residual data according to a preset data block size, and the n data blocks are written into a storage disk according to the effective data address; and obtaining a second data packet according to the second data frame and the data in the temporary buffer area, dividing the second data packet into m data blocks and/or residual data according to the preset data block size, writing the m data blocks into the storage disk according to the data address corresponding to the data block of the last written first data packet in the storage disk, and writing the flight test data to be stored into the storage disk.
In the process of storing the flight test data to be stored, the flight test data is divided into the data blocks according to the preset data block size capable of optimizing the performance of the storage disk for storage, so that the storage performance of the storage disk can be utilized to the maximum extent, and the storage efficiency of the flight test data is improved. In addition, by setting the high-speed shared buffer area and transferring the high-speed shared buffer area, the storage of the flight test data is realized, and the storage process of the flight test data and the receiving/collecting process of the flight test data can be executed in parallel, so that the storage efficiency of the flight test data is further improved.
In a possible embodiment, the storage disk comprises a directory area and a data area. Fig. 4 is another flow chart of a flight test data storage method according to an embodiment of the disclosure. As shown in fig. 4, after acquiring the valid data address, the method may further include the following S401 to S402.
S401, acquiring an effective directory address according to a directory area, wherein the effective directory address is a directory address in the directory area, in which file information can be written, and the directory area is used for storing file information of each data file stored in a data area, and the data file comprises flight test data to be stored.
Illustratively, the effective directory address may be obtained by performing a traversal query on the data address of the storage disk directory area by the first directory reading unit 10203 as shown in fig. 1. Of course, the effective directory address may be obtained in other ways, without limitation.
The flight test data to be stored may be stored, for example, in the form of a file, wherein the file information is used to describe the information of the flight test data to be stored. For example, the file information may include a file name, a file size, and the like.
S402, writing file information according to the effective directory address, wherein the file information comprises a file name, a file starting address, a file size and generation time, the file starting address is an effective data address, and the file size is a preset size.
For example, file information may be written to a directory area in a storage disk by the file creation unit 10204 as shown in fig. 1, starting from an effective directory address.
Illustratively, taking an aircraft flight test as an example, the file name may be the number of flight tests, e.g., the file name may be "first flight test". The preset size can be defaulted to be 1 byte, the value of the preset size is not limited, and the file size can be updated to be the real file size after the data storage is completed. The generation time may include a date and/or a specific time corresponding to when the file information is written to the effective directory address.
Illustratively, the effective data address may be a data address in the data area where data can be written.
According to the embodiment, the effective directory address is obtained according to the directory area of the storage disk, and the file information is written according to the effective directory address, so that the file information of the flight test data to be stored can be written into the directory area, and the reading and unloading efficiency when the data in the storage disk are read is improved.
For example, after the flight test data to be stored is stored in the storage disk, when the data in the storage disk is read, the file starting address and the file size of the data file to be read can be obtained according to the file information in the directory area, and then the corresponding data address of the data file in the data area of the storage disk can be quickly and accurately obtained according to the file starting address and the file size, so that the reading and unloading efficiency of the data in the storage disk is improved.
In a possible embodiment, acquiring the valid data address may include: and acquiring an effective data address according to the file information in the directory area, wherein the effective data address is a data address in which data can be written in the data area.
For example, the data address of the data stored in the data area can be obtained according to the file information (the file starting position and the file size) existing in the directory area, and the next data address adjacent to the data address of the data stored in the data area is the effective data address.
According to the embodiment, the effective data address can be obtained rapidly and accurately through the file information of the directory area, and the data storage rate is further improved.
Fig. 5 is a schematic flow chart of S206 in fig. 2 according to an embodiment of the disclosure. As shown in fig. 5, S206 in fig. 2 may include the following S501 and S502.
S501, writing a start data packet into a storage disk based on the effective data address, wherein the start data packet is used for marking the start data address of flight test data to be stored in the storage disk.
Illustratively, the start data packet may be written to the storage disk by the start data packet generation unit 10205 as shown in fig. 1, starting from the valid data address.
S502, based on the data address of the initial data packet in the storage disk, sequentially writing n data blocks into the storage disk.
Illustratively, n data blocks may be written to the storage disk sequentially, starting from the next data address of the last data address in the storage disk of the start data packet.
According to the embodiment, the initial data packet is written into the storage disk based on the effective data address, and the n data blocks are sequentially written into the storage disk based on the data address of the initial data packet in the storage disk, so that the initial data address of the flight test data to be stored in the storage disk can be identified, and the reading efficiency when the data in the storage disk is read is improved.
For example, after the flight test data to be stored is stored in the storage disk, when the data in the storage disk is read, the initial data address of the read data can be quickly and accurately obtained according to the initial data packet.
Fig. 6 is a schematic flow chart of S502 in fig. 5 according to an embodiment of the disclosure. As shown in fig. 6, S502 in fig. 5 described above may include the following S601 and S602.
S601, writing a first time packet into a storage disk based on a data address of a starting data packet in the storage disk, wherein the first time packet is a data packet containing the current time.
The current time may be a time corresponding to a time when writing of the first time packet is started, a time corresponding to a time when writing of the first time packet is completed, or a time corresponding to a median time between a time when writing is started and a time when writing is completed.
Illustratively, the first time packet may be written to the storage disk by the time packet generation unit 10206 as shown in fig. 1, starting from the next data address of the last data address in the storage disk of the start data packet.
S602, based on the data address of the first time packet in the storage disk, sequentially writing n data blocks into the storage disk.
For example, n data blocks may be written to the storage disk in sequence starting from the next data address of the last data address in the storage disk of the first time packet.
According to the embodiment, the first time packet is written into the storage disk based on the data address of the initial data packet in the storage disk, the n data blocks are sequentially written into the storage disk based on the data address of the first time packet in the storage disk, and the initial time when the data is stored in the storage disk can be stored into the storage disk, so that the data processing is facilitated.
For example, after the flight test data to be stored is stored in the storage disk, when the data in the storage disk is read, the storage time of the data can be obtained, so that a user can conveniently screen the data according to the storage time of the data.
In a possible embodiment, after writing the first time packet to the storage disk, the method may further comprise: and writing a second time packet into the storage disk at intervals of a preset time length, wherein the second time packet is used for identifying the time when the second time packet is written into the storage disk.
The preset time interval can be 1 second, 10 seconds, etc., and the size of the preset time interval is not limited.
Illustratively, taking a preset time interval of 1 second as an example, every 1 second, the second time packet is written starting from the data address next to the last data address of the data addresses in the storage disk of the most recently written data block (i.e., the data address next to the data address of the data last written to the storage disk).
The second time packet may be used to identify a time corresponding to a time when the second time packet starts writing to the storage disk, and may also be used to identify a time corresponding to a time when the second time packet completes writing to the storage disk.
For example, the second time packet may be written in a process of writing the data block corresponding to any data frame into the storage disk according to the preset time interval.
For example, when the time period of writing the data block corresponding to the first data frame into the storage disk is longer than the preset time period interval, the time of writing the second time packet into the storage disk is in the process of writing the data block corresponding to the first data frame into the storage disk; when the time length of writing the data block corresponding to the first data packet into the storage disk is smaller than the preset time length interval, the time of writing the second time packet into the storage disk is in the process of writing the data block corresponding to the second data frame or the subsequent other data frames into the storage disk.
According to the embodiment, after the first time packets are written into the storage disk, the corresponding second time packets are respectively written into the storage disk according to the preset time intervals, so that the data blocks written into the storage disk in each preset time interval can be marked, and the data processing is facilitated.
For example, after the flight test data to be stored is stored in the storage disk, when the data in the storage disk is read, the storage time of the data block between the two adjacent second time packets can be obtained according to the two adjacent second time packets, so that a user can conveniently screen the data according to the storage time of the data block.
In a possible embodiment, the method provided in the foregoing embodiment may further include: and updating the file size of the target data file according to the target data file obtained after the flight test data to be stored is written into the data area.
For example, when the flight test data to be stored is written, the data size of the data packet corresponding to each data frame of the written flight test data to be stored may be counted to obtain the file size of the target data file.
For example, when the target data file further includes the initial data packet and/or the first time packet and/or the second time packet in the foregoing embodiment, the data size of the data packet corresponding to each data frame of the written flight test data to be stored, and the data size of the initial data packet and/or the data size of the first time packet and/or the data size of the second time packet may be counted to obtain the file size of the target data file.
For example, when updating the file size of the target data file, the file size may be updated in real time, or may be updated after all the flight test data to be stored is written into the storage disk.
According to the method and the device, the file size of the target data file is updated according to the target data file obtained after the flight test data to be stored are written into the data area, and the actual file size can be accurately obtained.
Fig. 7 is a schematic flow chart of a flight test data storage method according to an embodiment of the disclosure. As shown in fig. 7, the method may further include the following S701 and S702.
S701, acquiring user unloading configuration information from an upper computer.
For example, the user uninstall configuration information may be received through the user configuration receiving unit 1032 as shown in fig. 1, and the user uninstall configuration information may include an uninstall instruction for instructing to uninstall data to be uninstalled in the storage disk.
For example, the upper computer may be a device operated by a user for acquiring data stored in the storage disk for data processing. For example, the host computer may be a computer, a mobile terminal, a server, or the like, which is not limited herein.
S702, determining data to be unloaded and data addresses of the data to be unloaded in a storage disk according to user unloading configuration information.
The data to be offloaded may be all data in the storage disk or may be part of the data in the storage disk, for example. When the storage disk includes the directory area and the data area, the user uninstallation configuration information may include a file name of the data to be uninstalled, file information corresponding to the file name in the directory area may be determined according to the file name, and the size of the data to be uninstalled and a data address of the data to be uninstalled in the storage disk may be obtained according to the file information through the second directory reading unit 1031 as shown in fig. 1.
S703, according to the data address of the data to be offloaded in the storage disk, the data to be offloaded is sequentially offloaded to the offloading buffer area according to the data block when the data to be offloaded is written into the storage disk.
Wherein data to be offloaded may be sequentially offloaded to the offload buffer by data blocks through the offload unit 1033 as shown in fig. 1. The size of the data block when the data to be offloaded is written to the storage disk may be the data block size that maximizes the storage speed of the storage disk, for example, the data block size may be 4096 bytes, or an integer multiple of 4096 bytes.
S704, sending data to be unloaded in the unloading buffer area to the upper computer.
For example, the data to be offloaded in the offload buffer may be transmitted to the host computer by the data transmitting unit 1035 as shown in fig. 1.
According to the embodiment, according to the user unloading configuration information obtained from the upper computer, the data to be unloaded and the data address of the data to be unloaded in the storage disk are determined, the data to be unloaded are sequentially unloaded to the unloading buffer area according to the data blocks, and the data to be unloaded in the unloading buffer area is sent to the upper computer, so that the user can obtain the data stored in the storage disk.
In a possible embodiment, the data file corresponding to the data to be offloaded includes a third time packet and a fourth time packet; the third time packet is used for indicating the time when the data block of the data to be unloaded starts to be written into the storage disk; the fourth time packet is after the third time packet and is used for indicating the time when the next data block after the fourth time packet starts to be written into the storage disk; and the interval between the third time packet and the fourth time packet and between any two fourth time packets is preset time length, and the user unloading configuration information comprises a target time period. Fig. 8 is a schematic flow chart of S704 in fig. 7 according to an embodiment of the disclosure. As shown in fig. 8, S704 in fig. 7 described above may include the following S801 and S802.
S801, determining target data to be unloaded corresponding to a target time period from the data to be unloaded in the unloading buffer area according to the third time packet and the fourth time packet.
The third time packet may be the first time packet in the foregoing embodiment, and the fourth time packet may be the second time packet in the foregoing embodiment.
Illustratively, the time of writing the data block between the third time packet and the first fourth time packet and the time of writing the data block between the adjacent two fourth time packets to the storage disk may be obtained by parsing the third time packet and the fourth time packet by the time parsing unit 1036 as shown in fig. 1.
For example, it may be determined that data in a data block of the time of writing to the storage disk between the start time and the end time of the target period is target data to be unloaded according to the start time and the end time of the target period.
Illustratively, the target time period may be one or more, and the number of the target time periods is not limited.
S802, sending target data to be unloaded to an upper computer.
For example, the target data to be offloaded may be transmitted to the upper computer through the data transmission unit 1035 as shown in fig. 1.
According to the third time packet and the fourth time packet, the embodiment can determine the target data to be unloaded corresponding to the target time period from the data to be unloaded in the unloading buffer area, and send the target data to be unloaded to the upper computer, so that a user can acquire the data in the expected time period.
In a possible embodiment, the user uninstallation configuration information includes a target data type. Fig. 9 is another flowchart of S704 in fig. 7 provided in an embodiment of the disclosure. As shown in fig. 9, S704 in fig. 7 described above may include the following S901 to S902.
S901, determining target data to be offloaded which accords with the target data type from the data to be offloaded in the offloading buffer.
The target data type may include one or more data types, and neither the data type nor the number of data types is limited.
For example, the data type analyzing unit 1037 shown in fig. 1 may analyze the data to be offloaded in the offloading buffer to obtain the data type of each data packet in the data to be offloaded, determine that the data packet with the data type consistent with the target data type in the data to be offloaded is the data packet to be offloaded, and the target data to be offloaded may include all the data packets to be offloaded.
S902, sending target data to be offloaded to an upper computer.
For example, the target data to be offloaded may be transmitted to the upper computer through the data transmission unit 1035 as shown in fig. 1.
Illustratively, S901 may further include: dividing the data to be offloaded in the buffer area to be offloaded according to the time packets and the data packets, and determining target data to be offloaded which accords with the target data type from the data packets after the data to be offloaded are divided. Therefore, the data to be unloaded which needs to be analyzed can be reduced, the time for determining the target data to be unloaded is reduced, and the speed for determining the target data to be unloaded is improved.
According to the embodiment, the data to be offloaded is divided according to the time packets and the data packets, the data types of the data packets after the data to be offloaded are divided are obtained through analysis, then according to the target data types, the target data to be offloaded which is consistent with the target data types can be determined, and the target data to be offloaded is sent to the upper computer, so that a user can obtain data of the expected data types.
In a possible embodiment, the embodiment corresponding to fig. 8 and the embodiment corresponding to fig. 9 may be implemented in combination.
For example, S801 may be implemented first to obtain data corresponding to a target time period in the data to be offloaded, then determine data that conforms to the target data type from the data corresponding to the target time period in the obtained data to be offloaded, take the determined data that conforms to the target data type as target data to be offloaded, and finally send the target data to be offloaded to the upper computer.
For example, S901 may be implemented first to obtain data that accords with the target data type in the data to be offloaded, then determine, from the obtained data that accords with the target data type in the data to be offloaded, data corresponding to the target time period according to the third time packet and the fourth time packet, take the data corresponding to the determined target time period as the target data to be offloaded, and finally send the target data to be offloaded to the upper computer.
The embodiment is realized by combining the embodiment corresponding to fig. 8 and the embodiment corresponding to fig. 9, so that a user can acquire data of an expected data type and time period.
The foregoing description of the embodiments of the present disclosure has been presented primarily in terms of methods. To achieve the above functions, it includes corresponding hardware structures and/or software modules that perform the respective functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. The technical aim may be to use different methods to implement the described functions for each particular application, but such implementation should not be considered beyond the scope of the present disclosure.
Illustratively, the flight test data storage method provided by the present disclosure is described in detail below in connection with the foregoing data storage system, and the flight test data storage method may include the following steps 1 to 3.
Step 1, a data receiving module receives data acquired from a front end, namely flight test data to be stored, and the flight test data to be stored is placed in a high-speed shared buffer area.
Step 2, the data storage module reads the flight test data to be stored from the high-speed shared buffer area, and stores the flight test data in the storage disc in a data file format, and the specific steps of step 2 can include the following steps 2.1 to 2.14.
Step 2.1, the time synchronization unit receives the time provided by the external clock source and synchronizes the time of the data storage system to the time of the external clock source.
And 2.2, bypassing the embedded file system, and directly opening the storage disk.
And 2.3, the storage disk formatting unit formats the storage disk, erases the disk catalog area and writes the disk identifier field in the disk identification area. This step is not necessary and may be omitted if the disk is not first used or damaged or desired by the user. The storage disk may include a disk identification area, a directory area, and a data area, and is planned and contracted in advance according to the actual size and demand of the storage disk, for example, a storage disk with a capacity of 512GB is used as the disk identification area, 0 to 524287 Bytes are used as the disk identification area, 524288 (512 KB) to 104857599 Bytes are used as the directory area, and 104857600 (100 MB) to 549755813887 Bytes are used as the data area.
And 2.4, the first directory reading unit reads all the written directory block information of the directory area, analyzes the existing file information according to the directory block definition, and acquires an effective directory address and an effective data address.
In step 2.5, the file creation unit writes file information in the effective directory address, the file information including a file name named at the current system time, a file start address, a file size (1 byte defaulting at this time), a generation date, and the like.
And 2.6, starting from the effective data address, writing a start data packet into the start data packet generating unit, wherein the start data packet is used for marking the start data address of the flight test data to be stored in the storage disk.
And 2.7, the time packet generating unit starts from the adjacent data address after the data address corresponding to the initial data packet, and writes the first time packet, wherein the first time packet is the data packet containing the current time.
And 2.8, the data reorganization unit reads a data frame of the high-speed shared buffer area, adds a data packet header (the content comprises a data packet synchronous word, a channel number, a packet length, a data length, a packet sequence number and the like) to the data frame to obtain a corresponding data packet, and sends the corresponding data packet of the data frame to the data block dividing unit.
And 2.9, dividing the data block unit to receive the data packet corresponding to the data frame, dividing the data packet corresponding to the data frame into data blocks and/or residual data with the data block size capable of exerting the optimal performance of the storage disk, sending the divided data blocks to the data block writing unit, and writing the residual data into the temporary buffer area if the residual data exists. Step 2.9 may include the following steps 2.9.1 to 2.9.4.
Step 2.9.1, dividing the data block unit to receive the data packet corresponding to the data frame, reading the residual data in the temporary buffer area, and recombining the data packet and the residual data into a new data packet, wherein the size of the residual data in the temporary buffer area is empty when the step 2.9.1 is executed for the first time.
Step 2.9.2, calculating the new packet size and the size=m of the data block capable of exhibiting the optimal performance of the storage disk (the size of the data block capable of exhibiting the optimal performance of the storage disk may be 4096 bytes or an integer multiple of 4096 bytes). Illustratively, M may include n and M in the foregoing embodiments.
If M >1, then step 2.9.3 is performed, otherwise step 2.9.4 is performed.
Step 2.9.3, if M is an integer, dividing the new data packet into M data blocks according to the size of the data block capable of exerting the optimal performance of the storage disk, and sending the divided data blocks to a data block writing unit; if M is not an integer, dividing the new data packet into M data blocks and residual data according to the size of the data block capable of exerting the optimal performance of the storage disk, sending the divided data blocks to a data block writing unit, and writing the residual data into a temporary buffer area.
In step 2.9.4, the new data packet is directly stored in the temporary buffer.
And 2.10, the data block writing unit receives the data blocks sent by the data block dividing unit, sequentially writes the data blocks into the storage disk from the next data address adjacent to the data address corresponding to the first time packet, and counts the size of the written data.
Step 2.11, the steps 2.8 to 2.9 are circulated, the data packet header added in the data frame of the high-speed shared buffer area is read again, and the data packet header is sequentially written into the disk after data recombination.
Step 2.12, inserting a second time packet containing the current time every fixed 1s interval during the execution of step 2.11.
And 2.13, in the execution process of the step 2.11, monitoring a system power-off signal, immediately starting the writing of the file to finish if the power-off interruption occurs, executing the step 2.14, and otherwise, executing the step 2.11.
And 2.14, after the flight test data to be stored are written into the storage disk, updating the file size in the file information, and adding information such as the ending date and time into the file information.
And 3, the data unloading module reads the data file from the storage disk and unloads the data to the upper computer according to the user configuration, all or according to the data type or the time period. The specific steps of step 3 may include the following steps 3.1 to 3.5.
And 3.1, the second catalog reading unit reads catalog information from the storage disk, and obtains the data address and the file size of the data in the storage disk after analysis.
And 3.2, the user configuration receiving unit receives user unloading configuration information sent by the upper computer.
And 3.3, the data reading unit reads the data blocks with integral multiples of the size of the data blocks capable of exerting the optimal performance of the magnetic disk from the data address of the data in the storage disk, and stores the data blocks into the unloading buffer zone.
In step 3.4, the data in the unloading buffer is divided into a start data packet, a time packet and a data packet, where the time packet may include the first time packet and the second time packet in the foregoing embodiments.
And 3.5, sending data to be unloaded in the unloading buffer area to the upper computer according to the unloading configuration information of the user.
If the user selects all data to be unloaded, the data sending unit directly sends all data of the unloading buffer area to the upper computer.
If the user selects to unload according to the data type, the data type analysis unit analyzes the data type of the data packet in the unloading buffer area and sends the data packet with the data type consistent with the data type required by the user to the upper computer.
If the user selects to unload according to the time period, the time packet analysis unit analyzes the time information of the time packet in the unloading buffer zone, and sends all the data packets in the time period required by the user to the upper computer according to the time information of the first time packet, the time information of the second time packet and the time period required by the user.
In an exemplary embodiment, the disclosed embodiments also provide a flight test data storage device that may be used to implement the flight test data storage method as in the previous embodiments.
Fig. 10 is a schematic diagram of the composition of a flight test data storage device provided in an embodiment of the present disclosure. As shown in fig. 10, the apparatus may include: an acquisition module 1001 and a processing module 1002.
An obtaining module 1001, configured to receive flight test data to be stored through a high-speed shared buffer, where the high-speed shared buffer includes a first data frame and a second data frame of the flight test data to be stored; and acquiring an effective data address, wherein the effective data address is a data address of writable data in a storage disk.
A processing module 1002 configured to obtain a first data frame from a cache shared buffer; obtaining a first data packet according to the first data frame; dividing the first data packet into n data blocks and/or residual data according to the preset data block size, wherein n is a positive integer, the residual data is data with the residual size smaller than the preset data block size after the data packet is divided into the data blocks, and the preset data block size is the data block size which enables the performance of the storage disk to be optimal; according to the effective data address, writing n data blocks into a storage disk in turn; retrieving a second data frame from the cache shared buffer; obtaining a second data packet according to the second data frame and the data in the temporary buffer area, wherein the temporary buffer area is used for storing the residual data; dividing the second data packet into m data blocks and/or residual data according to the preset data block size, wherein m is a positive integer; and sequentially writing the m data blocks into the storage disk according to the data address corresponding to the data block of the first data packet which is finally written into the storage disk.
In some possible implementations, the storage disk includes a directory area and a data area, and the obtaining module 1001 is further configured to: after the effective data address is obtained, the effective directory address is obtained according to a directory area, wherein the effective directory address is a directory address in the directory area, in which file information can be written, the directory area is used for storing file information of each data file stored in a data area, and the data file comprises flight test data to be stored; writing file information according to the effective directory address, wherein the file information comprises a file name, a file starting address, a file size and generation time, the file starting address is an effective data address, and the file size is a preset size.
In some possible embodiments, the obtaining module 1001 is specifically configured to: and acquiring an effective data address according to the file information in the directory area, wherein the effective data address is a data address in which data can be written in the data area.
In some possible embodiments, the processing module 1002 is specifically configured to: writing a start data packet into the storage disk based on the effective data address, wherein the start data packet is used for marking the start data address of the flight test data to be stored in the storage disk; and writing the n data blocks into the storage disk in turn based on the data address of the initial data packet in the storage disk.
In some possible embodiments, the processing module 1002 is specifically configured to: writing a first time packet into the storage disk based on a data address of the initial data packet in the storage disk, wherein the first time packet is a data packet containing the current time; and writing the n data blocks into the storage disk in turn based on the data address in the storage disk of the first time packet.
In some possible implementations, the processing module 1002 is further configured to: after the first time packet is written into the storage disk, writing a second time packet into the storage disk every preset time, wherein the second time packet is used for identifying the time when the second time packet is written into the storage disk.
In some possible implementations, the processing module 1002 is further configured to: and updating the file size of the target data file according to the target data file obtained after the flight test data to be stored is written into the data area.
In some possible implementations, the processing module 1002 is further configured to: acquiring user unloading configuration information from an upper computer; determining data addresses of data to be offloaded in a storage disk according to user offloading configuration information; according to the data address of the data to be unloaded in the storage disk, the data to be unloaded is sequentially unloaded to an unloading buffer area according to the data blocks when the data to be unloaded is written into the storage disk; and sending the data to be unloaded in the unloading buffer area to the upper computer.
In some possible embodiments, the data file corresponding to the data to be offloaded includes a third time packet and a fourth time packet; the third time packet is used for indicating the time when the data block of the data to be unloaded starts to be written into the storage disk; the fourth time packet is after the third time packet and is used for indicating the time when the next data block after the fourth time packet starts to be written into the storage disk; the intervals between the third time packet and the fourth time packet and between any two fourth time packets are preset for a long time; the processing module 1002 is specifically configured to: determining target data to be unloaded corresponding to a target time period from the data to be unloaded in the unloading buffer area according to the third time packet and the fourth time packet; and sending the target data to be offloaded to the upper computer.
In some possible embodiments, the user uninstallation configuration information includes a target data type, and the processing module 1002 is further configured to: determining target data to be offloaded which accords with the target data type from the data to be offloaded in the offloading buffer; and sending the target data to be offloaded to the upper computer.
It should be noted that the division of the modules in fig. 10 is illustrative, and is merely a logic function division, and other division manners may be implemented in practice. For example, two or more functions may also be integrated in one processing module. The embodiments of the present disclosure are not limited in this regard. The integrated modules may be implemented in hardware or in software functional modules.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the related user personal information all conform to the regulations of related laws and regulations, and the public sequence is not violated.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
In an exemplary embodiment, an electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method as described in the above embodiments. The electronic device may be the computer or server described above.
In an exemplary embodiment, the readable storage medium may be a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method according to the above embodiment.
In an exemplary embodiment, the computer program product comprises a computer program which, when executed by a processor, implements the method according to the above embodiments.
Fig. 11 illustrates a schematic block diagram of an example electronic device 1100 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 11, the electronic device 1100 includes a computing unit 1101 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 1102 or a computer program loaded from a storage unit 1108 into a Random Access Memory (RAM) 1103. In the RAM 1103, various programs and data required for the operation of the electronic device 1100 can also be stored. The computing unit 1101, ROM 1102, and RAM 1103 are connected to each other by a bus 1104. An input/output (I/O) interface 1105 is also connected to bus 1104.
A number of components in the electronic device 1100 are connected to the I/O interface 1105, including: an input unit 1106 such as a keyboard, a mouse, etc.; an output unit 1107 such as various types of displays, speakers, and the like; a storage unit 1108, such as a magnetic disk, optical disk, etc.; and a communication unit 1109 such as a network card, modem, wireless communication transceiver, or the like. The communication unit 1109 allows the electronic device 1100 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunications networks.
The computing unit 1101 may be a variety of general purpose and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 1101 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1101 performs the various methods and processes described above, such as the flight test data storage method. For example, in some embodiments, the flight test data storage method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 1108. In some embodiments, some or all of the computer programs may be loaded and/or installed onto electronic device 1100 via ROM 1102 and/or communication unit 1109. When the computer program is loaded into the RAM 1103 and executed by the computing unit 1101, one or more steps of the flight test data storage method described above may be performed. Alternatively, in other embodiments, the computing unit 1101 may be configured to perform the flight test data storage method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (7)

1. A method of storing flight test data, the method comprising:
receiving flight test data to be stored through a high-speed shared buffer zone, wherein the high-speed shared buffer zone comprises a first data frame and a second data frame of the flight test data to be stored;
acquiring an effective data address, wherein the effective data address is a data address of writable data in a storage disk;
acquiring the first data frame from the high-speed shared buffer;
Obtaining a first data packet according to the first data frame;
dividing the first data packet into n data blocks and/or residual data according to a preset data block size, wherein n is a positive integer, the residual data is data of which the residual size is smaller than the preset data block size after the data packet is divided into the data blocks, and the preset data block size is the data block size which enables the performance of the storage disk to be optimal;
according to the effective data address, writing the n data blocks into the storage disk in turn;
retrieving the second data frame from the cache shared buffer;
obtaining a second data packet according to the second data frame and the data in a temporary buffer area, wherein the temporary buffer area is used for storing residual data;
dividing the second data packet into m data blocks and/or residual data according to the preset data block size, wherein m is a positive integer;
sequentially writing the m data blocks into the storage disk according to the data address corresponding to the data block of the first data packet which is finally written into the storage disk;
acquiring user unloading configuration information from an upper computer;
determining data to be unloaded and a data address of the data to be unloaded in the storage disk according to the user unloading configuration information;
According to the data address of the data to be offloaded in the storage disk, the data to be offloaded is sequentially offloaded to an offloading buffer area according to the data blocks when the data to be offloaded is written into the storage disk;
sending the data to be unloaded in the unloading buffer area to the upper computer;
and writing the n data blocks into the storage disk in turn according to the effective data address, wherein the method comprises the following steps:
writing a start data packet into the storage disk based on the effective data address, wherein the start data packet is used for marking the start data address of the flight test data to be stored in the storage disk;
writing a first time packet into the storage disk based on the data address of the initial data packet in the storage disk, wherein the first time packet is a data packet containing the current time;
writing the n data blocks into the storage disk in turn based on the data address of the first time packet in the storage disk;
after the writing of the first time packet to the storage disk, the method further comprises:
writing a second time packet into the storage disk at intervals of preset time, wherein the second time packet is used for marking the time of writing the second time packet into the storage disk;
The data file corresponding to the data to be unloaded comprises a third time packet and a fourth time packet; the third time packet is used for indicating the time when the data block of the data to be unloaded starts to be written into the storage disk; the fourth time packet is after the third time packet and is used for indicating the time when the next data block after the fourth time packet starts to be written into the storage disk; the intervals between the third time packet and the fourth time packet and between any two fourth time packets are preset for a period of time; the user unloading configuration information includes a target time period, and the sending the data to be unloaded in the unloading buffer area to the upper computer includes:
determining target data to be unloaded corresponding to the target time period from the data to be unloaded in the unloading buffer area according to the third time packet and the fourth time packet;
and sending the target data to be unloaded to the upper computer.
2. The method of claim 1, wherein the storage disk includes a directory area and a data area, the method further comprising, after the acquiring the valid data address:
according to the directory area, an effective directory address is obtained, wherein the effective directory address is a directory address in the directory area, in which file information can be written, and the directory area is used for storing file information of each data file stored in the data area, and the data file comprises the flight test data to be stored;
Writing file information according to the effective directory address, wherein the file information comprises a file name, a file starting address, a file size and generation time, the file starting address is the effective data address, and the file size is a preset size.
3. The method of claim 2, wherein the obtaining a valid data address comprises:
and acquiring an effective data address according to the file information in the directory area, wherein the effective data address is a data address in which data can be written in the data area.
4. The method according to claim 2, wherein the method further comprises:
and updating the file size of the target data file according to the target data file obtained after the flight test data to be stored is written into the data area.
5. The method according to claim 1, wherein the user offload configuration information includes a target data type, and the sending the data to be offloaded in the offload buffer to the host computer includes:
determining target data to be offloaded which accords with the target data type from the data to be offloaded in the offloading buffer;
And sending the target data to be unloaded to the upper computer.
6. An electronic device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.
7. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1-5.
CN202310623865.2A 2023-05-30 2023-05-30 Flight test data storage method, device, equipment and storage medium Active CN116339646B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310623865.2A CN116339646B (en) 2023-05-30 2023-05-30 Flight test data storage method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310623865.2A CN116339646B (en) 2023-05-30 2023-05-30 Flight test data storage method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116339646A CN116339646A (en) 2023-06-27
CN116339646B true CN116339646B (en) 2023-08-11

Family

ID=86886200

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310623865.2A Active CN116339646B (en) 2023-05-30 2023-05-30 Flight test data storage method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116339646B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1221646A2 (en) * 2001-01-09 2002-07-10 Kabushiki Kaisha Toshiba Disk control system and method
CN101079811A (en) * 2007-04-28 2007-11-28 北京航空航天大学 Data transmission method and system of airplane and ground system
CN108804345A (en) * 2018-05-23 2018-11-13 湖南博匠信息科技有限公司 Method for writing data, device, equipment and computer readable storage medium
CN111913659A (en) * 2020-07-14 2020-11-10 长沙景嘉微电子股份有限公司 Block data processing method, device and system and storage medium
WO2022078517A1 (en) * 2020-10-15 2022-04-21 展讯通信(上海)有限公司 Data transmission method and device, and storage medium
CN115098018A (en) * 2022-05-31 2022-09-23 北京微纳星空科技有限公司 Data writing method, equipment and storage medium
CN115562587A (en) * 2022-10-12 2023-01-03 天津同阳科技发展有限公司 Data storage method, device and equipment applied to storage medium and storage medium
CN116107503A (en) * 2022-12-26 2023-05-12 长春吉大正元信息技术股份有限公司 Data transmission method and device and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114327278A (en) * 2021-12-30 2022-04-12 北京百度网讯科技有限公司 Data additional writing method, device, equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1221646A2 (en) * 2001-01-09 2002-07-10 Kabushiki Kaisha Toshiba Disk control system and method
CN101079811A (en) * 2007-04-28 2007-11-28 北京航空航天大学 Data transmission method and system of airplane and ground system
CN108804345A (en) * 2018-05-23 2018-11-13 湖南博匠信息科技有限公司 Method for writing data, device, equipment and computer readable storage medium
CN111913659A (en) * 2020-07-14 2020-11-10 长沙景嘉微电子股份有限公司 Block data processing method, device and system and storage medium
WO2022078517A1 (en) * 2020-10-15 2022-04-21 展讯通信(上海)有限公司 Data transmission method and device, and storage medium
CN115098018A (en) * 2022-05-31 2022-09-23 北京微纳星空科技有限公司 Data writing method, equipment and storage medium
CN115562587A (en) * 2022-10-12 2023-01-03 天津同阳科技发展有限公司 Data storage method, device and equipment applied to storage medium and storage medium
CN116107503A (en) * 2022-12-26 2023-05-12 长春吉大正元信息技术股份有限公司 Data transmission method and device and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
网络存储系统中的IO调度方法;赵秀丽;《万方数据库》;全文 *

Also Published As

Publication number Publication date
CN116339646A (en) 2023-06-27

Similar Documents

Publication Publication Date Title
CN108650287B (en) Upgrading method and device for terminal device in Internet of things and computer readable medium
CN108900843B (en) Monochrome image compression method, apparatus, medium, and electronic device
CN110209348B (en) Data storage method and device, electronic equipment and storage medium
KR101745456B1 (en) Ecu for transmitting large data in hil test environment, system including the same and method thereof
CN109802684B (en) Method and device for data compression
EP3125501A1 (en) File synchronization method, server, and terminal
CN111095421B (en) Context-aware delta algorithm for gene files
EP3493113B1 (en) Image processing method, computer device, and computer readable storage medium
CN108733317B (en) Data storage method and device
CN113485962B (en) Log file storage method, device, equipment and storage medium
CN114817651B (en) Data storage method, data query method, device and equipment
CN113014510B (en) Data caching method and device in distributed test of inertial navigation system
CN112994980A (en) Time delay testing method and device, electronic equipment and storage medium
CN111580851A (en) Data management method and related device
CN116339646B (en) Flight test data storage method, device, equipment and storage medium
CN112419004B (en) Method, system, equipment and storage medium for configurable access of all-channel order
CN113344074A (en) Model training method, device, equipment and storage medium
CN113138969A (en) Data transmission method and device, electronic equipment and computer readable storage medium
CN108494700B (en) Cross-link data transmission method and device, computer equipment and storage medium
CN111367916A (en) Data storage method and device
CN112714163B (en) Data transmission method, device, electronic equipment and medium
CN110740138A (en) Data transmission method and device
CN113191136B (en) Data processing method and device
CN113204683B (en) Information reconstruction method and device, storage medium and electronic equipment
CN115086345A (en) File synchronization method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant