Data storage and reading method and system
By encoded data on the onboard side recording device of the aircraft and directly stored, and data distinction and packaging are performed on the reading side, the problem of data packaging loss in the prior art when equipment is abnormal or powered off is solved, and continuous playback of audio and video data streams and optimized use of equipment resources are realized.
Patent Information
- Application Number
- CN202411758443.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-05-09
AI Technical Summary
When recording and reading audio and video data during navigation on the aircraft, the equipment on the onboard side is required to always be powered on and work normally, resulting in tight equipment processing resources and memory resources. When the equipment is abnormal or powered off, data loss will occur in data packaging, resulting in the entire data being unable to be read or played.
By encoded data on the recording device on the onboard side and stored directly in the storage medium instead of encapsulating it, the storage space of the storage medium is divided into storage areas of audio data stream and video data stream. The reading device distinguishes and encapsulates it according to the frame header identification during playback, and finally forms a file of a unified format.
When dealing with power outage or current outage, the impact of data packaging is avoided, the playback continuity of audio and video data streams is ensured, and the processing resources and memory resource load of the onboard device is reduced.
Smart Images

Figure CN119967185A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of airborne equipment data recording, and in particular to a method and system for storing and reading navigation data. Background Art
[0002] Aircraft are equipped with a large number of electronic devices, most of which are used to indicate or record the parameters of the aircraft during navigation. Usually, in order to ensure the normal operation of the equipment, additional onboard data storage devices will be used to record the various parameters and status of the aircraft during execution, and then through subsequent analysis, the faulty equipment or the cause of the equipment failure will be screened. In recent years, in order to improve the depth of data collection, in addition to data such as equipment status, audio and video during navigation will also be recorded, and then through the subsequent reading and playback configuration method, the navigation status can be more accurately understood.
[0003] In order to realize the above requirements, the prior art provides a recording device and a reading device that share the same storage device. Generally speaking, an audio and video recording device is used to extract the audio and video during navigation, and the extracted source data is encoded and packaged in a specific file format and then stored in a shared storage device (usually an electronic disk). Secondly, a reading device extracts the corresponding audio and video data from the storage device and plays it after unpacking.
[0004] However, the limitation of the existing method is that during the entire process of data extraction and storage, the electronic equipment and recording equipment on the airborne side are required to remain powered on and in normal working condition. On the other hand, for data security reasons, encryption fields are generally introduced in the encoding of the collected data to prevent the source file from being read and played unexpectedly. In view of the continuity requirement of the process, when a device encounters an abnormality, power outage or other emergencies, the encapsulation of the source data will result in data loss in the tail information part, which will directly lead to the data being damaged due to the encapsulation abnormality and the entire segment cannot be read or played. In addition, to ensure continuity requirements, data recording and encoding constitute a processing resource and memory resource load on the airborne side.
[0005] Therefore, the existing architecture should be improved to solve the above-mentioned problems existing in the prior art. Summary of the invention
[0006] In view of this, the present invention provides a data storage and reading method and system to solve at least one of the above problems.
[0007] In order to solve the above technical problems, the first aspect of the present invention is to provide a data storage and reading method, which is based on the existing recording device and reading device on the airborne side, and is configured with a storage medium that can realize data sharing. The recording device encodes the collected audio and video data streams and directly stores them in the storage medium. The storage space of the storage medium is divided into storage areas corresponding to the audio data stream and the video data stream, respectively, so that the storage medium can store the data stream in the corresponding storage area according to the different frame header identifiers after the data stream is encoded. Then, the reading device judges the data obtained by traversing the storage area, converts and restores the audio or video encoding data, and finally encapsulates it into a file of a unified format for subsequent retrieval of the library file for playback. The second aspect of the present invention is to configure a data storage and reading device that executes the method described in the first aspect thereof, the device includes a recording device and a reading device that share the same storage medium, and in the recording device, the microphone device and the camera device respectively collect audio and video data in the scene environment.
[0008] Compared with the prior art, the beneficial technical effect that can be achieved by implementing the technical solution of the present invention is: when dealing with power outages or power outages, the recording device on the airborne side no longer encapsulates the data after encoding, but the playback device on the reading side distinguishes the data before encapsulating it, which will not affect the playback of the audio and video data streams. At the same time, since the continuity requirements on the recording side are reduced and the data is no longer encapsulated, the problem of tight processing resources and memory resources of the airborne side equipment is significantly reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 is a schematic diagram showing the framework structure of a data storage and reading system in a preferred embodiment of the present invention;
[0010] Figure 2 A schematic diagram showing Figure 1 Schematic structure of the airborne audio and video recording equipment;
[0011] Figure 3 is a schematic diagram showing the data format structure of data encoding in the preferred embodiment;
[0012] Figure 4 A schematic diagram showing Figure 1 Schematic structure of the playback device on the read side;
[0013] Figure 5 It is a flow chart showing the steps of extracting data by the playback device. DETAILED DESCRIPTION
[0014] In the existing architecture, audio and video raw stream data is synchronously collected and encoded, and before storing the data, the collected audio and video need to be encoded and encapsulated into different file formats. It is not difficult to see that the problem of excessive burden on the airborne side caused by meeting the aforementioned continuity requirements is one of the main reasons for the relative concentration of source data collection, encoding and encapsulation functions in the existing architecture. On the playback side, the data extracted by the playback device is always encapsulated data. Therefore, when the encoding and encapsulation process of the source data is abnormal, the playback side cannot play back the abnormal encapsulated data.
[0015] Combining the above two aspects, the improvement attempt direction of the preferred embodiment of the present invention is to first decompose the relatively concentrated functions on the airborne side, and partially decompose the heavy processing tasks of the data acquisition device to the playback side device, that is, to improve the existing process of storing and reading after data encoding and packaging to directly storing after data encoding. In this way, even if the source data is incomplete due to various reasons (such as unexpected short-term power outage or interruption), since the data is encapsulated on the playback side, only part of the data during the power outage or interruption will be lost, and the entire encapsulated data can still be played correctly. However, the problem encountered by this easier-to-think-of improvement idea is that since the file formats of audio and video streams are not the same, the reason why encoding and packaging are required on the data acquisition side under the prior art is to distinguish the audio and video source data in the source data stream. If the packaging is completed by the playback device, it will appear that the reading device on the playback side cannot distinguish whether the data currently to be encapsulated is an audio or video file, and it is necessary to introduce other means to distinguish the source data. The difficulty of this differentiation method is that, according to the improved architecture, the airborne recording equipment stores only source data. Since the operation time of the aircraft is relatively long, the amount of subsequent data analysis is extremely large. The method of storing first and then differentiating is prone to data segmentation errors. The occurrence of power outages will increase the probability of data segmentation errors.
[0016] With reference to the above-mentioned transformation difficulties, the preferred embodiment of the present invention further realizes that a means should be sought to resolve the problem of differentiating audio and video source data before packaging, thereby avoiding the problem of data resolution during playback by the reading device.
[0017] Embodiments of the present invention will be described below with reference to the accompanying drawings. It will be appreciated by those skilled in the art that the described embodiments may be modified in various ways without departing from the spirit and scope of the present invention. Therefore, the drawings and description are illustrative in nature and are not intended to limit the scope of protection of the claims. In addition, in this specification, the drawings are not drawn to scale and the same reference numerals represent the same parts.
[0018] It should be noted that the expressions “first” and “second” used in the embodiments of the present invention are intended to distinguish two non-identical entities with the same name or non-identical parameters. It can be seen that “first” and “second” are only for the convenience of expression and should not be understood as limitations on the embodiments of the invention. The subsequent embodiments will not explain this one by one.
[0019] In a preferred embodiment of the present invention, there is provided Figure 1 The data storage and reading architecture shown in the figure includes an audio and video recording device that receives source file input, an electronic disk as a storage medium, and a playback device that extracts data stored in the electronic disk and reads and packages it. The overall idea of this architecture is to distinguish audio and video files on the airborne audio and video recording device and store them in different areas of the storage medium. When reading, the extracted source data is packaged in a corresponding manner according to the different partitions on the storage medium, and finally output in a unified file format.
[0020] Specifically. Figure 2 A schematic diagram showing Figure 1 Schematic structure of the airborne audio and video recording device. As shown in the figure, the audio and video recording device collects the execution environment and the audio in the environment in real time, and encodes the two source data streams respectively. Here, taking the cabin as an example, the audio and video recording device usually includes a voice input device (for example, a microphone) and a video device (for example, a camera), so that the final audio file mainly refers to the voice input received by the microphone device in the cockpit, and the video file mainly refers to the video file formed by the camera shooting the cabin scene. Subsequently, the audio data stream is encoded into AAC format data (Advanced Audio Coding), and the video data stream is encoded into H265 format. It can be seen that the audio and video recording device on the airborne side directly stores the raw stream data, and no longer encapsulates and writes files to the data. Therefore, even if an abnormal power outage or interruption occurs, the encapsulated file on the playback side can still be played normally.
[0021] Next, the storage area of the storage medium is divided. Depending on the different operating systems executed, the corresponding partitioning method can be selected for regional division. For example, in the win system, the disk partitioning tool is used to divide the entire storage space into a first area for storing audio data streams and a second area for storing video data streams, or a part of the storage space is divided into the aforementioned first area and second area. In some special scenarios, the audio data stream and the video data stream can be allocated to different block disks or different storage media in a block manner. For another example, in an embedded linux system, according to the same partitioning idea, after completing the corresponding encoding, the write() method is called to write the encoded H265 format video data stream into the sector of the first partition, and the encoded AAC format audio data stream is written into the sector of the second partition. In fact, those skilled in the art can select a variety of known partitioning methods to distinguish the storage areas of the storage medium according to the guidance of the preferred embodiment of the present invention.
[0022] However, it is still necessary to instruct the audio and video recording device how to store the audio and video files in the corresponding area. In order to achieve the technical purpose, the preferred embodiment introduces different identification codes to distinguish the audio data stream and the video data stream in the encoding. Figure 3 The schematic diagram shows the data format structure of the data encoding in the preferred embodiment. As shown in the figure, the overall data format includes four parts, a frame header identification part with a length of eight bits, a frame length indication part with a length of four bits, a conversion information part with a length of three bits, and a frame data part of several bits.
[0023] In the frame header identification part, different identifications are selected as frame headers for the audio data stream and the video data stream. Obviously, when selecting, those skilled in the art can arbitrarily select different identifications according to coding habits to distinguish the audio data stream from the video data stream. For example, in this preferred embodiment, the frame header identification of the audio data stream is "FF AB CD EFFE DC BA FF", and the frame header identification of the video data stream is "AA BB CC DD EE FF EE DD". In this way, the audio data and video data in the data stream are distinguished by the frame header identification.
[0024] The three-bit conversion information includes a 1-bit conversion code and two-bit codes for identifying the starting position of the data and the conversion length, respectively. Among them, the three-bit conversion information is randomly generated, and the data stored in the bit frame data will be converted according to the aforementioned three-bit randomly generated conversion information. For example, the three-bit conversion information is randomly configured as: "A0 11 22", which means that starting from the 0x11 position of the frame data, the part with a length of 0x22 is converted, and each byte of data therein is XORed with 0xA0 to obtain the converted data. At this point, after the audio and video recording device performs corresponding encoding on the data stream, it stores the data in the corresponding area of the storage medium according to the different frame header identifiers. In this way, the technical purpose of the preferred embodiment of the present invention to distinguish and store data is completed.
[0025] The data is then extracted by the device on the playback side. Figure 4 , Figure 4 Shows Figure 1 The schematic structure of the playback device on the read side is shown in the figure. The playback device interacts with the storage medium to achieve data interaction. The playback device extracts data from the corresponding partition of the storage medium and outputs it in a unified file format after packaging. For details, see Figure 5 , Figure 5 The flowchart shows the steps of the playback device extracting data. The playback software traverses the partitions (sectors) of the storage medium to extract a data stream. First, the currently extracted data stream is identified as audio data or video data according to the frame header identification code. For example, it can be first verified according to the audio frame header set by the implementation (FF AB CD EF FE DC BA FF in the preferred embodiment). If the verification result is true, it is judged as an audio data stream. If the verification structure is no, then the video frame header (AA BB CC DD EE FF EE DD in the preferred embodiment) is verified. If the verification is still no, it represents a data extraction error. For the video stream judged as audio or video, according to the conversion information in the data, select a number of bits of data starting from the corresponding position, and convert them in the manner specified by the conversion information to obtain the original audio frame or the original video frame, and finally encapsulate it into a file in MP4 format as output, and the above process is repeated until all data streams are extracted from the storage medium.
[0026] In the preferred embodiment, the playback device is developed using QT of the win system. In this system, to read a specific partition under a drive letter, it is only necessary to obtain the disk handle through the corresponding file name, and then read it through the function ReadFile. After extracting the audio and video data, the ffmpeg library is used to encapsulate the audio and video files. In order to improve the playback effect, a common method can be selected to encapsulate one channel of H265 data and one channel of AAC data into a video file according to the standard MP4 video format. In this way, the ffmpeg library can be used to encapsulate the audio data and video data into the standard video file format "MP4, AVI, MKV", and the playback software calls the mpv playback kernel to realize the decoding, playback and playback control of the video.
[0027] Compared with the prior art, the beneficial technical effect that can be achieved by implementing the technical solution of the present invention is: when dealing with power outages or power outages, the recording device on the airborne side no longer encapsulates the data after encoding, but the playback device on the reading side distinguishes the data before encapsulating it, which will not affect the playback of the audio and video data streams. At the same time, since the continuity requirements on the recording side are reduced and the data is no longer encapsulated, the problem of tight processing resources and memory resources of the airborne side equipment is significantly reduced.
[0028] The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention patent shall be subject to the attached claims.
Claims
1. A data storage and reading method, the method is used to store airborne data and read airborne data from a storage medium, the method comprising the following steps: The step of configuring a recording device and a reading device, and configuring the recording device and the reading device to share data with at least one storage medium; The recording device is configured to receive a first data stream and a second data stream in a scene, and encode the first data stream and the second data stream according to different encoding methods to obtain first encoded data and second encoded data; Dividing the entire or a part of the storage area of at least one storage medium to obtain at least one first storage area corresponding to the first coded data and at least one second storage area corresponding to the second coded data; The storage medium stores the first coded data and the second coded data in corresponding storage areas; The reading device traverses the storage area of the storage medium, distinguishes the first coded data from the second coded data, restores the data according to the conversion information in the coded data, and encapsulates the restored data into a unified format for output.
2. The data storage and reading method according to claim 1, wherein: The steps of configuring the first data stream and the second data stream and obtaining the first coded data and the second coded data are specifically as follows: A voice input device and a camera are configured to form the recording device, wherein the voice device records audio data in the scene as the first data stream, and the camera captures video data in the scene as the second data stream; The first data stream is encoded into an audio format, and the second data stream is encoded into a video format to obtain the first encoded data and the second encoded data.
3. The data storage and reading method according to claim 2, wherein: The encoding steps for the first data stream and the second data stream are specifically as follows: The first data stream and the second data stream are encoded so that the encoded frame data also includes a frame header identifier, a frame length, and conversion information, and the first encoded data and the second encoded data are configured to have different frame header identifiers, wherein: The conversion information at least includes an identifier for identifying a starting position of the frame data, an identifier for identifying a length of the frame data, and an identifier indicating encrypted data.
4. The data storage and reading method according to claim 3, wherein: The conversion information is randomly generated data.
5. The data storage and reading method according to claim 4, wherein: The step of the reading device distinguishing the first coded data from the second coded data is specifically as follows: the reading device determines whether the read data is the first coded data or the second coded data according to the frame header identifier.
6. The data storage and reading method according to claim 1, wherein: The method also includes the step of calling a library file to play the output of the reading device.
7. A data storage and reading system, the system being used to execute the method according to any one of claims 1 to 6, storing and replaying audio and video data in an airborne environment, wherein: The system includes: A recording device, the recording device comprising a voice input device and a camera device, the voice device recording audio data in a scene as the first data stream, the camera device capturing video data in the scene as the second data stream; and the recording device respectively encodes the first data stream and the second data stream to form first encoded data and second encoded data with different frame header identifiers; A storage medium, wherein a storage area of the storage medium at least includes a first storage area corresponding to the first data stream and a second storage area corresponding to the second data stream; A reading device, which traverses the storage area of the storage medium, reads the first encoded data or the second encoded data, converts the encoded data according to the conversion information contained in the encoded data, and then encapsulates the converted data together to form a data file in a unified format; and the reading device calls a library to output and play the data file.
Citation Information
Patent Citations
Multichannel synchronous storage and playback method for cockpit audio and video recorder
CN106791534A
Video data storage, reading method and video data storage device
CN109246377A
QT-based audio and video stream pushing method, apparatus and device, and storage medium
CN110650307A
Video coding real-time evaluation and playing tool
CN111510766A
Method and system for video storage, preview and playback of network camera
CN117459771A