Sonar accumulated use time monitoring method, embedded device and system
By combining optical isolation and a high-precision clock module with non-volatile storage, the problem of accurate time acquisition and data persistence for sonar equipment during high-voltage transmission is solved, enabling unified monitoring and intelligent early warning of multiple devices, and improving the automation and data security of sonar equipment management.
Patent Information
- Application Number
- CN202511719385.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-21
- Publication Date
- 2026-02-27
AI Technical Summary
Existing sonar equipment lacks automated and accurate timing, unreliable data storage, insufficient intelligence, and poor integration and scalability in its usage time monitoring. It is difficult to achieve unified monitoring of multiple devices, especially when high-voltage transmission cannot accurately capture working characteristics, and it lacks data security and intelligent early warning functions.
It adopts an optically isolated input channel to acquire the working level signal of the sonar equipment, combined with a high-precision real-time clock module and non-volatile storage to achieve accurate timing and accumulation, supports multi-device monitoring, and generates intelligent early warning through threshold monitoring and periodic reports. It features persistent data storage and scalability design, and has human-computer interaction functions.
It enables precise and automated monitoring of sonar equipment usage time, ensuring data security and reliability, providing intelligent early warning and multi-period reports, improving the level of intelligent equipment management, and supporting flexible expansion of multiple devices.
Smart Images

Figure CN121578280A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of automation of underwater acoustic sonar, and particularly to a sonar cumulative use time monitoring method, an embedded device and a system. BACKGROUND
[0002] With the rapid development of underwater acoustic technology in the past decade, the demand for sonar devices is increasing, and the requirements for use intensity and maintenance guarantee are also increasing. Precise monitoring of the cumulative use time of sonar devices is a key link for estimating device life, arranging preventive maintenance, and ensuring task reliability.
[0003] Currently, in sonar devices and other similar electronic systems, the monitoring and management means for use time are relatively lagging, and mainly have the following limitations:
[0004] Lack of automated precise timing: existing solutions mostly rely on manual recording by operators or simple power-on timing by the system, and cannot accurately capture the intermittent and pulsed working characteristics of sonar devices (especially during high-voltage transmission), resulting in serious distortion of cumulative time statistics.
[0005] Unreliable and insecure data storage: use records are usually stored in volatile memory or saved through log files, which has the risk of data loss due to power failure, system reset or storage medium failure. At the same time, there is a lack of regular automatic backup mechanism, and the data security is low.
[0006] Insufficient intelligence: existing technologies generally lack automatic warning functions based on preset thresholds, and cannot actively remind maintenance personnel when the device approaches the use life, so the operation and maintenance work is passive. At the same time, it also lacks the ability to automatically generate visual reports according to different time periods (month, season, year), which is not convenient for use trend analysis and operation and maintenance decision-making.
[0007] Poor integration and scalability: it is difficult to realize unified monitoring of multiple devices without changing the structure of the sonar main body. Existing timing modules are often closely bound to the host, and do not have universality, and cannot be conveniently embedded and modified using the original interfaces of the device.
[0008] However, existing mature systems, although involving monitoring functions, focus on water quality parameter collection and do not solve the specific technical problems of accurate time capture, data persistent storage and multi-device life cycle management under the special working mode (high voltage, pulse) of sonar devices.
[0009] In order to overcome the above problems, it is necessary to develop an embedded device that can accurately, automatically and persistently monitor the cumulative use time of sonar, and has intelligent warning and reporting functions, which has very urgent and practical significance. SUMMARY
[0010] To solve the above technical problems, the sonar cumulative use time monitoring method of the present application runs on an embedded device and comprises the following steps:
[0011] Step S1: signal acquisition and start determination, the working level signal of the sonar device is acquired through the input channel of optical coupling isolation, and when a valid working start signal is recognized, a timing start instruction is generated;
[0012] Step S2: accurate timing and accumulation, in response to the timing start instruction, the current time of the high-precision real-time clock is read as the start time of this use; when a working stop signal is recognized, the current time of the real-time clock is read again as the end time; the duration of this use is calculated, and the duration is added to the cumulative use time of the non-volatile storage of the sonar device;
[0013] Step S3: threshold monitoring and alarm, the updated cumulative use time is compared with the preset use life threshold in real time; when the cumulative use time exceeds the use life threshold, an over-limit alarm signal is immediately generated and output;
[0014] Step S4: periodic report automatic generation, according to the preset monthly, quarterly or annual period, the report generation task is automatically triggered, the historical use data in the corresponding time range is queried from the non-volatile storage, the visual use time statistical chart is generated and saved as an image file.
[0015] In an embodiment of the present application, in the step S2 of accurate timing and accumulation, after updating the cumulative use time each time, a data backup operation is performed once, and the key cumulative time and configuration parameters are written into the backup area.
[0016] In an embodiment of the present application, unified monitoring of multiple sonar devices is also supported, independent storage spaces and configuration parameters are allocated for each sonar device, and the monitoring process is independently and concurrently executed.
[0017] The present application also provides a sonar cumulative use time monitoring embedded device, which is a hardware basis for implementing the time monitoring method and comprises:
[0018] The power module is used for converting the 24V DC power input from the outside into 5V and 3.3V through a DC-DC converter to supply power to the internal components of the device;
[0019] The signal acquisition module, which mainly includes an optical coupling isolation input unit, is used for acquiring the working level signal generated by the sonar during high-voltage transmission and performing electrical isolation;
[0020] A high-precision clock module adopts a DS3231 real-time clock chip to provide an accurate and uninterrupted timing reference for the method; a storage module includes a RAM operating memory and a MicroSD card slot, and the MicroSD card is used to realize the non-volatile storage of the cumulative use time, threshold value and historical record;
[0021] A processing module adopts an STM32F407 series microcontroller, is electrically connected with the signal acquisition module, the clock module and the storage module respectively, and is configured to execute the steps of the time monitoring method.
[0022] In an embodiment of the present application, a human-computer interaction module is further included, which includes a touch screen interface for displaying the cumulative use time, over-limit alarm information and generated use time statistical charts in real time, and receiving user configuration input.
[0023] In an embodiment of the present application, a USB host interface is further included for expanding external storage devices or debugging and data exporting.
[0024] In an embodiment of the present application, the optical coupling isolation input unit includes multiple optical couplings, which can simultaneously collect signals of multiple sonar devices or different working states of the same device.
[0025] In an embodiment of the present application, the MicroSD card slot supports hot plugging, and the embedded device will automatically switch to the RAM operating memory for temporary data caching when detecting that the MicroSD card is unplugged, and perform data recovery operation after detecting that the card is reinserted.
[0026] In an embodiment of the present application, the processing module is further configured to listen to abnormal working signals of the sonar device through the signal acquisition module, and evaluate the health status of the device in combination with the cumulative use time to generate maintenance suggestions.
[0027] The present application further provides a sonar system including at least one sonar device and a sonar cumulative use time monitoring embedded device, and the embedded device is signal connected with the sonar device through the optical coupling isolation input unit.
[0028] The above technical solutions of the present application have the following advantages compared with the prior art:
[0029] Data persistent storage: SQLite database combined with MicroSD card backup is adopted to ensure that data is not lost after power failure and improve system reliability.
[0030] Intelligent early warning mechanism: the cumulative use time exceeding the threshold value automatically triggers an alarm, and a multi-period statistical report (including charts) of month / season / year is combined to assist users in scientifically maintaining the device.
[0031] High-precision time management: based on the DS3231 RTC real-time clock module, to minimize the error of time recording, support operation log accurate to seconds.
[0032] Flexible scalability: hardware uses STM32F407 embedded platform, supports independent monitoring of multiple sonar devices, and adapts to different scene requirements.
[0033] Safe backup design: backup data files every week and add timestamp, avoid data overwrite risk caused by manual intervention, enhance system robustness.
[0034] The sonar cumulative use time monitoring scheme of the application solves the problems of traditional sonar monitoring relying on manual recording, data loss and maintenance response lag, and significantly improves the intelligent level of underwater equipment management. BRIEF DESCRIPTION OF DRAWINGS
[0035] In order to make the content of the application more easily understood, the application will be further described in detail below according to the specific embodiments of the application and in conjunction with the drawings.
[0036] Figure 1 is the hardware structure diagram of the sonar cumulative use time monitoring embedded device of the application;
[0037] Figure 2 is the interface diagram of the man-machine interaction module of the application. DETAILED DESCRIPTION
[0038] Embodiment one
[0039] This embodiment provides a sonar cumulative use time monitoring method, the core process of which, referring to the software browsing interface shown in Figure 2 , runs on the processor of the embedded device. The core logic of this method implemented by Python language is as follows, which can be converted to C language for running in embedded environment during actual deployment:
[0040] S1: signal acquisition and start determination
[0041] The input channel isolated by optocoupler monitors the working level signal of sonar device in real time. When the sonar starts high-voltage emission, a high-level signal is generated, which is recognized by the processor after optocoupler isolation, and a timing start instruction is generated.
[0042] S2: accurate timing and accumulation
[0043] The processor responds to the timing start instruction and immediately reads the current time of the high-precision real-time clock (DS3231), and stores it as the start time of this use in the SQLite database.
[0044]
[0045] When the sonar stops operating (signal level change) is detected, the real-time clock is read again as the end time and stored in the database. The system automatically calculates the duration of this use and updates the cumulative usage time in the sonar's non-volatile storage.
[0046] S3: Threshold Monitoring and Alerts
[0047] The system continuously compares the updated cumulative usage time with the preset lifespan threshold. This process is automatically triggered after each recording of usage time.
[0048] #Code Excerpt and Explanation: Threshold Check and Alerts
[0049] #Check threshold
[0050] c.execute("'SELECT SUM(duration)FROM usage_records WHERE device_id=?"',(device_id,))
[0051] total_hours=c.fetchone()[0]or 0
[0052] c.execute("SELECT threshold_hours FROM devices WHERE id=?",(device_id,))
[0053] threshold = c.fetchone()[0]
[0054] if total_hours>threshold and threshold>0:
[0055] self._send_alert(device_id, total_hours, threshold) # Generates and outputs an over-limit alarm signal
[0056] S4: Periodic report automatically generated
[0057] The system has a built-in timed task scheduler that automatically triggers report generation tasks according to preset monthly, quarterly, or yearly cycles.
[0058] #Code Excerpt and Explanation: Scheduled Tasks and Report Generation
[0059] #Scheduled task configuration
[0060] `schedule.every().day.at("00:05").do(self._check_scheduled_reports)` # Checks daily whether a periodic report needs to be generated. `def generate_report(self, device_id, period, save_path = None):`
[0061] Generate usage statistics report.
[0062] #...Determine the time range (month, quarter, year)...
[0063] #Query the database to generate statistical charts
[0064] # Use Matplotlib to generate a visual chart of usage time statistics and save it as a PNG image file.
[0065] Data Backup: The system performs a data backup operation after each data update. Additionally, a weekly global backup is configured to copy the entire database file to a timestamped backup file, enabling unified backup and disaster recovery across multiple devices.
[0066] #Code Excerpt and Explanation: Data Backup
[0067] `schedule.every().sunday.at("03:00").do(self._backup_database)` # Automatic backup every Sunday.
[0068] Example 2
[0069] This embodiment provides an embedded device for monitoring the cumulative usage time of sonar to implement the above method, and its hardware structure block diagram is as follows: Figure 1 As shown, it includes:
[0070] The power module provides an external 24V DC power supply to the device. Through the onboard DC-DC converter, it stably outputs 5V and 3.3V voltages to power the internal components of the device (such as STM32F407, DS3231, touch screen, etc.).
[0071] The signal acquisition module, at its core, includes a multi-channel optocoupler isolated input unit (such as the TLP521-4), capable of simultaneously acquiring signals from multiple sonar devices or different operating states of the same device. This design effectively isolates the high-voltage sonar transmission circuit from the low-voltage control circuit, ensuring the system's safety and reliability.
[0072] High-precision clock module, using DS3231 real-time clock chip, which is built-in temperature compensation crystal, provides accurate, uninterrupted timing information such as year, month, day, hour, minute, second, even in the case of main power off, still can continue to time by its backup battery power supply.
[0073] Storage module, including RAM running memory and MicroSD card slot.
[0074] MicroSD card is used to realize non-volatile storage, persistent save cumulative usage time, threshold and history. The card slot supports hot plug, the device will automatically switch to RAM for temporary data caching when detecting that the MicroSD card is pulled out, and automatically perform data recovery operation after detecting that the card is reinserted, greatly enhancing the data security and the convenience of device maintenance.
[0075] Processing module, using STM32F407 series microcontroller as the core processing unit, its running C language firmware transplanted from Python core logic, responsible for coordinating the work of each module, executing all method steps. In addition, the processing module is also configured to listen to the abnormal working signals of sonar equipment (such as overcurrent, waveform distortion) through the signal acquisition module, and evaluate the health status of the equipment combined with the cumulative usage time, generate maintenance suggestions, realize predictive maintenance.
[0076] Human-computer interaction module. The module includes a touch screen interface connected to an LCD touch screen. The screen is used to display the cumulative usage time, over-limit alarm information and generated usage time statistics chart in real time, and receive user's threshold setting, manually generated report and other configuration inputs. Its interface diagram is shown in Figure 2 .
[0077] USB host interface, providing USB host interface, used for expanding external U disk and other storage devices, or for system debugging and batch data export.
[0078] Example three
[0079] This embodiment provides a sonar system, including at least one sonar device and a sonar cumulative usage time monitoring embedded device as described in embodiment two. The monitoring embedded device is electrically connected with the signal output end of the sonar device through its optocoupler isolation input unit, and the working state is collected in real time. The system realizes precise and automatic monitoring and management of the whole life cycle of the sonar device, and provides key data support for planned maintenance, life prediction and scientific use of the device.
[0080] Obviously, the above embodiments are merely example for clearly illustrating, and are not limitation to the embodiments. For ordinary skilled in the art, other different forms of changes or variations can be made on the basis of the above description. Here, all the embodiments need not and can not be exhausted. The obvious changes or variations derived therefrom are still within the scope of the present invention.
Claims
1. A sonar cumulative usage time monitoring method, running on an embedded device, characterized in that, Comprising the following steps: Step S1: Signal acquisition and start determination, collect the working level signal of the sonar device through the input channel of optical coupling isolation, and generate a timing start instruction when a valid working start signal is recognized; Step S2: Accurate timing and accumulation, in response to the timing start instruction, read the current time of the high-precision real-time clock as the start time of this use; when a working stop signal is recognized, read the current time of the real-time clock again as the end time; calculate the duration of this use, and accumulate the duration in the cumulative use time of the non-volatile storage of the sonar device; Step S3: Threshold monitoring and alarm, compare the updated cumulative use time with the preset use life threshold in real time; When the cumulative use time exceeds the use life threshold, immediately generate and output an out-of-limit alarm signal; Step S4: Periodic report automatic generation, according to the preset monthly, quarterly or annual period, automatically trigger the report generation task, query the historical use data in the corresponding time range from the non-volatile storage, generate a visual use time statistical chart and save it as an image file.
2. The time monitoring method according to claim 1, characterized in that: In the step S2 of accurate timing and accumulation, after updating the cumulative use time each time, a data backup operation is performed once, and the key cumulative time and configuration parameters are written to the backup area.
3. The time monitoring method of claim 1, wherein: It also supports unified monitoring of multiple sonar devices, assigns independent storage space and configuration parameters to each sonar device, and independently and concurrently executes the monitoring process.
4. A sonar cumulative time-in-use monitoring embedded device, which is a hardware basis for implementing the time monitoring method of any one of claims 1-3, characterized in that, Comprising: A power module for converting an external input 24V DC power supply into 5V and 3.3V through a DC-DC converter to power the internal components of the device; A signal acquisition module, which includes an optical coupling isolation input unit at its core, for collecting the working level signal generated by the sonar during high-voltage transmission and performing electrical isolation; A high-precision clock module using a DS3231 real-time clock chip to provide accurate and uninterrupted timing reference for the method; a storage module including RAM running memory and a MicroSD card slot, the MicroSD card being used to realize the non-volatile storage, persistently saving the cumulative use time, threshold and historical record; A processing module using an STM32F407 series microcontroller, which is electrically connected to the signal acquisition module, clock module and storage module, and is configured to execute the steps of the time monitoring method according to any one of claims 1-3.
5. The embedded device of claim 4, wherein: It also includes a human-computer interaction module, which includes a touch screen interface for real-time display of the cumulative use time, out-of-limit alarm information and generated use time statistical chart, and receiving user configuration input.
6. The embedded device of claim 4, wherein: It also contains a USB host interface for expanding external storage devices or debugging and data export.
7. The embedded device of claim 4, wherein: The optical coupling isolation input unit contains multiple optical couplings, which can simultaneously collect multiple sonar devices or different working state signals of the same device.
8. The embedded device of claim 4, wherein: The MicroSD card slot supports hot plug, and the embedded device will automatically switch to the RAM running memory for temporary data caching when detecting that the MicroSD card is unplugged, and perform data recovery operation after detecting that the card is reinserted.
9. The embedded device of claim 4, wherein: The processing module is further configured to listen to an abnormal working signal of the sonar device through the signal acquisition module, and evaluate the health status of the device in combination with the cumulative use time to generate a maintenance suggestion.
10. A sonar system characterized by, The embedded device for monitoring the cumulative use time of a sonar device comprises at least one sonar device and the embedded device as claimed in any one of claims 4-9, and the embedded device is connected with the sonar device through the optocoupler isolation input unit signal.