Efficient data recording and playback method in a sonar signal processing system

By employing a hierarchical buffer architecture, adaptive buffer optimization, and intelligent storage strategies, the problems of wasted storage resources and poor playback fidelity in traditional sonar data systems have been solved, achieving efficient and reliable data acquisition, storage, and playback.

CN122240038APending Publication Date: 2026-06-19CHINA SHIP DEV & DESIGN CENT
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-21
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

Traditional sonar data systems cannot intelligently adapt storage strategies according to mission scenarios, resulting in wasted storage resources, risks to critical data security, and poor playback authenticity.

Method used

By adopting a hierarchical buffer architecture, an adaptive buffer optimization mechanism, and an intelligent storage strategy, combined with hardware timestamps and multi-level time-series synchronization mechanisms, dynamic configuration and high-fidelity reconstruction of data acquisition, storage, and playback are achieved.

Benefits of technology

It significantly reduces data acquisition latency, improves storage resource utilization efficiency, ensures data reliability and high fidelity in playback, and enhances the value of data for later use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122240038A_ABST
    Figure CN122240038A_ABST
Patent Text Reader

Abstract

This invention discloses an efficient data recording and playback method in a sonar signal processing system, belonging to the field of sonar data management technology. The method includes the following steps: First, multi-channel sonar data is acquired in real time using parallel reception and ring buffering technology, and high-precision clock synchronization and timestamp marking are performed. Second, a scene recognition mechanism is introduced. The system automatically identifies the current working scene based on preset rules or real-time analysis and dynamically selects a matching storage mode. Different modes correspond to different data compression, redundancy backup, and verification strategies, achieving intelligent optimization of storage resources. Finally, in the playback stage, the system performs precise time positioning and synchronous reconstruction of multi-channel data based on timestamps, ensuring high fidelity and temporal consistency of the playback data. This invention achieves adaptive optimization of the entire process of sonar data acquisition, storage, and playback, significantly improving the overall system performance, data security, and playback quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of sonar data management technology, specifically relating to an efficient data recording and playback method in a sonar signal processing system. Background Technology

[0002] As a core component of underwater detection, navigation, communication, and target identification, sonar systems rely heavily on data acquisition, storage, and post-processing analysis for underwater situational awareness, equipment performance evaluation, and training. With the development of sonar technology, modern sonar systems are evolving towards multi-element, wideband, and high sampling rate architectures, leading to an exponential increase in data volume. This presents unprecedented challenges to the real-time performance, reliability, and intelligence of data acquisition, storage, and management.

[0003] Currently, traditional sonar data acquisition and storage systems typically employ fixed data processing and storage strategies. Regardless of the system's operational scenario (e.g., high-value target precision tracking, large-scale hydrological environmental mapping, or high-resolution seabed imaging), the system uses a uniform compression algorithm, storage format, and backup mechanism. This "one-size-fits-all" approach has significant drawbacks: First, in non-critical mission scenarios (such as routine training), using the same lossless or low-loss storage strategy as for critical missions results in a huge waste of storage space, shortens the system's continuous operating time, and increases the burden of data management. Second, when dealing with critical targets or important tasks, a fixed storage strategy may lead to excessively high compression rates or insufficient redundancy protection, increasing the risk of loss or damage to critical data details and failing to meet high reliability requirements. Finally, during data playback, due to the lack of metadata information associated with the acquisition scenario and storage strategy, as well as potential time synchronization errors, it is difficult to accurately and realistically reproduce the temporal and spatial relationships of the original detection scenario, affecting the accuracy and reliability of subsequent analysis.

[0004] While some existing technologies focus on optimizing data compression algorithms or improving storage hardware performance, there is a lack of comprehensive solutions that integrate and intelligently adapt front-end task scenarios, mid-end adaptive storage strategies, and back-end high-fidelity playback from a system top-level design perspective.

[0005] Therefore, there is an urgent need for a sonar data management system that can intelligently perceive mission scenarios, dynamically configure storage resources, and ensure that data can be accurately reconstructed and replayed, in order to cope with the complex and ever-changing underwater mission requirements and maximize data value and optimize system performance. Summary of the Invention

[0006] In view of this, the purpose of this invention is to provide an efficient data recording and playback method in a sonar signal processing system, which solves the problems in the prior art where traditional sonar data systems cannot intelligently adapt storage strategies according to the task scenario, resulting in wasted storage resources, risks to critical data security, and poor playback authenticity.

[0007] To achieve the above objectives, the present invention provides the following technical solution: This invention discloses an efficient data recording and playback method in a sonar signal processing system, comprising the following steps: S1. Data Acquisition: Through the direct hardware access mechanism in user mode, sonar signal data streams from multiple heterogeneous data sources are received in parallel, including at least a first type of data stream transmitted through a network interface and a second type of data stream transmitted through a high-speed serial interface. S2. Data preprocessing and buffering: The received sonar signal data stream is preprocessed in real time and temporarily stored using a hierarchical buffering architecture, which includes a real-time buffering layer based on the processor's internal cache and a historical buffering layer based on external storage devices. S3. Persistent Data Storage: The buffered sonar signal data is written to a non-volatile storage medium through a high-speed storage interface, and the timestamp information and source identification information of the data are maintained during the storage process. S4. Data Playback and Reconstruction: Sonar signal data is read from the storage medium according to the playback instruction, reconstructed into a data stream conforming to the original transmission format, and the synchronous playback of multi-channel data is controlled by a timing synchronization mechanism, which includes transmission interval control based on a high-precision clock and multi-channel synchronization control based on timestamp alignment.

[0008] Furthermore, the reception of the first type of data stream transmitted through the network interface adopts a mechanism combining user-space polling and zero-copy. Specifically, it includes: configuring a ring buffer in user space, the network interface controller writing the received data packets into the ring buffer through direct memory access, and the application reading data directly from the ring buffer through polling, thus avoiding data copying operations between kernel space and user space. The reception of the second type of data stream transmitted through the high-speed serial interface adopts a block transmission mechanism based on direct memory access. Specifically, it includes: configuring a scatter-collection list for the high-speed serial interface controller, the controller directly writing the received data blocks into multiple pre-allocated non-contiguous memory regions according to the list, and the processor accessing them uniformly through memory mapping. The reception of the first and second type of data streams is performed in parallel, and each data block is marked with a precise reception timestamp through a hardware timestamp mechanism.

[0009] Furthermore, the hierarchical buffer architecture employs a dynamically configurable multi-level buffering strategy, including: The first-level processor internal buffer layer is configured as multiple parallel cache queues, each queue corresponding to a data source or data type. The size of the cache queue is dynamically adjusted according to the real-time bandwidth of the data stream. The second-level external storage buffer layer adopts an intermediate storage device based on non-volatile dual in-line memory modules (NVDIMM), configured as a circular buffer structure. The circular buffer is divided into multiple logical segments, and each logical segment stores sonar signal data within a specific time window. The buffer management unit monitors the fill status and data flow characteristics of each level of buffer in real time. When the fill level of the first-level buffer exceeds the first threshold, it initiates batch data transmission to the second-level buffer. When a data flow burst is detected, it dynamically allocates temporary buffer areas. The second-level buffer and the first-level buffer maintain data synchronization through a cache consistency protocol to ensure that data is not lost in the event of system anomalies.

[0010] Furthermore, the sonar signal processing system includes an adaptive buffer optimization mechanism based on sonar signal characteristics: The signal feature analysis unit analyzes the time-frequency characteristics of the sonar signal in real time to identify the signal's operating mode, which includes at least three modes: search mode, tracking mode, and identification mode. The buffer strategy adjustment unit dynamically adjusts the buffer parameters according to the identified operating mode, including: in search mode, configuring a large-capacity buffer and low-priority storage to completely record wide-beam search data; in tracking mode, configuring a high-speed buffer and real-time storage to prioritize continuous data recording of the tracked target; and in identification mode, configuring a high-precision buffer and labeled storage to focus on recording data of suspected targets. The adaptive buffer optimization mechanism also includes a learning function, training a buffer parameter adjustment model using historical data to enable the buffer strategy to predictively adapt to changes in the sonar operating mode.

[0011] Furthermore, persistent data storage specifically includes the following steps: Storage interface optimization: It adopts a high-speed expansion bus based on PCIe 4.0 or higher, configured in a multi-channel parallel transmission mode, with each channel independently transmitting different types or priorities of sonar data; Storage device management: Multiple NVMe solid-state storage devices are used to form a redundant array. A striped write strategy is adopted to distribute data across multiple devices, while maintaining an independent write queue and completion queue for each device. Data organization optimization: The stored data is organized according to the time series and spatial series of sonar signals, and a multi-dimensional index structure is established, which includes a time dimension index, a beam dimension index, and a frequency dimension index. Storage reliability assurance: Implement end-to-end data integrity verification, generate cyclic redundancy check codes when writing data, and verify them when reading; implement wear leveling algorithms to extend the life of storage devices, and automatically migrate frequently accessed hot data.

[0012] Furthermore, the sonar signal processing system also includes an intelligent storage optimization mechanism based on the sonar mission scenario: The scene recognition unit identifies the current mission scene based on the sonar system's operating parameters and environmental information. The mission scenes include at least: anti-submarine search scene, mine detection scene, communication relay scene, and marine survey scene. The storage policy engine dynamically adjusts storage parameters based on the identified scenarios, including: In anti-submarine search scenarios, a highly reliable storage mode is adopted, and triple backups are implemented for data suspected of submarine contact, with real-time redundancy removal processing enabled. In the scenario of mine detection, a high-precision storage mode is adopted to perform lossless compression on sonar image data, and the storage resolution is no less than 99% of the original data; In communication relay scenarios, a streaming storage mode is adopted, which organizes data packets to optimize random access performance. In marine survey scenarios, a large-capacity storage mode is adopted, and a lossy compression algorithm is enabled to maximize storage capacity while ensuring the validity of scientific data. The intelligent storage optimization mechanism also includes a scenario prediction function, which predicts the timing of scenario switching based on task plans and historical patterns, and prepares for switching storage strategies in advance.

[0013] Furthermore, the timing synchronization mechanism includes a multi-level synchronization strategy: The first layer is absolute time synchronization, which ensures that the time base of the playback data is consistent with the original data by maintaining a fixed phase relationship between the system playback clock and the data recording timestamp. The second layer is relative time synchronization, which controls the playback transmission interval by calculating the time interval between data blocks, thus simulating the time characteristics of the original data. The third layer is multi-channel phase synchronization, which uses phase-locked loop technology to align the clock phases of multiple playback channels to ensure the correct relative timing relationship between channels; The timing synchronization mechanism also includes a dynamic adjustment function, which monitors the performance status of the playback system in real time. When clock drift or buffer underload / overload is detected, the playback rate is dynamically adjusted. The adjustment strategies include: gradual adjustment, jump adjustment, and interpolation compensation adjustment. The synchronization accuracy monitoring unit continuously evaluates the synchronization error, and triggers synchronization recalibration when the error exceeds the threshold.

[0014] The beneficial effects of this invention are as follows: 1. Through user-space direct hardware access, zero-copy, DMA, and parallel reception architecture, the latency and CPU overhead of data acquisition are significantly reduced, supporting high-bandwidth data streams. Simultaneously, combined with a hardware timestamp mechanism, a unified time reference with nanosecond-level precision is provided for sonar signal data from different interfaces, solving the time alignment problem of multi-source data at the acquisition end and laying the foundation for subsequent processing and fusion. 2. By introducing a hierarchical buffering and dynamic storage strategy based on sonar signal characteristics and task scenario identification, the system can dynamically optimize the data reliability, recording accuracy, storage capacity, and access speed according to the needs of different scenarios such as anti-submarine search and mine detection. This overcomes the limitations of traditional fixed strategies, allowing limited computing and storage resources to focus more on key data, thereby improving the overall task relevance and efficiency of the data recording and playback system. 3. By adopting a multi-level timing synchronization strategy based on a high-precision clock (including absolute time, relative time, and inter-channel phase synchronization) and a dynamic adjustment and monitoring mechanism, the time characteristics and inter-channel phase relationships of the original data stream can be accurately reproduced during the playback stage. This high-fidelity playback capability enables the recorded sonar data to be used for high-fidelity system testing, algorithm verification, and task review, greatly enhancing the value of the data in the later stages. Attached Figure Description

[0015] To make the objectives, technical solutions, and beneficial effects of this invention clearer, the following figures are provided for illustration: Figure 1 This is a flowchart of an embodiment of the present invention. Detailed Implementation

[0016] like Figure 1 As shown, this invention discloses an efficient data recording and playback method in a sonar signal processing system, comprising the following steps: S1. Data Acquisition: Through the direct hardware access mechanism in user mode, sonar signal data streams from multiple heterogeneous data sources are received in parallel, including at least a first type of data stream transmitted through a network interface and a second type of data stream transmitted through a high-speed serial interface. S2. Data preprocessing and buffering: The received sonar signal data stream is preprocessed in real time and temporarily stored using a hierarchical buffering architecture, which includes a real-time buffering layer based on the processor's internal cache and a historical buffering layer based on external storage devices. S3. Persistent Data Storage: The buffered sonar signal data is written to a non-volatile storage medium through a high-speed storage interface, and the timestamp information and source identification information of the data are maintained during the storage process. S4. Data Playback and Reconstruction: Sonar signal data is read from the storage medium according to the playback instruction, reconstructed into a data stream conforming to the original transmission format, and the synchronous playback of multi-channel data is controlled by a timing synchronization mechanism, which includes transmission interval control based on a high-precision clock and multi-channel synchronization control based on timestamp alignment.

[0017] In one embodiment of the present invention, the reception of the first type of data stream transmitted through the network interface adopts a mechanism combining user-mode polling and zero-copy, specifically including: configuring a ring buffer in user-mode space, the network interface controller writing the received data packets into the ring buffer through direct memory access, and the application directly reading data from the ring buffer through polling, thereby avoiding data copying operations between kernel mode and user mode; The reception of the second type of data stream transmitted through the high-speed serial interface adopts a block transmission mechanism based on direct memory access. Specifically, it includes: configuring a scatter-collection list for the high-speed serial interface controller, the controller directly writing the received data blocks into multiple pre-allocated non-contiguous memory regions according to the list, and the processor accessing them uniformly through memory mapping. The reception of the first and second types of data streams is performed in parallel, and each data block is marked with a precise reception timestamp through a hardware timestamp mechanism, with a timestamp accuracy of no less than 100 nanoseconds.

[0018] In this scheme, two independent data receiving threads are set up in the data acquisition module of the sonar signal processing system. The first thread is dedicated to processing sonar beamforming data (Type I data stream) from the gigabit Ethernet interface. This thread initializes a 128MB ring buffer in user space, and the network card driver is configured to write received UDP packets directly to the ring buffer via DMA. The application continuously polls the write pointer position of the ring buffer, and when new data is detected, it directly reads the data and performs preliminary verification.

[0019] The second thread processes the raw sonar sampling data (Type II data stream) from the PCIe interface. The system pre-allocates eight 4MB memory blocks and configures the PCIe controller's scatter-collection list to point to these memory blocks. When data arrives, the controller automatically scatters and writes the data to these memory blocks. The processor accesses this data via memory-mapped I / O, while simultaneously reading the high-precision clock counter built into the PCIe controller as the data reception timestamp.

[0020] The two threads exchange synchronization information through shared memory to ensure that the data received in parallel is correctly aligned in time.

[0021] This solution eliminates the overhead of data copying from kernel mode to user mode through user-mode polling and zero-copy mechanism, reducing the number of CPU interrupt handling. The scatter-collect DMA mechanism allows non-contiguous memory access, improving memory utilization efficiency. Hardware timestamps provide an accurate time synchronization reference, and the parallel receiving architecture fully utilizes the performance of multi-core processors.

[0022] In one embodiment of the present invention, the hierarchical buffering architecture employs a dynamically configurable multi-level buffering strategy, including: The first-level processor internal buffer layer is configured as multiple parallel cache queues, each queue corresponding to a data source or data type. The size of the cache queue is dynamically adjusted according to the real-time bandwidth of the data stream. The second-level external storage buffer layer adopts an intermediate storage device based on non-volatile dual in-line memory modules (NVDIMM), configured as a circular buffer structure. The circular buffer is divided into multiple logical segments, and each logical segment stores sonar signal data within a specific time window. The buffer management unit monitors the fill status and data flow characteristics of each level of buffer in real time. When the fill level of the first-level buffer exceeds the first threshold, it initiates batch data transmission to the second-level buffer. When a data flow burst is detected, it dynamically allocates temporary buffer areas. The second-level buffer and the first-level buffer maintain data synchronization through a cache consistency protocol to ensure that data is not lost in the event of system anomalies.

[0023] In this scheme, the system is configured with an Intel Xeon processor, utilizing its 20MB L3 cache as the first-level buffer. This cache is divided into 8 logical queues: 4 queues for network data streams (1MB each), 3 queues for PCIe data streams (3MB each), and 1 queue for control signaling (1MB). The size of each queue can be dynamically adjusted according to the real-time data rate, with the adjustment algorithm based on data traffic statistics over the most recent 100ms.

[0024] The second-level buffer uses a 16GB NVDIMM-N device configured as a ring buffer structure. This buffer is divided into 1024 logical segments, each 16MB, capable of storing 100ms of sonar data. The buffer management unit runs on a dedicated core, continuously monitoring the status of each buffer level. When the first-level buffer utilization exceeds 70%, the management unit initiates DMA transfer, writing data in batches to the second-level buffer.

[0025] In the event of a data burst (such as during active sonar transmission), the management unit temporarily allocates an additional buffer area from system memory, and then reorganizes the data and writes it back to NVDIMM after the burst ends. Cache consistency is achieved through APIC (Advanced Programmable Interrupt Controller) to ensure data consistency across multiple cores.

[0026] This solution forms a data processing pipeline through multi-level buffering, with each level of buffer undertaking different functions. The dynamic adjustment mechanism adapts to the non-stationary characteristics of sonar signals. NVDIMM provides high-speed, non-volatile intermediate storage, balancing performance and reliability. The cache coherence protocol ensures the correctness of multi-core / multi-threaded access.

[0027] In one embodiment of the present invention, the sonar signal processing system includes an adaptive buffer optimization mechanism based on sonar signal characteristics: a signal feature analysis unit analyzes the time-frequency characteristics of the sonar signal in real time to identify the signal's operating mode, which includes at least: search mode, tracking mode, and identification mode; a buffer strategy adjustment unit dynamically adjusts buffer parameters according to the identified operating mode, including: in search mode, configuring a large-capacity buffer and low-priority storage to completely record wide-beam search data; in tracking mode, configuring a high-speed buffer and real-time storage to prioritize continuous data recording of the tracked target; in identification mode, configuring a high-precision buffer and labeled storage to focus on recording data of suspected targets; the adaptive buffer optimization mechanism also includes a learning function, training a buffer parameter adjustment model using historical data to enable the buffer strategy to predictively adapt to changes in the sonar operating mode.

[0028] In this scheme, the system deploys a signal feature analysis algorithm to process sonar baseband data in real time. The algorithm extracts features such as signal bandwidth, pulse width, and repetition frequency, and identifies the current operating mode through a pattern classifier. When the search mode is identified (features: wide beam, low resolution), the buffer management unit adjusts the second-level buffer to a "capacity-first" mode: each logical segment is expanded to 32MB, the storage priority is set to medium, and the data compression algorithm adopts fast lossy compression.

[0029] When a tracking mode (characteristics: narrow beam, high update rate) is detected, switch to "speed priority" mode: the first-level buffer allocates more queues to tracking data, the second-level buffer adopts a direct write strategy, skips the compression step, and sets the storage priority to the highest.

[0030] In recognition mode, the system activates the target detection algorithm. When a suspected target is detected, a marker is inserted into the data stream. The buffer management unit allocates a dedicated buffer area for the marker data, uses lossless compression, and generates additional metadata to record the target characteristics.

[0031] The system collects three months of operational data to train a neural network model. This model can predict the probability of the working mode in the next 5 minutes based on factors such as time, sea area, and task type, and adjust the buffer strategy in advance.

[0032] This solution combines sonar domain knowledge with buffering technology to achieve domain optimization; a multi-mode strategy optimizes resource allocation for different task requirements; machine learning provides predictive optimization to reduce mode switching overhead; and a labeling mechanism enables differentiated processing of key data.

[0033] In one embodiment of the present invention, persistent data storage includes the following steps: Storage interface optimization: It adopts a high-speed expansion bus based on PCIe 4.0 or higher, configured in a multi-channel parallel transmission mode, with each channel independently transmitting different types or priorities of sonar data; Storage device management: Multiple NVMe solid-state storage devices are used to form a redundant array. A striped write strategy is adopted to distribute data across multiple devices, while maintaining an independent write queue and completion queue for each device. Data organization optimization: The stored data is organized according to the time series and spatial series of sonar signals, and a multi-dimensional index structure is established, which includes a time dimension index, a beam dimension index, and a frequency dimension index. Storage reliability assurance: Implement end-to-end data integrity verification, generate cyclic redundancy check codes when writing data, and verify them when reading; implement wear leveling algorithms to extend the life of storage devices, and automatically migrate frequently accessed hot data.

[0034] In this solution, the system is configured with a PCIe 4.0 x8 interface, split into four x2 channels. Channel 1 transmits beamforming data, channel 2 transmits raw sampling data, channel 3 transmits system status data, and channel 4 transmits metadata. Each channel has an independent DMA engine and bandwidth guarantee. The storage system uses four 2TB NVMe SSDs in a RAID 0 array, with a stripe size of 128KB. At the operating system level, an independent IO queue with a depth of 1024 is created for each SSD. When writing data, the storage controller selects the target stripe based on data characteristics: time-continuous data is written to consecutive stripes, and different types of data are distributed across different physical devices. Data storage adopts a hierarchical directory structure: the first level is divided by task number, the second level by date, and the third level by hour. Each data file includes an index header containing information such as timestamp, beam number, and frequency range. The database maintains a B+ tree index, supporting multi-dimensional fast retrieval. For data integrity, a 64-bit CRC checksum is used, with one checksum calculated for every 1MB of data and stored in a separate metadata area. The wear leveling algorithm monitors the number of erases and writes to each NAND block, and initiates data migration when the difference exceeds a threshold. The hot data identification algorithm, based on access frequency, migrates frequently accessed data to a high-performance SSD.

[0035] This solution maximizes interface bandwidth utilization through multi-channel parallel processing; improves concurrent I / O performance through striped writing; supports fast data retrieval through multi-dimensional indexing; and enhances system reliability through integrity verification and wear leveling.

[0036] In one embodiment of the present invention, an intelligent storage optimization mechanism based on sonar mission scenarios is also included: The scene recognition unit identifies the current mission scene based on the sonar system's operating parameters and environmental information. The mission scenes include at least: anti-submarine search scene, mine detection scene, communication relay scene, and marine survey scene. The storage policy engine dynamically adjusts storage parameters based on the identified scenarios, including: In anti-submarine search scenarios, a highly reliable storage mode is adopted, and triple backups are implemented for data suspected of submarine contact, with real-time redundancy removal processing enabled. In the scenario of mine detection, a high-precision storage mode is adopted to perform lossless compression on sonar image data, and the storage resolution is no less than 99% of the original data; In communication relay scenarios, a streaming storage mode is adopted, which organizes data packets to optimize random access performance. In marine survey scenarios, a large-capacity storage mode is adopted, and a lossy compression algorithm is enabled to maximize storage capacity while ensuring the validity of scientific data. The intelligent storage optimization mechanism also includes a scenario prediction function, which predicts the timing of scenario switching based on task plans and historical patterns, and prepares for switching storage strategies in advance.

[0037] In this solution, the scene recognition unit integrates multiple information sources: the task type input by the sonar operator, the operating parameters of the sonar system (frequency, power, beam pattern), environmental sensor data (water temperature, salinity, depth), and a historical task database. A decision tree algorithm is used to comprehensively determine the current scene.

[0038] When an anti-submarine search scenario is identified, the storage system activates a "high-reliability mode": after all data is written to the primary storage array, it is synchronously copied to the backup array. The detection algorithm analyzes sonar contact in real time, marking data matching submarine characteristics (such as narrowband line spectra and motion patterns) as critical data, which is then additionally backed up to an offline tape library. A redundancy removal algorithm compares consecutive frames of data, storing only the differences.

[0039] In mine detection scenarios, the system switches to "high-precision mode": sonar image data (side-scan sonar, synthetic aperture sonar) is compressed using wavelet transform-based lossless compression, with a compression ratio controlled within 1.5:1. The storage format retains complete metadata, including GPS location, attitude information, and underwater acoustic parameters.

[0040] In communication relay scenarios, a "streaming mode" is enabled: data is segmented according to packet boundaries, and each packet is stored independently and indexed. The SSD's FTL (Flash Translation Layer) parameters are optimized to reduce the amplification effect of random writes.

[0041] The marine survey scenario employs a "capacity model": using perception-based lossy compression, the compression ratio can reach 10:1. The compression algorithm has been validated by oceanographers to ensure that the compressed data still meets the needs of scientific research and analysis.

[0042] The prediction module prepares for scenario switching 30 minutes in advance based on the task schedule, including preloading configurations, warming up storage devices, and adjusting caching strategies.

[0043] In one embodiment of the present invention, the timing synchronization mechanism includes a multi-level synchronization strategy: The first layer is absolute time synchronization, which ensures that the time base of the playback data is consistent with the original data by maintaining a fixed phase relationship between the system playback clock and the data recording timestamp. The second layer is relative time synchronization, which controls the playback transmission interval by calculating the time interval between data blocks, thus simulating the time characteristics of the original data. The third layer is multi-channel phase synchronization, which uses phase-locked loop technology to align the clock phases of multiple playback channels to ensure the correct relative timing relationship between channels; The timing synchronization mechanism also includes a dynamic adjustment function, which monitors the performance status of the playback system in real time. When clock drift or buffer underload / overload is detected, the playback rate is dynamically adjusted. The adjustment strategies include: gradual adjustment, jump adjustment, and interpolation compensation adjustment. The synchronization accuracy monitoring unit continuously evaluates the synchronization error. When the error exceeds the threshold, it triggers synchronization recalibration. The recalibration process does not affect the normal playback process.

[0044] In this scheme, the system uses a GPS-disciplined high-precision temperature-controlled crystal oscillator as the master clock source, with an accuracy of 0.1ppm. When playback starts, the clock synchronization module calculates the difference between the current system time and the earliest data record timestamp, and uses this difference as the reference offset.

[0045] For each data block, the playback engine calculates its time interval relative to the previous data block and sets a high-precision timer. The timer uses the CPU's timestamp counter (TSC) to achieve nanosecond-level precision. When the timer fires, data is sent to the network interface.

[0046] Multi-channel synchronization is implemented using a digital phase-locked loop (DPLL). The master channel serves as the reference clock, and the slave channels track the phase of the master channel through the DPLL. Each channel has an independent FIFO buffer, a phase detector compares the depths of each buffer, and a feedback controller adjusts the transmission rate of the slave channels.

[0047] The dynamic adjustment module monitors the fill level of the transmit buffer. When the fill level falls below the lower limit, it indicates that transmission is too fast, and a gradual adjustment is used: the interval is increased by 1 microsecond every 10 data packets. When the fill level is too high, a jump adjustment is used: a data packet is dropped and a record is made. For critical data, interpolation compensation is used: the data interval is slightly adjusted to avoid data loss.

[0048] Synchronization accuracy monitoring uses hardware timestamps to record the actual transmission time of each data packet and compare it with the theoretical transmission time. When the error of 10 consecutive data packets exceeds 10 microseconds, a background recalibration is triggered: a calibration thread is started to recalculate the clock parameters, without affecting the foreground playback thread.

[0049] Finally, it should be noted that the above preferred embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail through the above preferred embodiments, those skilled in the art should understand that various changes can be made to it in form and detail without departing from the scope defined by the claims of the present invention.

Claims

1. An efficient data recording playback method in a sonar signal processing system, characterized by, Includes the following steps: S1. Data Acquisition: Through the direct hardware access mechanism in user mode, sonar signal data streams from multiple heterogeneous data sources are received in parallel, including at least a first type of data stream transmitted through a network interface and a second type of data stream transmitted through a high-speed serial interface. S2. Data preprocessing and buffering: The received sonar signal data stream is preprocessed in real time and temporarily stored using a hierarchical buffering architecture, which includes a real-time buffering layer based on the processor's internal cache and a historical buffering layer based on external storage devices. S3. Persistent Data Storage: The buffered sonar signal data is written to a non-volatile storage medium through a high-speed storage interface, and the timestamp information and source identification information of the data are maintained during the storage process. S4. Data Playback and Reconstruction: Sonar signal data is read from the storage medium according to the playback instruction, reconstructed into a data stream conforming to the original transmission format, and the synchronous playback of multi-channel data is controlled by a timing synchronization mechanism, which includes transmission interval control based on a high-precision clock and multi-channel synchronization control based on timestamp alignment.

2. The efficient data recording and playback method in the sonar signal processing system according to claim 1, characterized in that: The reception of the first type of data stream transmitted through the network interface adopts a mechanism that combines user-space polling and zero-copy. Specifically, it includes: configuring a ring buffer in user space, the network interface controller writing the received data packets into the ring buffer through direct memory access, and the application reading data directly from the ring buffer through polling, thus avoiding data copying operations between kernel space and user space. The reception of the second type of data stream transmitted through the high-speed serial interface adopts a block transmission mechanism based on direct memory access. Specifically, it includes: configuring a scatter-collection list for the high-speed serial interface controller, the controller directly writing the received data blocks into multiple pre-allocated non-contiguous memory regions according to the list, and the processor accessing them uniformly through memory mapping. The reception of the first and second type of data streams is performed in parallel, and each data block is marked with a precise reception timestamp through a hardware timestamp mechanism.

3. The method of efficient data recording and playback in sonar signal processing system as claimed in claim 2, wherein: The hierarchical buffering architecture employs a dynamically configurable multi-level buffering strategy, including: The first-level processor internal buffer layer is configured as multiple parallel cache queues, each queue corresponding to a data source or data type. The size of the cache queue is dynamically adjusted according to the real-time bandwidth of the data stream. The second-level external storage buffer layer adopts an intermediate storage device based on non-volatile dual in-line memory modules (NVDIMM), configured as a circular buffer structure. The circular buffer is divided into multiple logical segments, and each logical segment stores sonar signal data within a specific time window. The buffer management unit monitors the fill status and data flow characteristics of each level of buffer in real time. When the fill level of the first-level buffer exceeds the first threshold, it initiates batch data transmission to the second-level buffer. When a data flow burst is detected, it dynamically allocates temporary buffer areas. The second-level buffer and the first-level buffer maintain data synchronization through a cache consistency protocol to ensure that data is not lost in the event of system anomalies.

4. The method of efficient data recording and playback in sonar signal processing system as claimed in claim 3, wherein: The sonar signal processing system includes an adaptive buffer optimization mechanism based on sonar signal characteristics: A signal feature analysis unit analyzes the time-frequency characteristics of the sonar signal in real time to identify the signal's operating mode, which includes at least three modes: search mode, tracking mode, and identification mode. A buffer strategy adjustment unit dynamically adjusts buffer parameters according to the identified operating mode, including: in search mode, configuring a large-capacity buffer and low-priority storage to completely record wide-beam search data; in tracking mode, configuring a high-speed buffer and real-time storage to prioritize continuous data recording of the tracked target; and in identification mode, configuring a high-precision buffer and labeled storage to focus on recording data of suspected targets. The adaptive buffer optimization mechanism also includes a learning function, training a buffer parameter adjustment model using historical data to enable the buffer strategy to predictively adapt to changes in the sonar operating mode.

5. The method of efficient data recording and playback in sonar signal processing system as claimed in claim 4, wherein: Data persistence storage specifically includes the following steps: Storage interface optimization: It adopts a high-speed expansion bus based on PCIe 4.0 or higher, configured in a multi-channel parallel transmission mode, with each channel independently transmitting different types or priorities of sonar data; Storage device management: Multiple NVMe solid-state storage devices are used to form a redundant array. A striped write strategy is adopted to distribute data across multiple devices, while maintaining an independent write queue and completion queue for each device. Data organization optimization: The stored data is organized according to the time series and spatial series of sonar signals, and a multi-dimensional index structure is established, which includes a time dimension index, a beam dimension index, and a frequency dimension index. Storage reliability assurance: Implement end-to-end data integrity verification, generate cyclic redundancy check codes when writing data, and verify them when reading; implement wear leveling algorithms to extend the life of storage devices, and automatically migrate frequently accessed hot data.

6. The method of efficient data recording and playback in sonar signal processing system as claimed in claim 5, wherein: The sonar signal processing system also includes an intelligent storage optimization mechanism based on the sonar mission scenario: The scene recognition unit identifies the current mission scene based on the sonar system's operating parameters and environmental information. The mission scenes include at least: anti-submarine search scene, mine detection scene, communication relay scene, and marine survey scene. The storage policy engine dynamically adjusts storage parameters based on the identified scenarios, including: In anti-submarine search scenarios, a highly reliable storage mode is adopted, and triple backups are implemented for data suspected of submarine contact, with real-time redundancy removal processing enabled. In the scenario of mine detection, a high-precision storage mode is adopted to perform lossless compression on sonar image data, and the storage resolution is no less than 99% of the original data; In communication relay scenarios, a streaming storage mode is adopted, which organizes data packets to optimize random access performance. In marine survey scenarios, a large-capacity storage mode is adopted, and a lossy compression algorithm is enabled to maximize storage capacity while ensuring the validity of scientific data. The intelligent storage optimization mechanism also includes a scenario prediction function, which predicts the timing of scenario switching based on task plans and historical patterns, and prepares for switching storage strategies in advance.

7. The method of efficient data recording and playback in sonar signal processing system as claimed in claim 6, wherein: The timing synchronization mechanism includes a multi-level synchronization strategy: The first layer is absolute time synchronization, which ensures that the time base of the playback data is consistent with the original data by maintaining a fixed phase relationship between the system playback clock and the data recording timestamp. The second layer is relative time synchronization, which controls the playback transmission interval by calculating the time interval between data blocks, thus simulating the time characteristics of the original data. The third layer is multi-channel phase synchronization, which uses phase-locked loop technology to align the clock phases of multiple playback channels to ensure the correct relative timing relationship between channels; The timing synchronization mechanism also includes a dynamic adjustment function, which monitors the performance status of the playback system in real time. When clock drift or buffer underload / overload is detected, the playback rate is dynamically adjusted. The adjustment strategies include: gradual adjustment, jump adjustment, and interpolation compensation adjustment. The synchronization accuracy monitoring unit continuously evaluates the synchronization error, and triggers synchronization recalibration when the error exceeds the threshold.