Threshold calculation method, device, computer equipment, storage medium and program product

By calculating the current step data and reference threshold voltage, the problem of the fixed threshold method affecting the stability and accuracy of the distance measurement is solved, and accurate parking distance measurement in a small space is achieved.

CN114491381BActive Publication Date: 2024-11-12PINGJIE ELECTRONIC TECHNOLOGY (JIANGSU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210129602.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-11
Publication Date
2024-11-12
Estimated Expiration
2042-02-11

AI Technical Summary

Technical Problem

In the prior art, the fixed threshold method is used to detect ultrasonic echo pulses, which affects the stability and accuracy of distance measurement, making it difficult to achieve accurate parking distance measurement in a narrow space.

Method used

By acquiring the initial step data and the current distance segment identification, the current step data is calculated, and the first and second reference threshold voltages are obtained based on the step data and the distance segment identification, and the target threshold voltage is then calculated for accurate distance measurement.

Benefits of technology

It improves the stability and accuracy of distance measurement, and can achieve more accurate parking distance measurement in narrow spaces, with higher distance measurement accuracy than the fixed threshold method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114491381B_ABST
    Figure CN114491381B_ABST
Patent Text Reader

Abstract

The present application relates to a threshold calculation method, device, computer equipment, storage medium and program product. The method includes: obtaining initial step data, a step enable signal and a current distance segment identifier; calculating the current step data according to the current distance segment identifier and the initial step data; obtaining a first reference threshold voltage and a second reference threshold voltage according to the current distance segment identifier; calculating the target threshold voltage of each node in the distance segment corresponding to the current distance segment identifier according to the current step data and the step enable signal. The method can accurately calculate the target threshold voltage corresponding to each node in the distance segment corresponding to the current distance segment identifier.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of chip technology, and in particular to a threshold control method, apparatus, computer equipment, storage medium and computer program product. Background Art

[0002] With the development of cities, urban space is getting smaller and smaller, so the available space in life is also becoming more and more narrow, which is more obvious in parking positions. Therefore, whether it is automatic parking or manual parking, it is necessary to have a very accurate measurement of the distance. The most mature and effective distance measurement system in the existing technology is to use an ultrasonic probe for measurement, and the threshold detection method is the simplest ultrasonic distance measurement algorithm.

[0003] However, using a fixed threshold method to detect echo pulses will inevitably affect the stability and accuracy of ranging. Summary of the invention

[0004] Based on this, it is necessary to provide a threshold calculation method, device, computer equipment, computer-readable storage medium and program product that can accurately measure distance in response to the above technical problems.

[0005] In a first aspect, the present application provides a threshold calculation method, the method comprising:

[0006] Get the initial step data and the current distance segment identifier;

[0007] Calculating the current step data according to the current distance segment identifier and the initial step data;

[0008] Acquire a first reference threshold voltage and a second reference threshold voltage according to a current distance segment identifier;

[0009] The target threshold voltage of each node in the distance segment corresponding to the current distance segment identifier is calculated according to the current step data and the step enable signal.

[0010] In one embodiment, the step of calculating the current step data according to the current distance segment identifier and the initial step data includes:

[0011] Get the preset segment data;

[0012] The current step data is calculated according to the segmented data and the initial step data.

[0013] In one embodiment, after obtaining the preset segment data, the method further includes:

[0014] Calculate each node in the distance segment corresponding to the current distance segment identifier according to the segment data and the current distance segment identifier.

[0015] In one embodiment, the current step data is calculated based on the segmented data and the initial step data, including:

[0016] When an enable signal of the current distance segment identifier is received for the first time, the current step data is calculated according to the segmented data and the initial step data;

[0017] When the enable signal of the current distance segment identifier is not received for the first time, the previous step data is acquired, and the current step data is calculated based on the previous step data.

[0018] In one embodiment, an ultrasonic echo detection method is provided, the method comprising:

[0019] Obtaining a target threshold voltage calculated based on the method in any one of the above embodiments;

[0020] A detection distance is determined according to the target threshold voltage.

[0021] In a second aspect, the present application further provides a threshold calculation device, the device comprising:

[0022] A data acquisition module is used to obtain initial step data and current distance segment identification;

[0023] A node calculation module, used to calculate each node corresponding to the current distance segment, and obtain a pre-stored reference threshold voltage of a target node in the current distance segment;

[0024] The voltage calculation module is used to calculate the target threshold voltage corresponding to each node according to the reference threshold voltage of the target node.

[0025] In one embodiment, an ultrasonic echo detection device is also provided, the device comprising:

[0026] A threshold calculation module, used to obtain the target threshold voltage calculated by the threshold calculation device in any one of the above embodiments;

[0027] The distance determination module is used to determine the detection distance according to the target threshold voltage.

[0028] 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 method in any one of the above embodiments when executing the computer program.

[0029] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method in any one of the above embodiments is implemented.

[0030] In a fifth aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the method in any one of the above embodiments is implemented.

[0031] The above-mentioned threshold calculation method, device, computer equipment, storage medium and sequence product can calculate the current step by obtaining the initial step and the current distance segment identifier, and obtain the first reference threshold voltage and the second reference threshold voltage while obtaining the current distance segment identifier. Finally, the distance segment corresponding to the current distance segment identifier is calculated according to the current step data, that is, the target threshold voltage corresponding to each node in the distance segment composed of the first reference threshold voltage and the second threshold reference voltage, so as to accurately calculate the target threshold voltage corresponding to each node in the distance segment corresponding to the current distance segment identifier. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 A diagram showing an application environment of a threshold value calculation method in an embodiment;

[0033] Figure 2 is a schematic flow chart of a threshold value calculation method in one embodiment;

[0034] Figure 3 A schematic diagram of a flow chart of an ultrasonic echo detection method in an embodiment;

[0035] Figure 4 A schematic diagram of generating an enable signal for identifying a current distance segment in another embodiment;

[0036] Figure 5 A schematic diagram of a reference threshold curve in an embodiment;

[0037] Figure 6 is a schematic diagram of a possible threshold curve in one embodiment;

[0038] Figure 7 A schematic diagram of the structure of a threshold value calculation device in one embodiment;

[0039] Figure 8 FIG. 1 is a schematic diagram of the structure of an ultrasonic echo detection device in an embodiment. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0041] The threshold calculation method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown.

[0042] Figure 1 The system includes an initial step register module 301, a timing control module 302, a reference threshold register and shift control module 303 and a target threshold voltage control module 304.

[0043] The timing control module 302 generates a load enable signal and inputs the load enable signal to the initial step register module 301 and the reference threshold register and shift control module 303. The initial step register module 301 locks the initial step after receiving the load enable signal, and inputs the initial step Δx0 to the timing control module 302 and the target threshold voltage control module 304; the reference threshold register and shift control module 303 locks n reference threshold voltages VTH(0)~VTH(n) after receiving the load enable signal.

[0044] The timing control module 302 can also generate a step enable signal and an enable signal of the current distance segment identifier, wherein the enable signal of the current distance segment identifier is generated based on the step enable signal according to a preset condition. After the timing control module 302 generates the enable signal of the current distance segment identifier, it sends it to the reference threshold register and shift control module 303 and the target threshold voltage control module 304. After receiving the enable signal of the current distance segment identifier, the reference threshold register and shift control module 303 updates the first reference threshold voltage and the second reference threshold voltage, and sends the updated first reference threshold voltage and the second reference threshold voltage to the target threshold voltage control module 304; the target threshold voltage control module 304 updates the current step after receiving the enable signal of the current distance segment identifier.

[0045] In one embodiment, Figure 2 As shown, a threshold calculation method is provided, which is applied to Figure 1 The target threshold voltage control module 304 in FIG. 1 is taken as an example to illustrate, and the following steps are included:

[0046] S202, obtaining initial step data and a current distance segment identifier.

[0047] Among them, the initial step data refers to the target threshold voltage control module 304 that receives the initial step data sent by the initial step register module 301 for the first time, which can be used to calculate the target threshold voltage later. In other embodiments, the target threshold voltage can be calculated after the initial step data is processed accordingly. The current distance segment identifier refers to the identifier of the enable signal of the current distance segment identifier sent by the timing control module 302 received by the target threshold voltage control module 304, which is used to calculate the signal of the current step data and the required calculation range according to the initial step, for example, when the current distance segment identifier is received, the step is halved or doubled.

[0048] Specifically, the target threshold voltage control module 304 obtains initial step data, a step enable signal and a distance segment identifier, wherein the step signal refers to the step enable signal sent by the timing control module 302, and the step enable signal can be used for subsequent calculation of the target threshold voltage.

[0049] S204, calculating and obtaining current step data according to the current distance segment identifier and the initial step data.

[0050] Specifically, the current step is a parameter used to calculate the target threshold voltage, which can be calculated based on the current distance segment identifier and the initial step data. In one embodiment, the current step can be obtained by doubling the initial step data after receiving the current distance segment identifier, and in other embodiments, the current step can be obtained by halving the initial step data after receiving the current distance segment identifier. It should be noted that the current step is not limited to doubling or halving the current distance segment identifier, and can be calculated in any way, which is not specifically limited here.

[0051] S206, obtaining a first reference threshold voltage and a second reference threshold voltage according to the current distance segment identifier.

[0052] Among them, the first reference threshold voltage and the second reference threshold voltage are sent by the reference threshold storage and shift control module 303, and the first reference threshold voltage and the second reference threshold voltage are pre-stored in the shift control module 303, which can be calculated according to certain rules, for example, they can be obtained from a pre-obtained threshold curve.

[0053] Specifically, when the target threshold voltage control module 304 receives the current distance segment identifier, it obtains the first reference threshold voltage and the second reference threshold voltage from the reference threshold storage and shift control module 303, and when the current distance segment identifier is received next time, it obtains the updated first reference threshold voltage from the reference threshold storage and shift control module 303.

[0054] S208, calculating the target threshold voltage of each node in the distance segment corresponding to the current distance segment identifier according to the current step data and the step enable signal.

[0055] Among them, the distance segment is the distance between the first reference threshold voltage and the second reference threshold voltage obtained according to the current distance segment identifier, that is, the range required for calculation, which changes with the changes of the first reference threshold voltage and the second reference threshold voltage. The target threshold voltage refers to the corresponding voltage of each node in the distance segment corresponding to the current distance segment identifier.

[0056] Specifically, after the target threshold voltage control module 304 obtains the initial step data and the current distance identifier, it obtains the current step required to calculate the target threshold voltage of each node in the distance corresponding to the current distance segment identifier based on the current distance identifier and the initial step data. At the same time, the target threshold voltage control module 304 obtains the first reference threshold voltage and the second threshold reference voltage based on the current distance identifier. After obtaining the first reference threshold voltage and the second reference threshold voltage, the distance segment corresponding to the current distance segment identifier can be obtained, that is, composed of the first reference threshold voltage and the second reference threshold voltage. Then, the target threshold voltage of each node is calculated according to each node in the distance segment corresponding to the current step data and the current distance segment identifier, wherein optionally, each node in the distance segment corresponding to the current distance segment identifier can be obtained according to pre-set segmentation data, for example, the distance segment corresponding to the current distance segment identifier is evenly divided into a corresponding number of small segments according to the pre-set segmentation data, and the starting point and end point of each small segment are each node, and then the target threshold voltage corresponding to each node is calculated according to the current step data and the step enable signal and each node in the distance segment corresponding to the current distance segment identifier, wherein optionally, the step enable signal can calculate the target threshold voltage corresponding to a node with the current step as the time interval, until the target threshold voltage corresponding to each node is calculated.

[0057] In the above threshold calculation method, the current step can be calculated by obtaining the initial step and the current distance segment identifier, and the first reference threshold voltage and the second reference threshold voltage can be obtained while obtaining the current distance segment identifier. Finally, the distance segment corresponding to the current distance segment identifier is calculated according to the current step data, that is, the target threshold voltage corresponding to each node in the distance segment composed of the first reference threshold voltage and the second threshold reference voltage. The target threshold voltage corresponding to each node in the distance segment corresponding to the current distance segment identifier can be accurately calculated.

[0058] In one embodiment, the current step data is calculated based on the current distance segment identifier and the initial step data, including: obtaining preset segment data; and calculating the current step data based on the segment data and the initial step data.

[0059] The preset segmented data is set according to the application scenario of the event, and can be any number.

[0060] Specifically, the target threshold voltage control module 304 obtains preset segment data, and then calculates the current step data according to the segment data and the initial step data. For example, if the preset segment data is 16 and the initial step data is Δx0, the current step data is Δx0 / 16.

[0061] In the above embodiment, the current step data can be obtained according to the preset segment data, and the step enable signal is implemented to calculate the target threshold voltage of each node with the current step as the time interval.

[0062] In one embodiment, after obtaining the preset segmentation data, the method further includes: calculating each node in the distance segment corresponding to the current distance segment identifier according to the segmentation data and the current distance segment identifier.

[0063] Specifically, after receiving the current distance segment identifier, the target threshold voltage control module 304 obtains the corresponding first reference threshold voltage and second reference threshold voltage, and then evenly divides the distance segment corresponding to the current distance segment identifier, that is, the distance segment composed of the first reference threshold voltage and the second reference threshold voltage, into equal segments according to the segmentation data, and obtains each node in the distance segment corresponding to the previous distance segment identifier. In one embodiment, if the segmentation data is 16, the distance segment corresponding to the current distance segment identifier is divided by 15 to obtain 16 nodes, wherein the first node is the point corresponding to the first reference threshold voltage, and the last node is the point corresponding to the second reference threshold voltage.

[0064] It should be noted that each time the target threshold voltage control module 304 receives the current distance segment identifier, that is, each time a new current distance segment identifier is received, the target threshold voltage control module 304 will calculate each node in the distance segment corresponding to the new current distance segment identifier. Because each time the target threshold voltage control module 304 receives the current distance segment identifier, it obtains the updated first reference threshold voltage and the updated second reference threshold voltage. Since the first reference threshold voltage and the second reference threshold voltage will change with the current distance segment identifier, each time the current distance segment identifier is received, the target threshold voltage control module 304 will calculate each node in the distance segment corresponding to the new current distance segment identifier.

[0065] In the above embodiment, each node in the distance segment corresponding to the current distance segment identifier can be calculated through the segment data and the current distance segment identifier, so as to subsequently calculate the target threshold voltage of each node.

[0066] In one embodiment, the current step data is calculated based on the segmented data and the initial step data, including: when an enable signal identifying the current distance segment is received for the first time, the current step data is calculated based on the segmented data and the initial step data; when the enable signal identifying the current distance segment is not received for the first time, the previous step data is obtained, and the current step data is calculated based on the previous step data.

[0067] The enable signal of the current distance segment identifier refers to a signal sent by the timing control module 302 for calculating the current step data.

[0068] Specifically, when the target threshold voltage control module 304 receives the enable signal of the current distance segment identifier for the first time, the current step data can be calculated based on the segmented data and the initial step data. In one embodiment, the segmented data is 16 and the initial step data is Δx0. Then, based on the segmented data and the initial step data, the current step data can be calculated to be Δx0 / 16.

[0069] Specifically, when the target threshold voltage control module 304 receives the enable signal of the current distance segment identifier for the non-first time, the current step data of the target threshold voltage of each node in the distance segment corresponding to the previous current distance segment identifier is obtained, that is, the previous step data, and the current step data is calculated based on the previous step data. Optionally, the previous step data can be doubled. For example, if the previous step data is Δx0 / 16, the current step data is 2Δx0 / 16, and the next step data is 4Δx0 / 16.

[0070] In the above implementation, the current step signal is calculated by distinguishing whether it is the first time to receive the enable signal of the current distance segment identifier, so that the target threshold voltage of each node in the distance segment corresponding to the current distance segment identifier can be calculated more accurately.

[0071] In one embodiment, Figure 3 As shown, an ultrasonic echo detection method is provided, the method comprising the following steps:

[0072] S302, obtaining a target threshold voltage calculated based on any one of the above-mentioned implementation methods.

[0073] Specifically, the target threshold voltage control module 304 first obtains the initial step data, the step enable signal and the current distance segment identifier, and obtains the current step data according to the current distance segment identifier and the initial step calculation. Specifically, the current step data can be calculated according to the preset segment data, the current distance segment identifier and the initial step data. When the enable signal of the current distance segment identifier is received for the first time, the current step data is calculated according to the preset segment data and the initial step data. Optionally, when the preset segment data is 8 and the initial step data is Δx0, the current step data is Δx0 / 8; when the enable signal of the current distance segment identifier is not received for the first time, the previous step signal is obtained, and the current step signal is calculated according to the previous step data. Optionally, the previous step data can be doubled. For example, when the previous step data is Δx0 / 8, the current step data is 2Δx0 / 8.

[0074] Specifically, the target threshold voltage control module 304 obtains the first reference threshold voltage and the second reference according to the current distance segment identifier, and calculates the voltages of each node in the distance segment corresponding to the current distance segment identifier according to the pre-set segment data, wherein optionally, when the preset segment data is 8, 8 nodes need to be obtained in the current distance, and therefore the current distance segment is evenly divided into 7 segments to obtain 8 nodes.

[0075] Specifically, the target threshold voltage control module 304 calculates the target threshold voltage of each node using the step enable signal at the time interval of the current step data, that is, the step enable signal of one time interval calculates the target threshold voltage of one node until the target threshold voltage of each node in the distance segment corresponding to the current distance segment identifier is fully calculated.

[0076] Specifically, when the target threshold voltage control module 304 receives the enable signal of the next current distance segment identifier, the previous step data is obtained, and the current step data is calculated based on the previous step data; when the target threshold voltage control module 304 receives the enable signal of the next current distance segment identifier, the first reference threshold voltage and the second reference threshold voltage are also obtained based on the current distance segment identifier, that is, the updated first reference threshold voltage and the updated second reference threshold voltage. Then, the distance segment corresponding to the next current distance segment identifier, that is, the target threshold voltage of each node in the distance segment composed of the updated first reference threshold voltage and the updated second reference threshold voltage is calculated based on the current step data and the step enable signal.

[0077] It should be noted that the enable signal of the current distance segment identifier is sent by the timing control module 302, and the step data of the enable signal of the current distance segment identifier generated in the threshold segment timing control module should be consistent with the current step data in the target threshold voltage control module 304. Figure 4 As shown, Figure 4 The schematic diagram of generating the enable signal of the current distance segment identification in one embodiment, in this embodiment, the preset segment data is 16, each step enable signal is counted 16 times with Δx0 / 16 as the initial step, and the enable signal of the current distance segment identification is generated after every 16 times, and the next step is doubled, and so on until all distance segments are completed. Then, the preset segment data obtained by the corresponding target threshold voltage control module 304 is 16, and when the enable signal of the current distance segment identification is not received for the first time, the previous step data is obtained, and the current step data is doubled on the basis of the previous step data, that is, the current step data is 2Δx0 / 16, and when the enable signal of the current distance segment identification is received next time, it is doubled on the basis of the previous step data, and so on until all distance segments are completed.

[0078] S304, determining a detection distance according to a target threshold voltage.

[0079] Specifically, after the target threshold voltage is calculated based on the method in any of the above embodiments, the detection distance is determined according to the target threshold voltage of each node. When the echo signal received by the ultrasonic transducer is greater than the target threshold voltage, the detection distance can be determined.

[0080] In the above embodiment, the target threshold voltage can be accurately calculated, and when the echo signal received by the ultrasonic transducer is greater than the target threshold voltage, the detection distance can be determined. Compared with the prior art, by setting a fixed value in advance as a threshold, this embodiment can accurately determine the detection distance.

[0081] In one embodiment, an ultrasonic echo detection method is provided, which continues to combine Figure 1 As shown, the timing control module 302 generates a load enable signal, which is output to the initial step register module 301 to lock the initial step and send the initial step to the timing control module 302 and the target threshold voltage control module 304; at the same time, the load enable signal is output to the reference threshold register and shift control module 303 to lock n reference threshold voltage values ​​VTH(0)~VTH(n).

[0082] The timing control module 302 generates a step enable signal and an enable signal of the current distance segment identifier, and outputs the step enable signal and the enable signal of the current distance segment identifier to the target threshold voltage control module 304, and outputs the enable signal of the current distance segment identifier to the reference threshold register and shift control module 303. Among them, the enable signal of the current distance segment identifier is a step enable signal with Δx0 / 16 as the current step data accumulated and counted 16 times, and the enable signal of the current distance segment identifier is generated after every 16 times, and the next step is doubled, and so on until all threshold segments are completed, such as Figure 4 shown.

[0083] The reference threshold storage and shift control module 303 receives the enable signal of the current distance segment identifier and sends VTH(n) and VTH(n-1) to the target threshold voltage control module 304, and updates VTH(n) and VTH(n-1) the next time the enable signal of the current distance segment identifier is received, that is, VTH(n-1) is used as VTH(n), VTH(n-2) is used as VTH(n-1), and they are sent to the target threshold voltage control module 304 until all n reference threshold voltage values ​​in the reference threshold storage and shift control module 303 are updated.

[0084] When the target threshold voltage control module 304 receives the enable signal of the current distance segment identification for the first time, it divides the initial step data by 16 to obtain the current step data Δx0 / 16, and calculates the target threshold voltage corresponding to each node with the step enable signal at a time interval of Δx0 / 16; when it is not the first time to receive the enable signal of the current distance segment identification, it obtains the previous current step data and doubles it based on the previous step data. Figure 5 As shown, Figure 5 Schematic diagram of a reference threshold curve and a target threshold voltage in one embodiment. Figure 5 It includes n+1 reference threshold voltages VTH(0), VTH(1)…VTH(n), and these reference threshold voltages are distributed exponentially as the distance increases, that is, Δx increases exponentially; the amplitude of the reference threshold voltage can be reconfigured according to the measured distance range, and each adjacent two reference threshold voltages are connected into a current distance segment, and each current distance segment contains 14 nodes VTHS1~VTHS 14 , VTHS1~VTHS 14 The target threshold voltage of the threshold node is linearly distributed within the current distance segment and can be expressed by the following formula:

[0085]

[0086] When i=0, VTHS(0) is VTH(n-1); when i=15, VTHS(15) is VTH(n), and a step enable signal of Δx0 / 16 appears, and i is increased by 1. The curve fitted by the target threshold voltage of each node in the current distance segment is the threshold curve, which can effectively adapt to the change of echo and improve the stability and accuracy of ranging.

[0087] In this embodiment, n+1 reference threshold voltages VTH(0), VTH(1)…VTH(n) can be calculated based on a pre-calculated curve. Figure 6 As shown, Figure 6 : is a schematic diagram of a possible threshold curve in an embodiment, wherein echo envelope 1 corresponds to the echo reflected by a short-distance obstacle, echo envelope 2 corresponds to the echo reflected by a long-distance obstacle, and the peak value of the echo envelope decays exponentially as the distance increases. The formula is:

[0088] A(x)=A0e -2αx

[0089] Where A(x) is the amplitude of the echo received by the ultrasonic head, A0 is the ultrasonic amplitude when the ultrasonic head transmits, x is the distance the sound wave propagates, and is the attenuation coefficient. The attenuation coefficient in the air is α = 2×10 -11 f c 2 (f c is the ultrasonic vibration frequency).

[0090] Figure 6 The threshold curve shown is one of the possible curves. Its variation law is similar to that of the echo. Its formula is:

[0091] VTH(x)=βA0e -2αx

[0092] Where β is the ratio of the threshold to the echo envelope peak value (β<1).

[0093] In one embodiment, when the maximum measurement distance is 10 meters and the preset segment data is 16, then x = 10n / 16, (n = 0, 1 ... 15), according to VTH (x) = βA0e -2αx VTH(0) can be calculated

[0094] ~VTH(n).

[0095] In this embodiment, the preset segment data is 16, so the current step of the timing control module 302 and the target threshold voltage control module 304 is Δx0 / 16, and there are also 16 nodes in the distance segment corresponding to the current distance segment identifier. If the preset segment data changes, the current step data of the timing control module 302 and the target threshold voltage control module 304 and the number of nodes in the distance segment corresponding to the current distance segment identifier will also change.

[0096] It should be noted that the pre-set segmented data can be set according to the application scenario, so it is not specifically limited here. In addition, the current step data in the timing control module 302 and the target threshold voltage control module 304 need to be consistent. For example, in the timing control module 302, the step enable signal generates an enable signal of the current distance segment identifier at 2x0 / 16, and in the target threshold voltage control module 304, the step enable signal is used to calculate the target threshold voltage corresponding to each node at a time interval of 2Δx0 / 16.

[0097] In the above embodiment, a threshold control method for ultrasonic echo detection is proposed, in which the target threshold voltage is not constant but changes with the distance of the obstacle, so the distance measurement is more stable and more accurate.

[0098] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed 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 part of the steps or stages in other steps.

[0099] Based on the same inventive concept, the embodiment of the present application also provides a threshold value calculation device for implementing the threshold value calculation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more threshold value calculation device embodiments provided below can refer to the limitations on the threshold value calculation method above, and will not be repeated here.

[0100] In one embodiment, Figure 7 As shown, a threshold value calculation device is provided, including: a data acquisition module 100, a node calculation module 200 and a voltage calculation module 300, wherein:

[0101] The data acquisition module 100 is used to acquire initial step data and a current distance segment identifier.

[0102] The node calculation module 200 is used to calculate each node corresponding to the current distance segment and obtain a pre-stored reference threshold voltage of a target node in the current distance segment.

[0103] The voltage calculation module 300 is used to calculate the target threshold voltage corresponding to each node according to the reference threshold voltage of the target node.

[0104] In one embodiment, the threshold calculation device further includes:

[0105] The segmented data acquisition module is used to acquire preset segmented data.

[0106] The current step data calculation module is used to calculate the current step data according to the segmented data and the initial step data.

[0107] In one embodiment, the threshold calculation device further includes:

[0108] The node calculation module is used to calculate each node in the distance segment corresponding to the current distance segment identifier according to the segmented data and the current distance segment identifier.

[0109] In one embodiment, the current step data calculation module includes:

[0110] The first step calculation unit is used to calculate the current step data according to the segment data and the initial step data when receiving the enable signal of the current distance segment identifier for the first time.

[0111] The second step calculation unit is used to obtain the previous step data when the enable signal of the current distance segment identifier is not received for the first time, and calculate the current step data based on the previous step data.

[0112] In one embodiment, Figure 8 As shown, an ultrasonic echo detection device is provided, comprising: a target threshold calculation module 400 and a distance determination module 500, wherein:

[0113] The threshold calculation module 400 is used to obtain the target threshold voltage calculated by the threshold calculation device in any one of the above embodiments.

[0114] The distance determination module 500 is used to determine the detection distance according to the target threshold voltage.

[0115] Each module in the above threshold calculation device and ultrasonic echo detection device can be implemented in whole or in part by software, hardware and 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 a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0116] In one embodiment, a computer device is provided, including 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 initial step data and a current distance segment identifier; calculating current step data according to the current distance segment identifier and the initial step data; obtaining a first reference threshold voltage and a second reference threshold voltage according to the current distance segment identifier; and calculating a target threshold voltage of each node in the distance segment corresponding to the current distance segment identifier according to the current step data and a step enable signal.

[0117] In one embodiment, the current step data is calculated based on the current distance segment identifier and the initial step data when the processor executes the computer program, including: obtaining preset segmented data; and calculating the current step data based on the segmented data and the initial step data.

[0118] In one embodiment, after obtaining the preset segmentation data when the processor executes the computer program, the method further includes: calculating each node in the distance segment corresponding to the current distance segment identifier according to the segmentation data and the current distance segment identifier.

[0119] In one embodiment, the current step data is calculated based on the segmented data and the initial step data when the processor executes the computer program, including: when the enable signal of the current distance segment identifier is received for the first time, the current step data is calculated based on the segmented data and the initial step data; when the enable signal of the current distance segment identifier is not received for the first time, the previous step data is obtained, and the current step data is calculated based on the previous step data.

[0120] In one embodiment, a computer device is provided, including 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 target threshold voltage calculated based on any one of the above embodiments; and determining a detection distance based on the target threshold voltage.

[0121] 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 initial step data and a current distance segment identifier; calculating current step data based on the current distance segment identifier and the initial step data; obtaining a first reference threshold voltage and a second reference threshold voltage based on the current distance segment identifier; and calculating a target threshold voltage for each node in the distance segment corresponding to the current distance segment identifier based on the current step data and a step enable signal.

[0122] In one embodiment, the computer program, when executed by a processor, calculates the current step data according to the current distance segment identifier and the initial step data, including: obtaining preset segment data; and calculating the current step data according to the segment data and the initial step data.

[0123] In one embodiment, after obtaining the preset segmentation data when the computer program is executed by the processor, the method further includes: calculating each node in the distance segment corresponding to the current distance segment identifier according to the segmentation data and the current distance segment identifier.

[0124] In one embodiment, the computer program implemented when executed by the processor calculates the current step data based on the segmented data and the initial step data, including: when the enable signal of the current distance segment identifier is received for the first time, the current step data is calculated based on the segmented data and the initial step data; when the enable signal of the current distance segment identifier is not received for the first time, the previous step data is obtained, and the current step data is calculated based on the previous step data.

[0125] 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 target threshold voltage calculated based on any one of the above embodiments; and determining a detection distance based on the target threshold voltage.

[0126] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the following steps: obtaining initial step data and a current distance segment identifier; calculating current step data according to the current distance segment identifier and the initial step data; obtaining a first reference threshold voltage and a second reference threshold voltage according to the current distance segment identifier; calculating a target threshold voltage of each node in the distance segment corresponding to the current distance segment identifier according to the current step data and a step enable signal;

[0127] In one embodiment, the computer program, when executed by a processor, calculates the current step data according to the current distance segment identifier and the initial step data, including: obtaining preset segment data; and calculating the current step data according to the segment data and the initial step data.

[0128] In one embodiment, after obtaining the preset segmentation data when the computer program is executed by the processor, the method further includes: calculating each node in the distance segment corresponding to the current distance segment identifier according to the segmentation data and the current distance segment identifier.

[0129] In one embodiment, the computer program implemented when executed by the processor calculates the current step data based on the segmented data and the initial step data, including: when the enable signal of the current distance segment identifier is received for the first time, the current step data is calculated based on the segmented data and the initial step data; when the enable signal of the current distance segment identifier is not received for the first time, the previous step data is obtained, and the current step data is calculated based on the previous step data.

[0130] In one embodiment, a computer program product is provided, including a computer program, which implements the following steps when executed by a processor: obtaining a target threshold voltage calculated based on any one of the above embodiments; and determining a detection distance according to the target threshold voltage.

[0131] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed 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 the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an 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 each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0132] The technical features of the above embodiments may 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 only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A threshold calculation method, characterized in that: The method comprises: Get the initial step data and the current distance segment identifier; Calculating the current step data according to the current distance segment identifier and the initial step data; Acquire a first reference threshold voltage and a second reference threshold voltage according to a current distance segment identifier; The target threshold voltage of each node in the distance segment corresponding to the current distance segment identifier is calculated according to the current step data and the step enable signal; the calculation formula of the target threshold voltage is: Wherein, VTH(n-1) is the first reference threshold voltage, VTH(n) is the second reference threshold voltage, and i is the count value of the step enable signal; The step of calculating the current step data according to the current distance segment identifier and the initial step data includes: Get the preset segment data; Calculating the current step data according to the segmented data and the initial step data; The step of calculating the current step data according to the segmented data and the initial step data comprises: When an enable signal of the current distance segment identifier is received for the first time, the current step data is calculated according to the segmented data and the initial step data; When the enable signal of the current distance segment identifier is not received for the first time, the previous step data is acquired, and the current step data is calculated based on the previous step data.

2. The method according to claim 1, characterized in that: After obtaining the preset segment data, the method further includes: Calculate each node in the distance segment corresponding to the current distance segment identifier according to the segment data and the current distance segment identifier.

3. An ultrasonic echo detection method, characterized in that: The method comprises: Obtaining a target threshold voltage calculated according to the method described in any one of claims 1 to 2; A detection distance is determined according to the target threshold voltage.

4. A threshold calculation device, characterized in that: The device comprises: A data acquisition module is used to obtain initial step data and current distance segment identification; A node calculation module, used to calculate each node corresponding to the current distance segment, and obtain a pre-stored reference threshold voltage of a target node in the current distance segment; A voltage calculation module, used to calculate the target threshold voltage corresponding to each node according to the reference threshold voltage of the target node; A segmented data acquisition module, used to acquire preset segmented data; The current step data calculation module is used to calculate the target threshold voltage of each node in the distance segment corresponding to the current distance segment identifier according to the current step data and the step enable signal; the calculation formula of the target threshold voltage is: Wherein, VTH(n-1) is the first reference threshold voltage, VTH(n) is the second reference threshold voltage, and i is the count value of the step enable signal. The current step data calculation module comprises: a first step calculation unit, configured to calculate the current step data according to the segment data and the initial step data when receiving an enable signal of the current distance segment identifier for the first time; The second step calculation unit is used to obtain the previous step data when the enable signal of the current distance segment identifier is not received for the first time, and calculate the current step data based on the previous step data.

5. An ultrasonic echo detection device, characterized in that: The device comprises: A threshold calculation module, used to obtain a target threshold voltage calculated by the threshold calculation device according to claim 4; The distance determination module is used to determine the detection distance according to the target threshold voltage.

6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 2 or 3 are implemented.

7. 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 2 or 3 are implemented.

8. 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 2 or 3 are implemented.