Storage method, storage device and storage medium for sonar data files
By generating and packaging the file header data and frame data of the sonar detection system, the compatibility, scalability and logic of the data file format of the sonar device are solved, unified architecture and efficient interpretation are achieved, and sonar promotion is promoted.
Patent Information
- Application Number
- CN202210738379.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-27
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2042-06-27
AI Technical Summary
In the prior art, the data file format of sonar devices has compatibility, scalability and logic problems, resulting in large workloads of file interpretation, weak scalability and difficulty in promoting.
By obtaining the original data of the sonar detection system, the file header data and frame data are generated, and packaged into modular data files according to the preset structure to achieve file compatibility, scalability and logic.
It realizes a unified architecture of different types of sonar data files, improves compatibility and scalability, simplifies the file interpretation process, and facilitates sonar promotion and secondary development.
Smart Images

Figure CN115017102B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of signal generator circuit design, and in particular to a storage method, storage device and storage medium for sonar data files. Background Art
[0002] When performing underwater detection tasks, multiple sonar devices are often required to work together, such as side-scan sonar, downward-looking multi-beam sonar, forward-looking sonar, etc., which causes several problems:
[0003] (1) Compatibility issues. The data files of various sonars are often not unified, and various types of data require various interpretation and processing software. If the file format compatibility is good, it can be used in various types of software, reducing the workload of file interpretation. If the file format compatibility is poor, the types of software that can be applied are small, resulting in a large workload of file interpretation, which is not conducive to the promotion of sonar.
[0004] (2) Scalability issues. With the improvement of signal processing and hardware capabilities, the performance, data format, and results of sonar are also constantly upgrading. If the file format is not properly defined, the file format will be modified too many times and the scalability will be weak.
[0005] (3) Logical issues. There are many types of sonars, many operating scenarios, and a large number of working parameters involved. A sonar file format with strong logic will make sonar data easy to interpret and facilitate sonar promotion and secondary development. If the sonar file format has weak logic, it will be difficult for third parties to parse it when developing related software, making sonar promotion difficult.
[0006] Therefore, there is an urgent need for a storage method for modular data files of a sonar detection system to solve the technical problems of compatibility, scalability and logic existing in the prior art. Summary of the invention
[0007] In order to solve the above problems, the purpose of this application is to provide a storage method, storage device and storage medium for sonar data files, which are used to be compatible with various sonar product data file formats, so that the file format has better "compatibility", "extensibility" and "logic".
[0008] In order to achieve the above technical objectives, the present application provides a method for storing sonar data files, which is characterized by comprising the following steps:
[0009] Acquire raw sonar data of the sonar detection system, and generate file header data according to device parameter information of the sonar detection system;
[0010] Generate frame data according to the raw sonar data;
[0011] The file header data and the frame data are combined to generate a modular data file of the raw sonar data for storage.
[0012] Optionally, before the step of combining the file header data and the frame data, the step includes:
[0013] The file header data and the frame data are packaged according to a preset structure to generate a file header block and a frame block respectively, wherein the preset structure includes at least one of the following:
[0014] A block header identifier used to indicate the start of a block;
[0015] A block length identifier used to indicate the length of the block;
[0016] A block content identifier used to represent the logic of the block content;
[0017] A block content description used to represent the physical meaning of the block content;
[0018] A block content code for representing block content data;
[0019] The end of the block content marker used to indicate the end of the block content;
[0020] The end of block marker is used to indicate the end of the block.
[0021] Optionally, the step of generating frame data according to the original sonar data includes:
[0022] In response to acquiring raw sonar data of a preset period length, extracting time information;
[0023] Generate a frame header block and a frame tail block that can verify each other according to the time information;
[0024] Generate a block in a frame according to the raw sonar data of the preset period length;
[0025] The frame header block, the frame tail block and the frame mid-block are combined into a data frame.
[0026] Optionally, the step of generating blocks in frames according to the raw sonar data of the preset period length comprises at least one of the following:
[0027] Generate a data block according to the sonar echo data in the original sonar data of the preset period length;
[0028] Generate a sensor block according to the sensor information in the raw sonar data of the preset period length;
[0029] An additional block is generated according to the additional information in the original sonar data of the preset period length.
[0030] Optionally, according to the storage logic, the storage method includes at least one of the following:
[0031] The file header block, frame header block, additional block, and frame tail block are structural blocks;
[0032] The data block is an array block;
[0033] The sensor block is a string block.
[0034] Optionally, the step of combining the file header data and the frame data to generate a modular data file of the original sonar data comprises:
[0035] The file header block is connected to the data frame to generate the modular data file.
[0036] Optionally, the step of connecting the file header block with the data frame includes:
[0037] In response to acquiring a plurality of data frames, respectively extracting frame numbers of the plurality of data frames;
[0038] The multiple data frames are connected after the file header block according to the frame number sequence.
[0039] Optionally, the step of generating frame data according to the original sonar data includes:
[0040] Generate the frame data according to the data dimension, data type, and array arrangement of the original sonar data, wherein the data type consists of a type and a number of bits, and the type includes a floating point type and an integer type;
[0041] Optionally, the step of generating frame data according to the original sonar data includes:
[0042] The frame data is generated according to a dimension priority principle.
[0043] On the other hand, the present application also provides a storage device for sonar data files, comprising a processor and a memory connected to the processor;
[0044] The memory stores a computer program;
[0045] The processor is used to execute the computer program read from the memory to implement the storage method for sonar data files as described above.
[0046] On the other hand, the present application also provides a storage medium. Specifically, the storage medium stores a computer program, and when the computer program is executed by a processor, the storage method for sonar data files as described above is implemented.
[0047] This application discloses the following technical effects:
[0048] (1) Better compatibility: This means that the data files generated by different types of sonars have a unified architecture and can be applied to a variety of sonar hardware and software.
[0049] (2) Better scalability: This means that when a new sonar product is launched, the sonar data it generates still conforms to this architecture. At the same time, the old version of the program can basically process files in the new format, and the new version of the program can basically process files in the old version.
[0050] (3) Better logic: This means that the files generated by this format have clear logic, which is easy for users to read and use, and convenient for third parties to conduct secondary development. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0052] Figure 1 A flow chart of a storage method according to an embodiment of the present application;
[0053] Figure 2 A diagram showing the organizational structure of the documents described in this application;
[0054] Figure 3 This is a schematic diagram of the organizational structure of the sonar file described in this application. DETAILED DESCRIPTION
[0055] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0056] The present application provides a method for storing modular data files for a sonar detection system. Figure 1 This is a flow chart of a storage method according to an embodiment of the present application.
[0057] Please refer to Figure 1 In one embodiment, a method for storing modular data files for a sonar detection system comprises the following steps:
[0058] S10: acquiring raw sonar data of the sonar detection system, and generating file header data according to device parameter information of the sonar detection system.
[0059] S20: Generate frame data according to the original sonar data.
[0060] S30: Combining the file header data and the frame data to generate a modular data file of the original sonar data for storage.
[0061] The raw sonar data mentioned in this application includes sonar echo data, demodulation data, beam data, and GPS data and inertial navigation data corresponding to the sensor. By combining the file header and frame data to form a standardized data file, the compatibility, scalability and logic of the sonar data can be achieved.
[0062] Further preferably, the step of combining the file header data and the frame data includes:
[0063] The file header data and the frame data are packaged respectively according to the preset structure to generate a file header block and a frame block respectively.
[0064] Further preferably, the preset structure may include:
[0065] A block header that indicates the start of a block.
[0066] Further preferably, the preset structure may include:
[0067] A block length identifier used to indicate the length of the block.
[0068] Further preferably, the preset structure may include:
[0069] Block content identifier used to represent the logic of block content.
[0070] Further preferably, the preset structure may include:
[0071] A block content description used to represent the physical meaning of the block content.
[0072] Further preferably, the preset structure may include:
[0073] A block content code used to represent the block content data.
[0074] Further preferably, the preset structure may include:
[0075] The end of the block content marker used to indicate the end of the block content.
[0076] Further preferably, the preset structure may include:
[0077] The end of block marker is used to indicate the end of the block.
[0078] The sonar data is packaged using a unified and standardized block structure to form standardized sonar data.
[0079] Further preferably, the step of generating frame data according to the original sonar data comprises:
[0080] In response to obtaining raw sonar data of a preset period length, time information is extracted; based on the time information, a frame header block and a frame tail block that can be verified with each other are generated; based on the raw sonar data of the preset period length, a mid-frame block is generated; and the frame header block, the frame tail block and the mid-frame block are combined into a data frame.
[0081] Exemplarily, each frame consists of several blocks, the first of which is the "frame header block" and the last block is the "frame tail block", with several different types of blocks in between. The content of the "frame header block" stores the main information of the current frame, including: frame number, date, time, etc., with time accuracy to milliseconds. The content of the "frame tail block" stores the frame number information of the current frame, which can be cross-checked with the frame header block.
[0082] Further preferably, the step of generating blocks in a frame according to the original sonar data of a preset period length may include:
[0083] A data block is generated according to the sonar echo data in the original sonar data of a preset period length.
[0084] Further preferably, the step of generating blocks in a frame according to the original sonar data of a preset period length may include:
[0085] A sensor block is generated according to the sensor information in the raw sonar data of a preset period length.
[0086] Further preferably, the step of generating blocks in a frame according to the original sonar data of a preset period length may include:
[0087] The additional block is generated according to the additional information in the original sonar data of the preset period length.
[0088] Exemplarily, a frame is a combination of multiple blocks, and each frame may contain the following blocks: frame header block, frame tail block, data block, additional block, sensor block, bottom measurement block, etc., among which the required blocks are frame header block and frame tail block, and other blocks are selected as needed.
[0089] Further preferably, according to the storage logic, the storage method may include:
[0090] The file header block, frame header block, additional block, and frame trailer block are structural blocks.
[0091] Further preferably, according to the storage logic, the storage method may include:
[0092] The data block is an array block.
[0093] Further preferably, according to the storage logic, the storage method may include:
[0094] The sensor block is a string block.
[0095] Exemplarily, the file header block, frame header block, additional block, and frame tail block are structure blocks; the data block is an array block, and the sensor block is a string block. However, the present application is not limited thereto, and the type of the content of the block can be changed in some special cases. The sonar data is packaged into a block structure, so that standardized data combination and processing can be performed in various ways.
[0096] Further preferably, the step of combining the file header data and the frame data to generate a modular data file of the original sonar data comprises:
[0097] Concatenate the file header block with the data frame to generate a modular data file.
[0098] Exemplarily, a sonar file consists of a file header and a plurality of data frames, and each period of sonar data corresponds to a data frame stored in the file.
[0099] Further preferably, the step of connecting the file header block with the data frame comprises:
[0100] In response to acquiring multiple data frames, frame numbers of the multiple data frames are respectively extracted; and the multiple data frames are connected after the file header block according to the sequence of the frame numbers.
[0101] Exemplarily, the frame header block and the frame tail block of each frame store frame number information, so when the frames are combined, they can be arranged in the order of the frame numbers.
[0102] Further preferably, the step of generating frame data according to the original sonar data comprises:
[0103] Frame data is generated according to the data dimension, data type, and array arrangement of the original sonar data, where the data type consists of a type and a number of bits, and the types include floating point and integer.
[0104] Further preferably, the step of generating frame data according to the original sonar data comprises:
[0105] Generate frame data according to the dimension priority principle.
[0106] Exemplarily, the data block stores sonar echo data, and the content of this type of data block is mainly an array, which may include the following information: the dimension of the array, the size of each dimension, the data type of each sampling point, and the arrangement of the array.
[0107] The data type of the sampling point consists of its type and the number of bits. The types include floating point and integer, and the number of bits is typically 16 bits, 32 bits, 64 bits, etc.
[0108] The arrangement of an array refers to the priority of which dimension when the array is two-dimensional or higher. Typical examples include "arrange by rows" and "arrange by columns".
[0109] Figure 2 A diagram showing the organizational structure of the documents of this application; Figure 3 This is a schematic diagram of the organizational structure of the sonar file of this application.
[0110] Please refer to Figure 2-Figure 3 , the method mentioned in this application includes the following features:
[0111] (1) The basic component of each file is a "block";
[0112] (2) Each “block” has the same organizational structure, i.e., it consists of several parts;
[0113] (3) Each "block" stores an independent type of data;
[0114] (4) Each file consists of a file header block and several data frames;
[0115] (5) Each "data frame" consists of several blocks, the first of which is the "frame header block" and the last block is the "frame tail block", with several other types of blocks in between.
[0116] (6) In each data frame, in addition to the first and last frame header blocks and frame trailer blocks, other blocks store various types of data, such as sonar echo data, demodulation data, beam data, GPS data corresponding to the sensor, inertial navigation data, etc. Each type of data can be freely selected according to actual conditions.
[0117] The specific description of the above features is as follows: The basic elements of the sonar data file format are stored in a structured block manner.
[0118] A file consists of several "blocks" connected sequentially.
[0119] Each "block" consists of several parts, including fixed-length fields such as block identification, length, definition, description, block end identification, etc., as well as the main block content, but the length is not fixed.
[0120] Each "block structure" stores content in three logical ways: array, string or structure. That is, according to the different contents, there are three major types of blocks: array block, string block and structure block.
[0121] Pay attention to distinguish the two parts of the block content identification and block content description. They both distinguish the content stored in this block, but their starting points are different. The two are combined to describe the content in the block.
[0122] Block content identifiers are distinguished based on the logic of the block content, namely arrays, structures, and strings.
[0123] The block content description is differentiated according to the physical meaning of the block content, such as frame header block, frame trailer block, original data block, etc.
[0124] System composition: This application is a modular file format.
[0125] This file format can store mainstream data in most current sonar systems.
[0126] A file consists of several "blocks" connected sequentially.
[0127] The components of a block structure are shown in Figure 1:
[0128] Table 1
[0129] Serial number type byte name 1 Uint16 2 Block header identification 2 Uint32 4 Block length 3 Uint16 2 Block Content Identifier 4 Uint32 4 Block Content Description 5 several Block Content 6 Uint16 2 Block content end marker 7 Uint16 2 Block end mark
[0130] Sonar files consist of a file header and several data frames. Each period of sonar data corresponds to a data frame stored in the file. A data frame is a combination of blocks. Each data frame contains the following blocks: frame header block, frame tail block, data block, additional block, sensor block, bottom measurement block, etc. Some of the blocks are frame header blocks and frame tail blocks, and other blocks can be called frame blocks. The frame blocks can be selected as needed. The specific organization of sonar files is as follows: Figure 2 shown.
[0131] In most cases, the file header block, frame header block, additional block, and frame tail block are structure blocks; the data block is an array block, and the sensor block is a string block. However, this convention is not fixed, and the type of the block content can be changed in some special cases.
[0132] In one embodiment, a side scan sonar uses this modular data file storage method to store the original echo data of the sonar, wherein the content of the "file header block" stores various types of sonar information, including:
[0133] (1) Equipment information: sonar type, sonar model, sonar serial number, and storage master data type.
[0134] (2) Operating parameters: operating mode, synchronization mode, signal type, center frequency, signal bandwidth, signal pulse width, transmission power, duty cycle, minimum range, maximum range, TVG parameter A, TVG parameter B, TVG parameter C, TVG parameter D, system sampling rate, etc.
[0135] The content of the "frame header block" stores the main information of the current frame, including: frame number, date, time, etc., with the time accurate to milliseconds.
[0136] The content of the "frame tail block" stores the frame number information of the current frame, which can be cross-checked with the frame header block.
[0137] In this example, the "data block" stores sonar echo data. The main content of this type of data block is an array, which can include the following information: the dimension of the array, the size of each dimension, the data type of each sampling point, and the arrangement of the array.
[0138] The data type of the sampling point consists of its type and the number of bits. The types include floating point and integer, and the number of bits is typically 16 bits, 32 bits, 64 bits, etc.
[0139] The arrangement of an array refers to the principle of dimension priority when the array is two-dimensional or higher. Typically, if you set "arrange by row" or "arrange by column", the data will be arranged according to the preset priority dimension.
[0140] This example may include multiple types of sensor blocks, such as satellite navigation data blocks, inertial navigation data blocks, and sound speed information data blocks. Most of the above sensor information exists in the form of strings. And because the sensor data frame rate is generally higher than the sonar data frame rate, multiple strings can be stored in one type of sensor block.
[0141] If a sensor block is a string block, its content portion includes the following: the number of strings in the current frame, the length allocated to each string, the date and time of each string, the content of the string, and the like.
[0142] On the other hand, the present application also provides a storage device for sonar data files, comprising a processor and a memory connected to the processor;
[0143] The memory stores a computer program;
[0144] The processor is used to execute the computer program read from the memory to implement the storage method for sonar data files as described above.
[0145] On the other hand, the present application also provides a storage medium. Specifically, a computer program is stored on the storage medium. When the computer program is executed by a processor, the storage method for sonar data files as described above is implemented.
[0146] In the embodiments of the storage device and computer-readable storage medium provided in the present application, all technical features of any of the above-mentioned method embodiments may be included, and the expanded and explained contents of the specification are basically the same as those of the above-mentioned method embodiments, and will not be repeated here.
[0147] The storage method, storage device and storage medium disclosed in the present application have a unified architecture for data files generated by different types of sonars, and the data files can be applicable to a variety of sonar hardware and a variety of sonar software; when a new sonar product appears, the sonar data generated by it still conforms to the present architecture, and at the same time, it enables the old version of the program to basically process the files in the new format, and the new version of the program can basically process the old version of the files; the files generated in this format have clear logic, which is convenient for users to read and use, and is convenient for third parties to conduct secondary development.
[0148] It should be noted that in this article, step codes such as S10 and S20 are used for the purpose of expressing the corresponding content more clearly and concisely, and do not constitute a substantial limitation on the sequence. When implementing the step, those skilled in the art may execute S20 first and then S10, etc., but these should all be within the scope of protection of this application.
[0149] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0150] In the description of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the feature. In the description of the present application, "plurality" means two or more, unless otherwise clearly and specifically defined.
[0151] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for storing sonar data files, characterized in that: The following steps are involved: Acquire raw sonar data of the sonar detection system, and generate file header data according to device parameter information of the sonar detection system; Generate frame data according to the raw sonar data; combining the file header data and the frame data to generate a modular data file of the raw sonar data for storage; The step of generating frame data according to the original sonar data comprises: In response to acquiring raw sonar data of a preset period length, extracting time information; Generate a frame header block and a frame tail block that can verify each other according to the time information; Generate a block in a frame according to the raw sonar data of the preset period length; The frame header block, the frame tail block and the frame mid-block are combined into a data frame.
2. The method for storing sonar data files according to claim 1, characterized in that: The step of combining the file header data and the frame data includes: The file header data and the frame data are packaged according to a preset structure to generate a file header block and a frame block respectively, wherein the preset structure includes at least one of the following: A block header identifier used to indicate the start of a block; A block length identifier used to indicate the length of the block; A block content identifier used to represent the logic of the block content; A block content description used to represent the physical meaning of the block content; A block content code for representing block content data; The end of the block content marker used to indicate the end of the block content; The end of block marker is used to indicate the end of the block.
3. The method for storing sonar data files according to claim 2, characterized in that: The step of generating a block in a frame according to the raw sonar data of the preset period length comprises at least one of the following: Generate a data block according to the sonar echo data in the original sonar data of the preset period length; Generate a sensor block according to the sensor information in the raw sonar data of the preset period length; An additional block is generated according to the additional information in the original sonar data of the preset period length.
4. The method for storing sonar data files according to claim 3, characterized in that: According to the storage logic, the storage method includes at least one of the following: The file header block, frame header block, additional block, and frame tail block are structural blocks; The data block is an array block; The sensor block is a string block.
5. The method for storing sonar data files according to claim 2, characterized in that: The step of combining the file header data and the frame data to generate a modular data file of the original sonar data comprises: The file header block is connected to the data frame to generate the modular data file.
6. The method for storing sonar data files according to claim 5, characterized in that: The step of connecting the file header block with the data frame comprises: In response to acquiring a plurality of data frames, respectively extracting frame numbers of the plurality of data frames; The multiple data frames are connected after the file header block according to the frame number sequence.
7. The method for storing sonar data files according to any one of claims 1 to 6, characterized in that: The step of generating frame data according to the original sonar data comprises: Generate the frame data according to the data dimension, data type, and array arrangement of the original sonar data, wherein the data type consists of a type and a number of bits, and the type includes a floating point type and an integer type; And / or, generating the frame data according to a dimension priority principle.
8. A storage device for sonar data files, comprising a processor and a memory connected to the processor; The memory stores a computer program; The processor is used to execute the computer program read from the memory to implement the storage method for sonar data files according to any one of claims 1 to 7.
9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the method for storing sonar data files according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Deepwater multi-beam data storage format and access method
CN112328541A