Method, device and equipment for detecting water depth based on sonar and storage medium
By filtering, extracting and edge detection of the water depth data collected by the sonar, accurate water depth values are generated, which solves the problem of interference from traditional water depth measurement methods in complex environments and improves the accuracy of measurement.
Patent Information
- Application Number
- CN202510104739.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-05-06
AI Technical Summary
Traditional water depth measurement methods are susceptible to multiple echo interference and seabed obstacles in complex underwater environments, resulting in signal confusion and inaccurate water depth values.
By obtaining the original data collected by the sonar, filtering and extracting, the effective echo position and signal strength are generated, and the signal strength is converted into level data. Then, edge detection is performed on the current frame data, the foreground block and background block are divided, multiple depth values are generated, and the depth closest to the effective position is selected as the water depth value. Finally, a signal feature set is constructed, a comprehensive deviation data is generated, and the water depth value is updated.
It effectively reduces the difficulty of sonar equipment in identifying real seabed reflected signals in complex underwater environments, and improves the accuracy and reliability of water depth measurement.
Smart Images

Figure CN119936887A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of water depth measurement, and in particular to a sonar-based water depth detection method, device, equipment and storage medium. Background Art
[0002] Traditional water depth measurement methods mainly rely on the strength or time delay of a single sonar signal to calculate the water depth. However, in complex underwater environments, such as when there are multiple echo interferences, submarine cables and other obstacles, these methods often have difficulty obtaining accurate water depth values. Multiple echo interferences may cause signal confusion, making it difficult for sonar equipment to accurately identify the true seabed reflection signal; and obstacles such as submarine cables may generate additional reflection signals, further interfering with water depth measurement.
[0003] In view of this, this application is filed. Summary of the invention
[0004] The invention discloses a method, device, equipment and storage medium for detecting water depth based on sonar, aiming to solve the problem that the existing water depth measurement may be disturbed.
[0005] A first embodiment of the present invention provides a method for detecting water depth based on sonar, comprising:
[0006] Acquire raw data collected by the sonar, and filter the raw data;
[0007] Extracting the filtered raw data to generate effective echo positions and signal strengths, and converting the signal strengths into level data;
[0008] Perform edge detection on the current frame data and divide the foreground block and the background block according to the signal strength, generate multiple depth values of the strongest signal in the current frame from the blocks in the foreground block whose area is greater than a preset value based on the starting position of the block and the relative position of the entire acquisition range, and select the depth closest to the effective position from the multiple depth values as the water depth value of the current frame;
[0009] Construct a signal feature set, save the original data with the highest level data in the signal feature set, generate comprehensive deviation data based on the data in the signal feature set, and update the water depth value of the current frame based on the comprehensive deviation data, wherein the comprehensive deviation data includes a signal strength deviation coefficient, an echo spacing deviation coefficient, and a water depth deviation coefficient.
[0010] Preferably, the obtaining of raw data collected by sonar and filtering of the raw data are specifically as follows:
[0011] A frame of raw data collected by the sonar is obtained, and the raw data is processed using an IIR bandwidth filter or a FIR bandwidth filter to filter out signals of non-target frequencies and retain a frame of data containing target frequency components,
[0012] The original data after bandwidth filtering is subjected to same-frequency filtering to eliminate same-frequency interference.
[0013] Preferably, the performing edge detection on the current frame data and dividing the foreground block and the background block according to the signal strength is specifically:
[0014] The current frame data is processed by edge detection to determine the strongest level X of the current frame data, and the data with a level range of [X-1, X] is divided into foreground blocks, and the data with a level range less than X-2 is divided into background blocks.
[0015] Preferably, the signal feature set is constructed, the original data with the highest level of data is stored in the signal feature set, comprehensive deviation data is generated based on the data in the signal feature set, and the water depth value of the current frame is updated based on the comprehensive deviation data;
[0016] Constructing a signal feature set for storing signal values, signal strengths, water depth values, signal strength deviation coefficients, echo spacing deviation coefficients, and water depth deviation coefficients;
[0017] Traverse the original data, save the signal value, signal strength, and water depth value of the original data with the highest level of data in the signal feature set, and set the signal strength deviation coefficient, echo spacing deviation coefficient, and water depth deviation coefficient to invalid values in the initial state;
[0018] Traverse the signal feature set and calculate the comprehensive deviation coefficient of each data. If there is only one data with the lowest comprehensive deviation coefficient, the depth value in this data is used as the water depth value of the current frame. If there are multiple data with the lowest comprehensive deviation coefficients, the depth value of the data with the strongest signal strength is selected as the water depth of the current frame. The expression of the comprehensive deviation coefficient is CDC = D signal +D echo +D predict , D signal is the signal strength deviation coefficient, D echo is the echo spacing deviation coefficient, D Dredict is the water depth deviation coefficient.
[0019] Preferably, the signal strength deviation coefficient is used to measure the degree of deviation of the current echo value relative to the first echo value, and its expression is: Among them, E1 is the previous echo value, and E0 is the current echo value.
[0020] Preferably, the echo spacing deviation coefficient is used to measure the difference between the current echo water depth and the average value of the adjacent echo spacings, and its expression is: Among them, M echo is the average value of the spacing between adjacent echoes, D current is the water depth of the current echo.
[0021] Preferably, the water depth deviation coefficient is used to measure the deviation between the current echo water depth and the water depth value predicted based on historical data, and its expression is: D predict-value is the average value of the predicted echo depth, D current is the water depth of the current echo.
[0022] A second embodiment of the present invention provides a device for detecting water depth based on sonar, comprising:
[0023] A filtering unit, used to obtain raw data collected by the sonar and filter the raw data;
[0024] An intensity conversion unit, used for extracting the filtered raw data to generate effective echo positions and signal strengths, and converting the signal strengths into level data;
[0025] A water depth value calculation unit is used to perform edge detection on the current frame data and divide the foreground block and the background block according to the signal strength, and generate multiple depth values of the strongest signal in the current frame based on the starting position of the block and the relative position of the entire acquisition range from the blocks in the foreground block whose area is greater than the preset value, and select the depth closest to the effective position from the multiple depth values as the water depth value of the current frame;
[0026] A water depth value updating unit is used to construct a signal feature set, save the original data with the highest level data in the signal feature set, generate comprehensive deviation data based on the data in the signal feature set, and update the water depth value of the current frame based on the comprehensive deviation data, wherein the comprehensive deviation data includes a signal strength deviation coefficient, an echo spacing deviation coefficient, and a water depth deviation coefficient.
[0027] A third embodiment of the present invention provides a water depth detection device based on sonar, including a memory and a processor, wherein the memory stores a computer program, and the computer program can be executed by the processor to implement a water depth detection method based on sonar as described in any one of the above.
[0028] A fourth embodiment of the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program can be executed by a processor of a device where the computer-readable storage medium is located to implement a method for detecting water depth based on sonar as described in any one of the above items.
[0029] Based on the sonar-based water depth detection method, device, equipment and storage medium provided by the present invention, the raw data collected by the sonar is first obtained and the raw data is filtered; then, the filtered raw data is extracted to generate effective echo position and signal strength, and the signal strength is converted into level data; then, the edge detection is performed on the current frame data and the foreground block and the background block are divided according to the signal strength, and the blocks in the foreground block with an area greater than a preset value are generated based on the starting position of the block and the relative position of the entire acquisition range. Multiple depth values of the strongest signal in the current frame are generated, and the depth closest to the effective position is selected from the multiple depth values as the water depth value of the current frame; finally, a signal feature set is constructed, the raw data with the highest level data is saved in the signal feature set, and comprehensive deviation data is generated based on the data in the signal feature set, and the water depth value of the current frame is updated based on the comprehensive deviation data, wherein the comprehensive deviation data includes a signal strength deviation coefficient, an echo spacing deviation coefficient, and a water depth deviation coefficient. The problem that the sonar equipment is difficult to accurately identify the real seabed reflection signal is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a flow chart of a method for detecting water depth based on sonar provided by the first embodiment of the present invention;
[0031] Figure 2 It is a schematic diagram of the sea survey data interface (actual water depth is about 6 meters) provided by the present invention;
[0032] Figure 3 It is a waveform diagram corresponding to the sea survey data interface provided by the present invention;
[0033] Figure 4 It is a module schematic diagram of a sonar-based water depth detection device provided by the second embodiment of the present invention. DETAILED DESCRIPTION
[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0035] In order to better understand the technical solution of the present invention, the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0036] It should be clear that the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0038] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0039] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0040] The "first\second" mentioned in the embodiments is only to distinguish similar objects, and does not represent a specific order for the objects. It is understandable that the "first\second" can be interchanged with the specific order or sequence where permitted. It should be understood that the objects distinguished by "first\second" can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than those illustrated or described herein.
[0041] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0042] The invention discloses a method, device, equipment and storage medium for detecting water depth based on sonar, aiming to solve the problem that the existing water depth measurement may be disturbed.
[0043] See also Figure 1 The first embodiment of the present invention provides a method for detecting water depth based on sonar, which can be performed by a water depth measuring device (hereinafter referred to as the measuring device), and in particular, by one or more processors in the measuring device, to implement at least the following steps:
[0044] S101, obtaining raw data collected by sonar, and filtering the raw data;
[0045] In this embodiment, the measuring device can be a terminal with data processing capability such as a workstation, a desktop computer, a laptop computer or a server, which can be connected to the sonar by wire or wirelessly. The measuring device can be installed with a corresponding operating system and application software, and the functions required by this embodiment can be realized through the combination of the operating system and the application software;
[0046] Specifically, in this embodiment, a frame of raw data collected by the measuring device from the sonar device contains the echo signal from the underwater target and possible environmental noise and interference signals. Since the raw data usually has a large noise ratio and spectrum complexity, direct use may lead to a decrease in the accuracy of subsequent depth calculation and target recognition, so it needs to be effectively filtered.
[0047] The filtering process is: introducing an IIR (infinite impulse response) bandwidth filter or a FIR (finite impulse response) bandwidth filter to filter the data within the bandwidth range. By presetting the frequency range of the filter, it can accurately cover the target frequency range, thereby filtering out interference signals that do not belong to the target frequency range, such as mechanical vibration noise and high-frequency environmental noise. In this process, the IIR filter can achieve efficient real-time processing through its recursive calculation characteristics, while the FIR filter can effectively retain the waveform characteristics of the signal with its linear phase characteristics. The use of the two filters can be flexibly selected according to the specific application scenario and processing requirements.
[0048] After bandwidth filtering, although most of the non-target frequency components have been eliminated, there may still be co-frequency interference signals. For example, in the sonar echo signal, the reflected signals caused by the multipath effect or the complex underwater environment near the target often interfere with the target signal. These interference signals usually have similar frequency characteristics to the target signal, and simple bandwidth filtering cannot completely remove them. In order to further improve the purity of the data, co-frequency filtering technology is introduced. By analyzing the phase consistency and time delay characteristics of the signal, the co-frequency filter is used to suppress possible interference signals. The filter range is dynamically adjusted based on the characteristic parameters of the target signal, so as to effectively eliminate interference signals with the same frequency as the target signal but significantly different phase characteristics.
[0049] S102, extracting the filtered raw data to generate effective echo positions and signal strengths, and converting the signal strengths into level data;
[0050] In this embodiment, a frame of filtered data contains multiple possible echo signals, and the primary goal is to locate the peak of an echo. By traversing the filtered data sequence, excluding the initial waveform at the beginning of each frame (usually system noise or the reflection signal of the initial pulse), and then finding the maximum value in the remaining data, it is taken as the peak of an echo. The location of the peak directly corresponds to the distance of the underwater target.
[0051] After the echo position is extracted, the signal strength is converted into standardized level data. Specifically, according to the preset gain level range (for example, 0 to 50, where 0 represents the minimum gain and 50 represents the original gain), the strength value of the echo signal is segmented and mapped into 16 level ranges (level 0 represents the weakest signal and level 15 represents the strongest signal).
[0052] S103, performing edge detection on the current frame data and dividing the foreground block and the background block according to the signal strength, generating multiple depth values of the strongest signal in the current frame from the blocks in the foreground block whose area is larger than a preset value based on the starting position of the block and the relative position of the entire acquisition range, and selecting the depth closest to the effective position from the multiple depth values as the water depth value of the current frame;
[0053] Specifically, in this embodiment, for the current frame data, the edge detection principle in image science is used to perform distribution analysis on the signal strength to identify obvious boundary features in the data. By calculating the strongest level X of the signal in the current frame data, the data with a level range of [X-1, X] is divided into foreground blocks, and the data with a level less than X-2 is divided into background blocks.
[0054] By further analyzing the distribution characteristics of the foreground block, if the area size of the foreground block is detected to exceed the preset threshold (for example, the area size is greater than 2 sampling points), it is regarded as a key area that may contain the strongest signal. Based on the starting position of these areas and the relative position of the acquisition range, multiple depth values corresponding to the strongest signal in the current frame are calculated one by one. Since the acquisition range is directly related to the target distance, this block position-based depth calculation can provide a set of candidate depth values related to the actual water depth, thereby greatly improving the accuracy of the data.
[0055] After obtaining multiple depth values, in order to further determine the actual water depth value of the current frame, this embodiment adopts a selection strategy based on the effective echo position. Specifically, by comparing the distance between each depth value and the position of the primary echo, the depth closest to the position of the primary echo is selected as the water depth value of the current frame. In order to facilitate subsequent data analysis and verification, this embodiment also records the level data, depth data and the final water depth value corresponding to the current frame in full into the current frame data. It can provide detailed data support for subsequent inter-frame comparison, trend analysis and anomaly detection.
[0056] S104, construct a signal feature set, save the original data with the highest level data in the signal feature set, generate comprehensive deviation data based on the data in the signal feature set, and update the water depth value of the current frame based on the comprehensive deviation data, wherein the comprehensive deviation data includes a signal strength deviation coefficient, an echo spacing deviation coefficient, and a water depth deviation coefficient.
[0057] Specifically, in this embodiment, during the operation, the signal point with the highest level data is first extracted from the original data, and its corresponding signal value, signal strength and water depth value are stored in the signal feature set. The signal feature set is not only used to save these key data, but also includes a plurality of additional coefficients for evaluating deviations, such as signal strength deviation coefficient, echo spacing deviation coefficient and water depth deviation coefficient. In the initialization stage, these deviation coefficients are set to invalid values so that they can be dynamically calculated according to the data in the feature set later. The construction of the signal feature set is intended to capture and preserve the significant features of underwater signals. By traversing the original data and selecting the signal point with the highest level data, it is ensured that the core data with the most reference value for water depth measurement is retained in the signal feature set. In order to reduce the interference of irrelevant data.
[0058] After the signal feature set is constructed, the comprehensive deviation coefficient is generated by traversing and calculating the data in the feature set. The comprehensive deviation coefficient is based on the comprehensive evaluation of multiple deviation indicators, including signal strength deviation coefficient, echo spacing deviation coefficient and water depth deviation coefficient. These indicators measure the performance of the current data in terms of signal strength stability, echo spacing consistency and water depth prediction accuracy. The comprehensive deviation coefficient is calculated by the following expression: CDC = D signal +D echo +D predict , D signal is the signal strength deviation coefficient, D echo is the echo spacing deviation coefficient, D predict It is the water depth deviation coefficient, which can intuitively reflect the closeness of each data to the ideal value.
[0059] After the comprehensive deviation coefficient is calculated, the data in the signal feature set is sorted and screened. If there is only one piece of data with the lowest comprehensive deviation coefficient, the water depth value in the data is directly used as the final water depth value of the current frame. This ensures the uniqueness and optimality of the water depth calculation result. In some cases, the comprehensive deviation coefficients of multiple data may be the same. In this case, the water depth value corresponding to the data with the strongest signal strength is selected as the final result. This strategy combines the dual considerations of signal strength and deviation analysis, making the selection of water depth values more reasonable and accurate.
[0060] In a possible implementation of the present invention, the signal strength deviation coefficient is used to measure the degree of deviation of the current echo value relative to the first echo value, and its expression is: Among them, E1 is the previous echo value, and E0 is the current echo value.
[0061] The measuring device will traverse the strong signal data structure and apply the above formula to each piece of data to calculate the signal strength deviation coefficient. The traversal process not only covers all the strong signal data of the current frame, but can also be extended to historical frame data as needed to capture longer-term signal change trends. Ensure the comprehensiveness of signal deviation analysis and be able to quickly locate abnormal signals or large deviations. The calculation results of the signal strength deviation coefficient will be updated to the data structure in real time. By dynamically recording and analyzing these coefficients, the accuracy of signal processing and the reliability of water depth measurement can be significantly improved without adding additional complexity. For example, for signals with deviation coefficients significantly higher than the normal range, they can be marked as abnormal signals and appropriately weighted or eliminated in subsequent water depth calculations, thereby effectively reducing the errors introduced by abnormal signals.
[0062] In a possible implementation of the present invention, the echo spacing deviation coefficient is used to measure the difference between the current echo water depth and the average value of the adjacent echo spacings, and its expression is: Among them, M echo is the average value of the spacing between adjacent echoes, D current is the water depth of the current echo.
[0063] Specifically, the measuring device will identify and record the depth value with the strongest signal from the current frame data, recorded as D_max. This depth value usually corresponds to the main reflection signal of the target object and has a high degree of credibility. However, due to the complexity of underwater acoustic propagation characteristics, multiple echo effects may cause the actual water depth to appear at positions such as D_max, N times D_max / 2 (N is a positive integer). Therefore, it is difficult to fully reflect the true water depth through only a single D_max value.
[0064] For further correction and optimization, the measurement device will traverse the strong signal data structure again and check each echo depth value D_i. If D_i is close to N times D_i / 2 (judged by setting a reasonable tolerance range), the echo depth value is recorded in the echo depth array d_Array. In this process, the selection of the tolerance range is crucial: it is necessary to fully consider the slight impact of noise interference and environmental changes on the depth value, and to avoid misjudgment caused by too large a range.
[0065] After completing the construction of d_Array, the measurement equipment will calculate the average value of the array Avg_Spacing, that is, the average value of the spacing between adjacent echoes. As an important indicator reflecting the law of echo depth distribution, Avg_Spacing can not only reflect the spacing characteristics of adjacent echoes, but also provide a reference benchmark for subsequent deviation evaluation.
[0066] Next, based on the echo spacing deviation coefficient formula The measuring device calculates the deviation coefficient of each echo data one by one. It can accurately measure the deviation of the current echo depth value from the average value of the adjacent echo spacing. All calculation results will be updated in real time to the signal data structure for subsequent comprehensive deviation analysis.
[0067] In a possible implementation of the present invention, the water depth deviation coefficient is used to measure the degree of deviation between the current echo water depth and the water depth value predicted based on historical data, and its expression is: D predict-value is the average value of the predicted echo depth, D current is the water depth of the current echo.
[0068] Specifically, in this embodiment, the measuring device uses the Kalman filter algorithm to calculate the water depth prediction value based on historical data. Kalman filtering, with its superiority in dynamic system state estimation, shows extremely high robustness when processing noisy time series data. By analyzing multiple frames of historical water depth data, the random fluctuations of the measured values and the uncertainty of the system model are comprehensively considered to obtain a dynamically updated water depth prediction value as a reference benchmark for the water depth of the current frame. The dynamic characteristics of the prediction value enable it to adapt to the real-time changing underwater environment, effectively reducing the impact of sudden noise on water depth judgment.
[0069] Based on the predicted water depth value obtained by Kalman filtering, the measuring device then traverses the strong signal data structure and calculates the water depth deviation coefficient for each data. Specifically, the water depth deviation coefficient is calculated by the formula Denotes the average value of the predicted water depth, D currentIndicates the water depth value of the current echo. The measuring equipment accurately depicts the degree of deviation of the water depth value of each data relative to the predicted value. The smaller the deviation coefficient, the higher the degree of consistency between the water depth value of the current echo and the predicted value, and the more likely it is to represent the real underwater target.
[0070] Please combine Figure 2 and 3 , let's take an example to illustrate: when there are multiple echo interferences, the correct water depth can be calculated. The actual water depth is about 6 meters, but in addition to the starting wave, 2 echoes are drawn:
[0071] The first echo is a normal echo. The water depth is 6.30m, which is correct data.
[0072] The second echo is a multiple echo, which is caused by sound waves reflecting multiple times between different interfaces before finally returning to the receiver. For example, a sound wave may reflect from the sea surface to the sea floor, then from the sea floor back to the sea surface, and then return to the sonar receiver, forming a false depth reading that is greater than the actual depth.
[0073] See also Figure 4 A second embodiment of the present invention provides a device for detecting water depth based on sonar, comprising:
[0074] The filtering unit 201 is used to obtain the raw data collected by the sonar and filter the raw data;
[0075] The intensity conversion unit 202 is used to extract the filtered raw data to generate effective echo positions and signal strengths, and convert the signal strengths into level data;
[0076] The water depth value calculation unit 203 is used to perform edge detection on the current frame data and divide the foreground block and the background block according to the signal strength, and generate multiple depth values of the strongest signal in the current frame based on the starting position of the block and the relative position of the entire acquisition range from the blocks in the foreground block whose area is greater than the preset value, and select the depth closest to the valid position from the multiple depth values as the water depth value of the current frame;
[0077] The water depth value updating unit 204 is used to construct a signal feature set, save the original data with the highest level data in the signal feature set, generate comprehensive deviation data based on the data in the signal feature set, and update the water depth value of the current frame based on the comprehensive deviation data, wherein the comprehensive deviation data includes a signal strength deviation coefficient, an echo spacing deviation coefficient, and a water depth deviation coefficient.
[0078] A third embodiment of the present invention provides a water depth detection device based on sonar, including a memory and a processor, wherein the memory stores a computer program, and the computer program can be executed by the processor to implement a water depth detection method based on sonar as described in any one of the above.
[0079] A fourth embodiment of the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program can be executed by a processor of a device where the computer-readable storage medium is located to implement a method for detecting water depth based on sonar as described in any one of the above items.
[0080] Based on the sonar-based water depth detection method, device, equipment and storage medium provided by the present invention, the raw data collected by the sonar is first obtained and the raw data is filtered; then, the filtered raw data is extracted to generate effective echo position and signal strength, and the signal strength is converted into level data; then, the edge detection is performed on the current frame data and the foreground block and the background block are divided according to the signal strength, and the blocks in the foreground block with an area greater than a preset value are generated based on the starting position of the block and the relative position of the entire acquisition range. Multiple depth values of the strongest signal in the current frame are generated, and the depth closest to the effective position is selected from the multiple depth values as the water depth value of the current frame; finally, a signal feature set is constructed, the raw data with the highest level data is saved in the signal feature set, and comprehensive deviation data is generated based on the data in the signal feature set, and the water depth value of the current frame is updated based on the comprehensive deviation data, wherein the comprehensive deviation data includes a signal strength deviation coefficient, an echo spacing deviation coefficient, and a water depth deviation coefficient. The problem that the sonar equipment is difficult to accurately identify the real seabed reflection signal is solved.
[0081] Exemplarily, the computer program described in the third and fourth embodiments of the present invention may be divided into one or more modules, and the one or more modules are stored in the memory and executed by the processor to complete the present invention. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the device for implementing a water depth detection device based on sonar. For example, the device described in the second embodiment of the present invention.
[0082] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the method for detecting water depth based on sonar, and uses various interfaces and lines to connect the various parts of the method for detecting water depth based on sonar.
[0083] The memory can be used to store the computer program and / or module, and the processor realizes various functions of a method for detecting water depth based on sonar by running or executing the computer program and / or module stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, a text conversion function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, text message data, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0084] Wherein, if the implemented module is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0085] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.
[0086] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for detecting water depth based on sonar, characterized in that: include: Acquire raw data collected by the sonar, and filter the raw data; Extracting the filtered raw data to generate effective echo positions and signal strengths, and converting the signal strengths into level data; Perform edge detection on the current frame data and divide the foreground block and the background block according to the signal strength, generate multiple depth values of the strongest signal in the current frame from the blocks in the foreground block whose area is greater than a preset value based on the starting position of the block and the relative position of the entire acquisition range, and select the depth closest to the effective position from the multiple depth values as the water depth value of the current frame; Construct a signal feature set, save the original data with the highest level data in the signal feature set, generate comprehensive deviation data based on the data in the signal feature set, and update the water depth value of the current frame based on the comprehensive deviation data, wherein the comprehensive deviation data includes a signal strength deviation coefficient, an echo spacing deviation coefficient, and a water depth deviation coefficient.
2. The method for detecting water depth based on sonar according to claim 1, characterized in that: The obtaining of raw data collected by the sonar and filtering of the raw data are specifically as follows: A frame of raw data collected by the sonar is obtained, and the raw data is processed using an IIR bandwidth filter or a FIR bandwidth filter to filter out signals of non-target frequencies and retain a frame of data containing target frequency components, The original data after bandwidth filtering is subjected to same-frequency filtering to eliminate same-frequency interference.
3. The method for detecting water depth based on sonar according to claim 1, characterized in that: The edge detection of the current frame data is performed and the foreground block and the background block are divided according to the signal strength, specifically: The current frame data is processed by edge detection to determine the strongest level X of the current frame data, and the data with a level range of [X-1, X] is divided into foreground blocks, and the data with a level range less than X-2 is divided into background blocks.
4. The method for detecting water depth based on sonar according to claim 1, characterized in that: The signal feature set is constructed, the original data with the highest level of data is stored in the signal feature set, comprehensive deviation data is generated based on the data in the signal feature set, and the water depth value of the current frame is updated based on the comprehensive deviation data; Constructing a signal feature set for storing signal values, signal strengths, water depth values, signal strength deviation coefficients, echo spacing deviation coefficients, and water depth deviation coefficients; Traverse the original data, save the signal value, signal strength, and water depth value of the original data with the highest level of data in the signal feature set, and set the signal strength deviation coefficient, echo spacing deviation coefficient, and water depth deviation coefficient to invalid values in the initial state; Traverse the signal feature set and calculate the comprehensive deviation coefficient of each data. If there is only one data with the lowest comprehensive deviation coefficient, the depth value in this data is used as the water depth value of the current frame. If there are multiple data with the lowest comprehensive deviation coefficients, the depth value of the data with the strongest signal strength is selected as the water depth of the current frame. The expression of the comprehensive deviation coefficient is CDC = D signal +D echo +D predict ,D signal is the signal strength deviation coefficient, D echo is the echo spacing deviation coefficient, D predict is the water depth deviation coefficient.
5. The method for detecting water depth based on sonar according to claim 1, characterized in that: The signal strength deviation coefficient is used to measure the deviation degree of the current echo value relative to the previous echo value, and its expression is: Among them, E1 is the previous echo value, and E0 is the current echo value.
6. The method for detecting water depth based on sonar according to claim 1, characterized in that: The echo spacing deviation coefficient is used to measure the difference between the current echo water depth and the average value of the adjacent echo spacing, and its expression is: Among them, M echo is the average value of the spacing between adjacent echoes, D current is the water depth of the current echo.
7. The method for detecting water depth based on sonar according to claim 1, characterized in that: The water depth deviation coefficient is used to measure the deviation between the current echo water depth and the water depth value predicted based on historical data, and its expression is: D predict-value is the average value of the predicted echo depth, D current is the water depth of the current echo.
8. A water depth detection device based on sonar, characterized in that: include: A filtering unit, used to obtain raw data collected by the sonar and filter the raw data; An intensity conversion unit, used for extracting the filtered raw data to generate effective echo positions and signal strengths, and converting the signal strengths into level data; A water depth value calculation unit is used to perform edge detection on the current frame data and divide the foreground block and the background block according to the signal strength, and generate multiple depth values of the strongest signal in the current frame based on the starting position of the block and the relative position of the entire acquisition range from the blocks in the foreground block whose area is greater than the preset value, and select the depth closest to the effective position from the multiple depth values as the water depth value of the current frame; A water depth value updating unit is used to construct a signal feature set, save the original data with the highest level data in the signal feature set, generate comprehensive deviation data based on the data in the signal feature set, and update the water depth value of the current frame based on the comprehensive deviation data, wherein the comprehensive deviation data includes a signal strength deviation coefficient, an echo spacing deviation coefficient, and a water depth deviation coefficient.
9. A water depth detection device based on sonar, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program, and the computer program can be executed by the processor to implement a method for detecting water depth based on sonar as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program is stored, and the computer program can be executed by a processor of the device where the computer-readable storage medium is located to implement a method for detecting water depth based on sonar as described in any one of claims 1 to 7.