Ultrasonic ranging method, device, computer equipment, storage medium and product

By using the synchronization code and frequency matching method in ultrasonic distance measurement, effective echoes are selected and convolutional calculations are performed, and the problem that traditional ultrasonic distance measurement is susceptible to clutter interference is solved, achieving more accurate distance measurement.

CN114384528BActive Publication Date: 2025-09-02PINGJIE ELECTRONIC TECHNOLOGY (JIANGSU) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210067837.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-20
Publication Date
2025-09-02
Estimated Expiration
2042-01-20

AI Technical Summary

Technical Problem

The ultrasonic distance measurement method uses a small frequency range and is susceptible to interference from similar frequency clutter, resulting in inaccurate distance measurement.

Method used

By obtaining the synchronization matching command, transmitting ultrasonic waves carrying the synchronization code, and when the receiver enters the synchronization matching mode, the frequency of the ultrasonic wave and the synchronization code matching are determined based on the ultrasonic wave's frequency and synchronization code matching, the effective echo is selected, and the target echo is extracted using convolution calculation to determine the distance between the device and the obstacle.

Benefits of technology

It effectively reduces clutter interference similar to the echo frequency, improves the accuracy of distance measurement and the accuracy of distance data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114384528B_ABST
    Figure CN114384528B_ABST
Patent Text Reader

Abstract

The present application relates to an ultrasonic ranging method, apparatus, computer equipment, storage medium, and computer program product. The method comprises: obtaining a synchronization matching instruction, transmitting an ultrasonic wave based on the synchronization matching instruction, and controlling an ultrasonic receiver to enter a synchronization matching mode, wherein the ultrasonic receiver monitors multiple received ultrasonic waves in the synchronization matching mode; wherein the transmitted ultrasonic wave carries a corresponding synchronization code; based on the frequency of the transmitted ultrasonic wave, multiple candidate echoes are determined from the multiple ultrasonic waves received by the ultrasonic receiver; based on the synchronization code, the multiple candidate echoes are matched with the transmitted ultrasonic wave, and the candidate echo that successfully matches the transmitted ultrasonic wave is used as a valid echo; based on the transmitted ultrasonic wave and the valid echo, the distance between the device and the obstacle is determined. This method can effectively reduce the interference of clutter with a frequency close to that of the echo.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of measurement and mapping technology, and in particular to an ultrasonic ranging method, device, computer equipment, storage medium and product. Background Art

[0002] With the development of intelligent vehicles, obstacle detection has become an indispensable part of intelligent vehicle systems. Ultrasonic detection has the advantages of low cost, compact size, and high accuracy, so ultrasonic ranging plays an important role in obstacle detection in vehicles.

[0003] In traditional technology, the received signal is filtered and compared with a preset threshold to determine whether the signal is an echo. The distance is then measured based on the time between transmitting the ultrasonic wave and receiving the echo.

[0004] However, the ultrasonic frequency range used in the above ultrasonic ranging method is small and is easily interfered by clutter of similar frequency. Summary of the Invention

[0005] Based on this, it is necessary to provide an ultrasonic ranging method, device, computer equipment, computer-readable storage medium and computer program product to address the above technical problems.

[0006] In a first aspect, the present application provides an ultrasonic ranging method. The method comprises:

[0007] Obtaining a synchronization matching instruction, sending an ultrasonic wave based on the synchronization matching instruction, and controlling the ultrasonic wave receiver to enter a synchronization matching mode. In the synchronization matching mode, the ultrasonic wave receiver monitors multiple received ultrasonic waves; wherein the transmitted ultrasonic wave carries a corresponding synchronization code;

[0008] determining a plurality of echoes to be selected from a plurality of ultrasonic waves received by an ultrasonic receiver based on the frequency of the transmitted ultrasonic wave;

[0009] Based on the synchronization code, multiple candidate echoes are matched with the transmitted ultrasonic wave, and the candidate echo that successfully matches the transmitted ultrasonic wave is regarded as the valid echo;

[0010] The distance between the device and the obstacle is determined based on the transmitted ultrasonic wave and the effective echo.

[0011] In one embodiment, determining a plurality of echoes to be selected from a plurality of ultrasonic waves received by an ultrasonic receiver based on the frequency of the transmitted ultrasonic wave comprises:

[0012] Obtaining frequencies of multiple ultrasonic waves received by an ultrasonic receiver;

[0013] The frequencies of the multiple ultrasonic waves received by the ultrasonic receiver are matched with the frequencies of the transmitted ultrasonic waves to obtain multiple ultrasonic waves within a preset frequency range, and the ultrasonic waves within the preset frequency range are used as echoes to be selected.

[0014] In one embodiment, based on the synchronization code, multiple candidate echoes are matched with the transmitted ultrasonic wave, and the candidate echo that successfully matches the transmitted ultrasonic wave is used as a valid echo, including:

[0015] Obtaining synchronization codes from multiple echoes to be selected;

[0016] The synchronization codes of multiple echoes to be selected are matched with the synchronization code of the transmitted ultrasonic wave. When the synchronization code of a echo to be selected successfully matches the synchronization code of the transmitted ultrasonic wave, the echo to be selected is regarded as a valid echo.

[0017] In one embodiment, matching the synchronization codes of the plurality of selected echoes with the synchronization code of the transmitted ultrasonic wave comprises:

[0018] Acquire the frame format of the synchronization code for transmitting ultrasonic waves and the frame format of the synchronization codes of multiple echoes to be selected;

[0019] The frame formats of the synchronization codes of the multiple echoes to be selected are matched with the frame formats of the synchronization codes of the transmitted ultrasound waves. When the frame formats of the synchronization codes of the echoes to be selected are consistent with the frame formats of the synchronization codes of the transmitted ultrasound waves, the synchronization codes of the echoes to be selected are matched successfully with the synchronization codes of the transmitted ultrasound waves.

[0020] In one embodiment, determining the distance between the device and the obstacle based on the transmitted ultrasonic wave and the effective echo includes:

[0021] Perform convolution calculation on the effective echo and the transmitted ultrasonic wave to obtain the target echo, and obtain the time difference from the emission of the transmitted ultrasonic wave to the acquisition of the target echo;

[0022] Based on the time difference, the distance between the device and the obstacle is determined.

[0023] In one embodiment, performing convolution calculation on the effective echo and the transmitted ultrasonic wave to obtain the target echo includes:

[0024] Perform convolution operation on the effective echo and the transmitted ultrasonic wave in four different quadrants at the same time to obtain the convolution values ​​in the four quadrants;

[0025] The largest convolution value is selected from the convolution values ​​in the four quadrants, and the largest convolution value is compared with a preset threshold. When the largest convolution value is greater than the preset threshold, the target echo is extracted.

[0026] In a second aspect, the present application further provides an ultrasonic distance measuring device. The device comprises:

[0027] The ultrasonic transceiver module is used to obtain a synchronization matching instruction, send a transmission ultrasonic wave based on the synchronization matching instruction, and control the ultrasonic receiver to enter a synchronization matching mode. In the synchronization matching mode, the ultrasonic receiver monitors multiple received ultrasonic waves; wherein the transmitted ultrasonic wave carries a corresponding synchronization code;

[0028] a candidate echo determination module, configured to determine a plurality of candidate echoes from a plurality of ultrasonic waves received by an ultrasonic receiver based on the frequency of the transmitted ultrasonic wave;

[0029] The echo matching module is used to match multiple candidate echoes with the transmitted ultrasonic wave based on the synchronization code, and take the candidate echo that successfully matches the transmitted ultrasonic wave as the valid echo;

[0030] The ranging module is used to determine the distance between the device and obstacles based on the transmitted ultrasonic waves and the effective echo.

[0031] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in any one of the above embodiments when executing the computer program.

[0032] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any of the above embodiments.

[0033] In a fifth aspect, the present application further provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the method described in any of the above embodiments.

[0034] The ultrasonic ranging method, apparatus, computer device, storage medium, and computer program product described above first obtain a synchronization matching instruction. Based on the synchronization matching instruction, an ultrasonic wave is transmitted and an ultrasonic receiver is controlled to enter a synchronization matching mode. In the synchronization matching mode, the ultrasonic receiver monitors multiple received ultrasonic waves; the transmitted ultrasonic wave carries a corresponding synchronization code. Receiving the wave in the synchronization matching mode can reduce received clutter. Furthermore, based on the frequency of the transmitted ultrasonic wave, multiple candidate echoes are determined from the multiple ultrasonic waves received by the ultrasonic receiver. Furthermore, based on the synchronization code, the multiple candidate echoes are matched with the transmitted ultrasonic wave, and the candidate echo that successfully matches the transmitted ultrasonic wave is designated as a valid echo. Matching the synchronization code of the transmitted ultrasonic wave can effectively reduce interference from clutter with a similar echo frequency. Furthermore, based on the transmitted ultrasonic wave and the valid echo, the distance between the device and the obstacle is determined. Based on the valid echo with higher accuracy, more accurate distance data can be obtained. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 1 is a flow chart of an ultrasonic ranging method according to an embodiment;

[0036] Figure 2 FIG1 is a waveform diagram of ultrasonic wave emission in one embodiment;

[0037] Figure 3 is a schematic diagram of a frame format of a synchronization code for transmitting ultrasonic waves in one embodiment;

[0038] Figure 4 is a waveform diagram of a valid echo including clutter and noise in another embodiment;

[0039] Figure 5 is a structural block diagram of an ultrasonic ranging device in one embodiment;

[0040] Figure 6 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0042] The ultrasonic ranging method provided in the embodiment of the present application can be applied to a server or a terminal for single-side implementation, or can be applied to a system including a terminal and a server, and implemented through the interaction between the terminal and the server.

[0043] The ultrasonic ranging method provided in the embodiments of the present application can be applied to distance measurement applications such as parking assistance systems, intelligent blind guide systems, and mobile robots. A ranging device can provide a device with an environment for implementing ultrasonic ranging. The ranging device communicates with the device to enter the ultrasonic ranging environment. The ranging device transmits ultrasonic waves through this environment to multiple obstacles and receives candidate echoes returned by the multiple obstacles. The ranging device performs a pass / fail match on the candidate echoes returned by the multiple obstacles, filters out valid echoes, and extracts target echoes from the valid echoes. The distance to the obstacle is determined based on the time at which the target echo is received.

[0044] The equipment may include but is not limited to smart vehicle-mounted equipment, robots, smart guide devices, smart watches, smart bracelets, head-mounted devices, etc. Obstacles may include but are not limited to oncoming vehicles, rocks, etc.

[0045] In one embodiment, Figure 1As shown, an ultrasonic ranging method is provided, which is described by taking the application of the method to a parking assistance system as an example, and includes the following steps:

[0046] Step 202, obtain a synchronization matching instruction, send a transmitted ultrasonic wave based on the synchronization matching instruction, and control the ultrasonic receiver to enter a synchronization matching mode. In the synchronization matching mode, the ultrasonic receiver monitors multiple received ultrasonic waves; wherein the transmitted ultrasonic wave carries a corresponding synchronization code.

[0047] In this embodiment, after the distance measuring device obtains the synchronization matching instruction issued by the user, Figure 2 As shown, ultrasonic waves are transmitted for distance measurement.

[0048] In this embodiment, the synchronization matching instruction issued by the user may include but is not limited to instructions such as parking and reversing that require a distance measurement function.

[0049] In this embodiment, the ultrasonic receiver can receive all ultrasonic waves within its acceptable frequency range in the synchronous mode.

[0050] In another embodiment, the ultrasonic receiver may also receive all ultrasonic waves within the frequency range it can receive and within the preset frequency range through a filter (such as a low-pass filter, a high-pass filter, etc.) in the synchronous mode.

[0051] In this embodiment, one frequency of ultrasonic wave corresponds to one synchronization code, wherein the synchronization code can be 8-bit (BIT, Binary digit) data. For example, the synchronization code of the ultrasonic wave transmitted at a frequency of 48k can be set to 8-bit data such as 10001010.

[0052] Step 204 : determining a plurality of echoes to be selected from a plurality of ultrasonic waves received by an ultrasonic receiver based on the frequency of the transmitted ultrasonic wave.

[0053] In this embodiment, based on the frequency of the transmitted ultrasonic wave, the distance measuring device selects a plurality of ultrasonic waves with the same frequency from a plurality of ultrasonic waves received by the ultrasonic receiver as echoes to be selected.

[0054] Step 206: Based on the synchronization code, multiple candidate echoes are matched with the transmitted ultrasonic wave, and the candidate echo that successfully matches the transmitted ultrasonic wave is used as a valid echo.

[0055] In this embodiment, based on the one-to-one relationship between the synchronization code and the transmitted ultrasonic wave, and the corresponding relationship between the transmitted ultrasonic wave and the valid echo, the ranging device obtains the synchronization codes of multiple echoes to be selected, and matches the synchronization codes of the multiple echoes to be selected with the synchronization code of the transmitted ultrasonic wave.

[0056] Step 208: Determine the distance between the device and the obstacle based on the transmitted ultrasonic wave and the effective echo.

[0057] In this embodiment, the device may be a vehicle or an intelligent vehicle-mounted device, and obstacles may include but are not limited to oncoming vehicles, rocks, pedestrians, and the like.

[0058] In this embodiment, the distance measuring device is based on transmitting ultrasonic waves and valid echoes, and can extract the target echo corresponding to the transmitted ultrasonic waves from the valid echoes.

[0059] In this embodiment, the effective echoes received by the ultrasonic receiver may include, in addition to target clutter, but may also include, but are not limited to, noise, clutter echoes of other frequencies, and the like.

[0060] In this embodiment, after the distance measuring device extracts the target echo corresponding to the transmitted ultrasonic wave from the effective echo, it can determine the distance between the device and the obstacle based on the time when the target echo is obtained. Specifically, when the transmission and reception time from the transmission of the ultrasonic wave to the receipt of the target echo is Δt, based on the speed of sound c, the distance L between the device and the obstacle is calculated as shown in formula (1):

[0061] L=cΔt / 2 (1)

[0062] In the above-mentioned ultrasonic ranging method, a synchronization matching instruction is first obtained. Based on the synchronization matching instruction, an ultrasonic wave is transmitted, and the ultrasonic receiver is controlled to enter a synchronization matching mode. In the synchronization matching mode, the ultrasonic receiver monitors multiple received ultrasonic waves; wherein, the transmitted ultrasonic wave carries a corresponding synchronization code. Receiving in the synchronization matching mode can reduce the amount of received clutter. Furthermore, based on the frequency of the transmitted ultrasonic wave, multiple candidate echoes are determined from the multiple ultrasonic waves received by the ultrasonic receiver. Furthermore, based on the synchronization code, the multiple candidate echoes are matched with the transmitted ultrasonic wave, and the candidate echo that successfully matches the transmitted ultrasonic wave is regarded as the valid echo. Matching the synchronization code of the transmitted ultrasonic wave can effectively reduce the interference of clutter with a similar echo frequency. Furthermore, based on the transmitted ultrasonic wave and the valid echo, the distance between the device and the obstacle is determined. Based on the valid echo with higher accuracy, more accurate distance data can be obtained.

[0063] In one embodiment, based on the frequency of the transmitted ultrasonic wave, multiple echoes to be selected are determined from multiple ultrasonic waves received by an ultrasonic receiver, including: obtaining the frequencies of the multiple ultrasonic waves received by the ultrasonic receiver; matching the frequencies of the multiple ultrasonic waves received by the ultrasonic receiver with the frequencies of the transmitted ultrasonic wave, respectively, to obtain multiple ultrasonic waves within a preset frequency range, and using the ultrasonic waves within the preset frequency range as echoes to be selected.

[0064] In this embodiment, because the multiple ultrasonic waves received by the ultrasonic receiver may include, but are not limited to, target echoes, noise, and clutter of other frequencies, the ranging device can use the ultrasonic receiver to obtain ultrasonic waves with a frequency close to the transmitted ultrasonic wave as candidate echoes. For example, if the transmitted ultrasonic wave frequency is 24 kHz, the preset frequency range may be 24 kHz ± 0.5 kHz.

[0065] In one embodiment, based on the synchronization code, multiple candidate echoes are matched with the transmitted ultrasonic wave, and the candidate echo that successfully matches the transmitted ultrasonic wave is used as the valid echo, including: obtaining the synchronization code in the multiple candidate echoes; matching the synchronization code of the multiple candidate echoes with the synchronization code of the transmitted ultrasonic wave, when the synchronization code of a candidate echo successfully matches the synchronization code of the transmitted ultrasonic wave, the candidate echo is used as the valid echo.

[0066] In this embodiment, the ranging device obtains the synchronization codes of multiple ultrasonic waves received by the ultrasonic receiver. Since the synchronization codes correspond one-to-one to the frequencies of the ultrasonic waves, the ranging device can obtain the frequencies of the multiple ultrasonic waves received by the ultrasonic receiver based on the synchronization codes of the multiple ultrasonic waves received by the ultrasonic receiver.

[0067] In this embodiment, the ranging device matches the synchronization codes of multiple candidate echoes with the transmitted ultrasonic wave through the synchronization code, and can obtain the candidate echoes that are consistent with the transmitted ultrasonic wave frequency. The ranging device takes the candidate echoes that are consistent with the transmitted ultrasonic wave frequency as valid echoes.

[0068] In one embodiment, the synchronization codes of multiple echoes to be selected are matched with the synchronization code of the transmitted ultrasonic wave, including: obtaining the frame format of the synchronization code of the transmitted ultrasonic wave and the frame format of the synchronization codes of the multiple echoes to be selected; matching the frame formats of the synchronization codes of the multiple echoes to be selected with the frame format of the synchronization code of the transmitted ultrasonic wave respectively, and when the frame format of the synchronization code of the echo to be selected is consistent with the frame format of the synchronization code of the transmitted ultrasonic wave, the synchronization code of the echo to be selected is successfully matched with the synchronization code of the transmitted ultrasonic wave.

[0069] In this embodiment, the synchronization code has the following characteristics: Figure 3 As shown in the frame format, the frame format of the synchronization code is generated simultaneously with the synchronization code, and has a one-to-one correspondence with the corresponding synchronization code.

[0070] In this embodiment, when the frame format of the synchronization code of the echo to be selected is consistent with the frame format of the synchronization code of the transmitted ultrasonic wave, it indicates that the frequency of the echo to be selected is consistent with the frequency of the transmitted ultrasonic wave.

[0071] In one embodiment, the distance between the device and the obstacle is determined based on the transmitted ultrasonic wave and the effective echo, including: performing a convolution calculation on the effective echo and the transmitted ultrasonic wave to obtain the target echo, obtaining the time difference from the emission of the transmitted ultrasonic wave to the acquisition of the target echo; and determining the distance between the device and the obstacle based on the time difference.

[0072] In this embodiment, the expression for transmitting ultrasonic waves is shown in formula (2):

[0073] s(t) send =Asin(2πft) (2)

[0074] In this embodiment, the expression for receiving ultrasonic waves is shown in formula (3):

[0075] s(t) rec =A1sin(2πft+θ1)+A2sin(2πf1t+θ 12 )+n (3)

[0076] Where t is the ultrasonic propagation time, A1, A2, and A3 are the ultrasonic signal amplitudes, f is the frequency of the transmitted ultrasonic wave, f1 is the frequency of the clutter signal, θ1 and θ2 are the ultrasonic phase differences, and n is the noise.

[0077] In this embodiment, the ranging device performs convolution calculation on the transmitted ultrasonic wave and the received ultrasonic wave, as shown in formula (4):

[0078]

[0079] In this embodiment, if Figure 4 As shown, the transmitted ultrasonic wave is uncorrelated with noise and clutter, but highly correlated with the target echo. Therefore, the ranging device can use convolution to extract the target echo from the valid echo. The ranging device can use the high correlation between the transmitted ultrasonic wave and the target echo envelope to capture the target echo in the valid echo. By performing a convolution calculation on the transmitted and received ultrasonic waves, the maximum value of the convolution result is obtained. The time when the maximum value of the convolution result occurs is determined as the position of the target echo in the valid echo.

[0080] In one embodiment, a convolution calculation is performed on the effective echo and the transmitted ultrasonic wave to obtain a target echo, including: performing a convolution operation on the effective echo and the transmitted ultrasonic wave in four different quadrants at the same time to obtain convolution values ​​in the four quadrants; selecting the largest convolution value from the convolution values ​​in the four quadrants, comparing the largest convolution value with a preset threshold, and extracting the target echo when the largest convolution value is greater than the preset threshold.

[0081] In this embodiment, based on the expression for transmitting ultrasonic waves shown in formula (2), the expressions for transmitting ultrasonic waves in the four quadrants are shown in formula (5):

[0082]

[0083] Among them, n=1, 2, 3, 4, corresponding to the four quadrants respectively.

[0084] In this embodiment, based on the expression of transmitting ultrasonic waves in the four quadrants shown in formula (5), convolution calculation is performed on the transmitted ultrasonic waves and the received ultrasonic waves in the four quadrants, as shown in formula (6):

[0085]

[0086] Among them, n=1, 2, 3, 4, corresponding to the four quadrants respectively.

[0087] In this embodiment, because a phase offset may exist between the valid echo and the transmitted ultrasonic wave, this can sometimes result in a smaller convolution value than desired. Therefore, the ranging device can simultaneously perform convolution calculations on the four quadrants of the valid echo and select the largest convolution value among the four quadrants as the valid convolution result. Furthermore, the ranging device compares the valid convolution result with a preset threshold. If the valid convolution result, i.e., the largest convolution value, is greater than the preset threshold, indicating that the target echo is present in the valid echo, the target echo is then extracted.

[0088] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0089] Based on the same inventive concept, embodiments of the present application further provide an ultrasonic ranging device for implementing the aforementioned ultrasonic ranging method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more ultrasonic ranging device embodiments provided below can be found in the above-described limitations of the ultrasonic ranging method and will not be further elaborated here.

[0090] In one embodiment, Figure 5 As shown, an ultrasonic ranging device is provided, comprising: an ultrasonic transceiver module 100, a candidate echo determination module 200, an echo matching module 300 and a ranging module 400, wherein:

[0091] The ultrasonic transceiver module 100 is used to obtain a synchronization matching instruction, send and transmit ultrasonic waves based on the synchronization matching instruction, and control the ultrasonic receiver to enter a synchronization matching mode. In the synchronization matching mode, the ultrasonic receiver monitors multiple received ultrasonic waves; wherein the transmitted ultrasonic waves carry a corresponding synchronization code.

[0092] The candidate echo determination module 200 is configured to determine a plurality of candidate echoes from a plurality of ultrasonic waves received by an ultrasonic receiver based on the frequency of the transmitted ultrasonic waves.

[0093] The echo matching module 300 is used to match multiple candidate echoes with the transmitted ultrasonic wave based on the synchronization code, and take the candidate echo that successfully matches the transmitted ultrasonic wave as a valid echo.

[0094] The ranging module 400 is used to determine the distance between the device and the obstacle based on the transmitted ultrasonic wave and the effective echo.

[0095] In one embodiment, the candidate echo determination module 200 may include:

[0096] The frequency acquisition submodule is used to acquire the frequencies of multiple ultrasonic waves received by the ultrasonic receiver.

[0097] The frequency matching submodule is used to match the frequencies of multiple ultrasonic waves received by the ultrasonic receiver with the frequencies of the transmitted ultrasonic waves, obtain multiple ultrasonic waves within a preset frequency range, and use the ultrasonic waves within the preset frequency range as the echoes to be selected.

[0098] In one embodiment, the echo matching module 300 may include:

[0099] The synchronization code acquisition submodule is used to obtain synchronization codes from multiple echoes to be selected.

[0100] The synchronization code matching submodule is used to match the synchronization codes of multiple echoes to be selected with the synchronization code of the transmitted ultrasonic wave. When the synchronization code of a echo to be selected successfully matches the synchronization code of the transmitted ultrasonic wave, the echo to be selected is regarded as a valid echo.

[0101] In one embodiment, the synchronization code matching submodule may include:

[0102] The frame format acquisition unit is used to acquire the frame format of the synchronization code of the transmitted ultrasonic wave and the frame format of the synchronization codes of the multiple echoes to be selected.

[0103] The frame format matching unit is used to match the frame formats of the synchronization codes of multiple echoes to be selected with the frame formats of the synchronization code of the transmitted ultrasonic wave. When the frame format of the synchronization code of the echo to be selected is consistent with the frame format of the synchronization code of the transmitted ultrasonic wave, the synchronization code of the echo to be selected is successfully matched with the synchronization code of the transmitted ultrasonic wave.

[0104] In one embodiment, the ranging module 400 may include:

[0105] The time difference acquisition submodule is used to perform convolution calculation on the effective echo and the transmitted ultrasonic wave to obtain the target echo and obtain the time difference from sending the transmitted ultrasonic wave to obtaining the target echo.

[0106] The distance determination submodule is used to determine the distance between the device and the obstacle based on the time difference.

[0107] In one embodiment, the time difference acquisition submodule may include:

[0108] The convolution unit is used to perform convolution operation on the effective echo and the transmitted ultrasonic wave in four different quadrants at the same time to obtain the convolution values ​​in the four quadrants.

[0109] The target echo extraction unit is used to select the largest convolution value from the convolution values ​​in the four quadrants, compare the largest convolution value with a preset threshold, and extract the target echo when the largest convolution value is greater than the preset threshold.

[0110] Each module in the ultrasonic ranging device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0111] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store data such as synchronization codes and frame formats. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, an ultrasonic ranging method is implemented.

[0112] Those skilled in the art will understand that Figure 6The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0113] In one embodiment, a computer device is provided, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: obtaining a synchronization matching instruction, transmitting an ultrasonic wave based on the synchronization matching instruction, and controlling an ultrasonic receiver to enter a synchronization matching mode, wherein the ultrasonic receiver monitors multiple received ultrasonic waves in the synchronization matching mode; wherein the transmitted ultrasonic wave carries a corresponding synchronization code; based on the frequency of the transmitted ultrasonic wave, determining multiple candidate echoes from the multiple ultrasonic waves received by the ultrasonic receiver; based on the synchronization code, matching the multiple candidate echoes with the transmitted ultrasonic wave, and using the candidate echo that successfully matches the transmitted ultrasonic wave as a valid echo; and determining the distance between the device and the obstacle based on the transmitted ultrasonic wave and the valid echo.

[0114] In one embodiment, when the processor executes the computer program, it also determines multiple echoes to be selected from multiple ultrasonic waves received by the ultrasonic receiver based on the frequency of the transmitted ultrasonic wave, which can include: obtaining the frequencies of the multiple ultrasonic waves received by the ultrasonic receiver; matching the frequencies of the multiple ultrasonic waves received by the ultrasonic receiver with the frequencies of the transmitted ultrasonic wave, respectively, to obtain multiple ultrasonic waves within a preset frequency range, and using the ultrasonic waves within the preset frequency range as echoes to be selected.

[0115] In one embodiment, when the processor executes the computer program, it also implements matching of multiple candidate echoes with the transmitted ultrasonic wave based on the synchronization code, and taking the candidate echo that successfully matches the transmitted ultrasonic wave as the valid echo, which can include: obtaining the synchronization code from the multiple candidate echoes; matching the synchronization codes of the multiple candidate echoes with the synchronization code of the transmitted ultrasonic wave, and when the synchronization code of a candidate echo successfully matches the synchronization code of the transmitted ultrasonic wave, taking the candidate echo as the valid echo.

[0116] In one embodiment, when the processor executes the computer program, it also realizes matching the synchronization codes of multiple echoes to be selected with the synchronization code of the transmitted ultrasonic wave, which may include: obtaining the frame format of the synchronization code of the transmitted ultrasonic wave and the frame format of the synchronization codes of multiple echoes to be selected; matching the frame format of the synchronization codes of multiple echoes to be selected with the frame format of the synchronization code of the transmitted ultrasonic wave respectively. When the frame format of the synchronization code of the echo to be selected is consistent with the frame format of the synchronization code of the transmitted ultrasonic wave, the synchronization code of the echo to be selected is successfully matched with the synchronization code of the transmitted ultrasonic wave.

[0117] In one embodiment, when the processor executes the computer program, it also determines the distance between the device and the obstacle based on the transmitted ultrasonic wave and the effective echo, which may include: performing a convolution calculation on the effective echo and the transmitted ultrasonic wave to obtain the target echo, obtaining the time difference from the emission of the transmitted ultrasonic wave to the acquisition of the target echo; and determining the distance between the device and the obstacle based on the time difference.

[0118] In one embodiment, when the processor executes the computer program, it also implements convolution calculation on the effective echo and the transmitted ultrasonic wave to obtain the target echo, which may include: performing convolution operation on the effective echo and the transmitted ultrasonic wave in four different quadrants at the same time to obtain convolution values ​​in the four quadrants; selecting the largest convolution value from the convolution values ​​in the four quadrants, comparing the largest convolution value with a preset threshold, and extracting the target echo when the largest convolution value is greater than the preset threshold.

[0119] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining a synchronization matching instruction, sending a transmitted ultrasonic wave based on the synchronization matching instruction, and controlling an ultrasonic receiver to enter a synchronization matching mode, wherein the ultrasonic receiver monitors multiple received ultrasonic waves in the synchronization matching mode; wherein the transmitted ultrasonic wave carries a corresponding synchronization code; based on the frequency of the transmitted ultrasonic wave, multiple candidate echoes are determined from the multiple ultrasonic waves received by the ultrasonic receiver; based on the synchronization code, the multiple candidate echoes are matched with the transmitted ultrasonic wave, and the candidate echo that successfully matches the transmitted ultrasonic wave is used as a valid echo; and based on the transmitted ultrasonic wave and the valid echo, the distance between the device and the obstacle is determined.

[0120] In one embodiment, when the computer program is executed by the processor, it is also implemented to determine multiple echoes to be selected from multiple ultrasonic waves received by the ultrasonic receiver based on the frequency of the transmitted ultrasonic wave, which may include: obtaining the frequencies of the multiple ultrasonic waves received by the ultrasonic receiver; matching the frequencies of the multiple ultrasonic waves received by the ultrasonic receiver with the frequencies of the transmitted ultrasonic wave, respectively, to obtain multiple ultrasonic waves within a preset frequency range, and using the ultrasonic waves within the preset frequency range as echoes to be selected.

[0121] In one embodiment, when the computer program is executed by the processor, it is also implemented to match multiple candidate echoes with the transmitted ultrasonic wave based on the synchronization code, and to use the candidate echo that successfully matches the transmitted ultrasonic wave as the valid echo, which can include: obtaining the synchronization code from the multiple candidate echoes; matching the synchronization codes of the multiple candidate echoes with the synchronization code of the transmitted ultrasonic wave, and when the synchronization code of a candidate echo successfully matches the synchronization code of the transmitted ultrasonic wave, the candidate echo is used as the valid echo.

[0122] In one embodiment, when the computer program is executed by the processor, it also realizes matching the synchronization codes of multiple echoes to be selected with the synchronization code of the transmitted ultrasonic wave, which may include: obtaining the frame format of the synchronization code of the transmitted ultrasonic wave and the frame format of the synchronization codes of multiple echoes to be selected; matching the frame format of the synchronization codes of multiple echoes to be selected with the frame format of the synchronization code of the transmitted ultrasonic wave respectively; when the frame format of the synchronization code of the echo to be selected is consistent with the frame format of the synchronization code of the transmitted ultrasonic wave, the synchronization code of the echo to be selected is successfully matched with the synchronization code of the transmitted ultrasonic wave.

[0123] In one embodiment, when the computer program is executed by the processor, it also implements determining the distance between the device and the obstacle based on the transmitted ultrasonic wave and the effective echo, which may include: performing a convolution calculation on the effective echo and the transmitted ultrasonic wave to obtain the target echo, obtaining the time difference from the emission of the transmitted ultrasonic wave to the acquisition of the target echo; and determining the distance between the device and the obstacle based on the time difference.

[0124] In one embodiment, when the computer program is executed by the processor, it also implements convolution calculation of the effective echo and the transmitted ultrasonic wave to obtain the target echo, which may include: performing convolution operation on the effective echo and the transmitted ultrasonic wave in four different quadrants at the same time to obtain convolution values ​​in the four quadrants; selecting the largest convolution value from the convolution values ​​in the four quadrants, comparing the largest convolution value with a preset threshold, and extracting the target echo when the largest convolution value is greater than the preset threshold.

[0125] In one embodiment, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the following steps: obtaining a synchronization matching instruction, transmitting an ultrasonic wave based on the synchronization matching instruction, and controlling an ultrasonic receiver to enter a synchronization matching mode, wherein the ultrasonic receiver monitors multiple received ultrasonic waves in the synchronization matching mode; wherein the transmitted ultrasonic wave carries a corresponding synchronization code; based on the frequency of the transmitted ultrasonic wave, determining multiple candidate echoes from the multiple ultrasonic waves received by the ultrasonic receiver; based on the synchronization code, matching the multiple candidate echoes with the transmitted ultrasonic wave, and using the candidate echo that successfully matches the transmitted ultrasonic wave as a valid echo; and determining the distance between the device and the obstacle based on the transmitted ultrasonic wave and the valid echo.

[0126] In one embodiment, when the computer program is executed by the processor, it is also implemented to determine multiple echoes to be selected from multiple ultrasonic waves received by the ultrasonic receiver based on the frequency of the transmitted ultrasonic wave, which may include: obtaining the frequencies of the multiple ultrasonic waves received by the ultrasonic receiver; matching the frequencies of the multiple ultrasonic waves received by the ultrasonic receiver with the frequencies of the transmitted ultrasonic wave, respectively, to obtain multiple ultrasonic waves within a preset frequency range, and using the ultrasonic waves within the preset frequency range as echoes to be selected.

[0127] In one embodiment, when the computer program is executed by the processor, it is also implemented to match multiple candidate echoes with the transmitted ultrasonic wave based on the synchronization code, and to use the candidate echo that successfully matches the transmitted ultrasonic wave as the valid echo, which can include: obtaining the synchronization code from the multiple candidate echoes; matching the synchronization codes of the multiple candidate echoes with the synchronization code of the transmitted ultrasonic wave, and when the synchronization code of a candidate echo successfully matches the synchronization code of the transmitted ultrasonic wave, the candidate echo is used as the valid echo.

[0128] In one embodiment, when the computer program is executed by the processor, it also realizes matching the synchronization codes of multiple echoes to be selected with the synchronization code of the transmitted ultrasonic wave, which may include: obtaining the frame format of the synchronization code of the transmitted ultrasonic wave and the frame format of the synchronization codes of multiple echoes to be selected; matching the frame format of the synchronization codes of multiple echoes to be selected with the frame format of the synchronization code of the transmitted ultrasonic wave respectively; when the frame format of the synchronization code of the echo to be selected is consistent with the frame format of the synchronization code of the transmitted ultrasonic wave, the synchronization code of the echo to be selected is successfully matched with the synchronization code of the transmitted ultrasonic wave.

[0129] In one embodiment, when the computer program is executed by the processor, it also implements determining the distance between the device and the obstacle based on the transmitted ultrasonic wave and the effective echo, which may include: performing a convolution calculation on the effective echo and the transmitted ultrasonic wave to obtain the target echo, obtaining the time difference from the emission of the transmitted ultrasonic wave to the acquisition of the target echo; and determining the distance between the device and the obstacle based on the time difference.

[0130] In one embodiment, when the computer program is executed by the processor, it also implements convolution calculation of the effective echo and the transmitted ultrasonic wave to obtain the target echo, which may include: performing convolution operation on the effective echo and the transmitted ultrasonic wave in four different quadrants at the same time to obtain convolution values ​​in the four quadrants; selecting the largest convolution value from the convolution values ​​in the four quadrants, comparing the largest convolution value with a preset threshold, and extracting the target echo when the largest convolution value is greater than the preset threshold.

[0131] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.

[0132] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0133] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. An ultrasonic ranging method, characterized in that: The method comprises: Obtaining a synchronization matching instruction, sending a transmitted ultrasonic wave based on the synchronization matching instruction, and controlling the ultrasonic wave receiver to enter a synchronization matching mode, wherein the ultrasonic wave receiver monitors a plurality of received ultrasonic waves in the synchronization matching mode; wherein the transmitted ultrasonic wave carries a corresponding synchronization code; determining a plurality of echoes to be selected from a plurality of ultrasonic waves received by an ultrasonic receiver based on the frequency of the transmitted ultrasonic wave; Based on the synchronization code, the plurality of candidate echoes are matched with the transmitted ultrasonic wave, and the candidate echo that successfully matches the transmitted ultrasonic wave is taken as a valid echo; Determining the distance between the device and the obstacle based on the transmitted ultrasonic wave and the effective echo, including: performing a convolution operation on the effective echo and the transmitted ultrasonic wave in four different quadrants simultaneously to obtain convolution values ​​in the four quadrants; Selecting the largest convolution value from the convolution values ​​in the four quadrants, comparing the largest convolution value with a preset threshold, and extracting the target echo when the largest convolution value is greater than the preset threshold; obtaining the time difference from emitting the ultrasonic wave to obtaining the target echo; Based on the time difference, the distance between the device and the obstacle is determined.

2. The method according to claim 1, characterized in that The step of determining a plurality of echoes to be selected from a plurality of ultrasonic waves received by an ultrasonic receiver based on the frequency of the transmitted ultrasonic wave comprises: Obtaining frequencies of multiple ultrasonic waves received by an ultrasonic receiver; The frequencies of the multiple ultrasonic waves received by the ultrasonic receiver are matched with the frequencies of the transmitted ultrasonic waves to obtain multiple ultrasonic waves within a preset frequency range, and the ultrasonic waves within the preset frequency range are used as echoes to be selected.

3. The method according to claim 2, characterized in that The method of matching the plurality of candidate echoes with the transmitted ultrasonic wave based on the synchronization code and taking the candidate echo that successfully matches the transmitted ultrasonic wave as a valid echo includes: Acquiring synchronization codes from a plurality of echoes to be selected; The synchronization codes of the plurality of echoes to be selected are matched with the synchronization code of the transmitted ultrasonic wave. When the synchronization code of a echo to be selected successfully matches the synchronization code of the transmitted ultrasonic wave, the echo to be selected is used as a valid echo.

4. The method according to claim 3, characterized in that The step of matching the synchronization codes of the plurality of echoes to be selected with the synchronization code of the transmitted ultrasonic wave comprises: Acquire the frame format of the synchronization code of the transmitted ultrasonic wave and the frame format of the synchronization codes of the plurality of echoes to be selected; The frame formats of the synchronization codes of the multiple echoes to be selected are matched with the frame formats of the synchronization codes of the transmitted ultrasonic waves respectively. When the frame formats of the synchronization codes of the echoes to be selected are consistent with the frame formats of the synchronization codes of the transmitted ultrasonic waves, the synchronization codes of the echoes to be selected are successfully matched with the synchronization codes of the transmitted ultrasonic waves.

5. An ultrasonic distance measuring device, characterized in that: The device comprises: The ultrasonic transceiver module is used to obtain a synchronization matching instruction, send a transmission ultrasonic wave based on the synchronization matching instruction, and control the ultrasonic receiver to enter a synchronization matching mode. In the synchronization matching mode, the ultrasonic receiver monitors multiple received ultrasonic waves; wherein the transmitted ultrasonic wave carries a corresponding synchronization code; a candidate echo determination module, configured to determine a plurality of candidate echoes from a plurality of ultrasonic waves received by an ultrasonic receiver based on the frequency of the transmitted ultrasonic wave; an echo matching module, configured to match the plurality of candidate echoes with the transmitted ultrasonic wave based on the synchronization code, and take the candidate echo that successfully matches the transmitted ultrasonic wave as a valid echo; The ranging module is used to determine the distance between the device and the obstacle based on the transmitted ultrasonic wave and the effective echo; The ranging module includes a time difference acquisition submodule and a distance determination submodule; the time difference acquisition submodule is used to perform convolution calculation on the effective echo and the transmitted ultrasonic wave to obtain the target echo and obtain the time difference from the emission of the transmitted ultrasonic wave to the acquisition of the target echo; the distance determination submodule is used to determine the distance between the device and the obstacle based on the time difference; The time difference acquisition submodule includes a convolution unit and a target echo extraction unit; the convolution unit is used to perform convolution operations on the effective echo and the transmitted ultrasonic wave in four different quadrants at the same time to obtain the convolution values ​​in the four quadrants; the target echo extraction unit is used to select the largest convolution value from the convolution values ​​in the four quadrants, compare the largest convolution value with a preset threshold, and extract the target echo when the largest convolution value is greater than the preset threshold.

6. The device according to claim 5, characterized in that The candidate echo determination module includes: The frequency acquisition submodule is used to obtain the frequencies of multiple ultrasonic waves received by the ultrasonic receiver; The frequency matching submodule is used to match the frequencies of multiple ultrasonic waves received by the ultrasonic receiver with the frequencies of the transmitted ultrasonic waves, obtain multiple ultrasonic waves within a preset frequency range, and use the ultrasonic waves within the preset frequency range as the echoes to be selected.

7. The device according to claim 6, characterized in that The echo matching module includes: A synchronization code acquisition submodule is used to obtain synchronization codes from multiple echoes to be selected; The synchronization code matching submodule is used to match the synchronization codes of multiple echoes to be selected with the synchronization code of the transmitted ultrasonic wave. When the synchronization code of a echo to be selected successfully matches the synchronization code of the transmitted ultrasonic wave, the echo to be selected is used as a valid echo.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Scene mode switching method and electronic terminal

    CN103581446A

  • Ultrasonic ranging method, device, equipment and medium

    CN111366933A

  • Acoustic wave processing device and ultrasonic system

    CN112334789A