Detection circuit and method, chip and electronic equipment
By designing a detection circuit including dynamic threshold determination and preset threshold in an ultrasonic radar system, and fusion of the results through the detection fusion circuit, the problem of increased false alarm rate and missed detection targets caused by background noise inhomogeneity is solved, and the accuracy and stability of detection are improved.
Patent Information
- Application Number
- CN202411929782.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-06-03
AI Technical Summary
When facing background noise non-uniformity, the existing constant false alarm rate technology can easily lead to an increase in false alarm rate or missed detection target, especially in the presence of strong clutter edges or local high-density clutter areas.
A detection circuit is provided, including a first detection circuit, a second detection circuit and a detection fusion circuit. The first detection circuit dynamically determines the first threshold based on the ultrasonic echo signal, and the second detection circuit uses a preset threshold. The detection fusion circuit fuses the two results through the preset weight to obtain the target detection result.
In the case of uneven background noise and large differences in image brightness, the first detection circuit can provide accurate detection results, and the second detection circuit provides stable results when the noise is relatively uniform. The detection fusion circuit improves the accuracy and stability of detection through weight fusion.
Smart Images

Figure CN120085289A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of signal detection and semiconductors, and particularly to a detection circuit, method, chip, and electronic device. Background Art
[0002] As an important sensor, the ultrasonic radar plays a crucial role in many applications such as automotive reverse assistance, robot navigation, and industrial automation. Its working principle is to emit ultrasonic pulses and receive the echo signals reflected by the target, and then determine the presence or absence of the target. In this process, threshold detection becomes the core step to distinguish the target signal from background noise or clutter in the echo signal.
[0003] Currently, the threshold detection methods mainly include the fixed threshold method and the adaptive threshold method. The fixed threshold method detects the target by setting a fixed threshold. Although it is simple to implement, in the case of drastic changes in background noise, it is prone to false alarms or missed detections. The adaptive threshold method, such as the constant false alarm rate (CFAR) technology, can dynamically adjust the threshold according to the actual situation of the background noise, so as to detect the target signal while keeping the false alarm rate constant, effectively improving the reliability and accuracy of the radar system. However, the existing CFAR technology shows certain limitations when facing the non-uniformity of background noise. For example, in the presence of strong clutter edges or local high-density clutter regions, the traditional CFAR algorithm may lead to an increase in the false alarm rate or missed detection of the target, because the background noise estimation is affected by the strong clutter, resulting in inaccurate threshold setting. Summary of the Invention
[0004] This application provides a detection circuit, method, chip, and electronic device.
[0005] In one aspect, an embodiment of this application provides a detection circuit, which includes: a first detection circuit, a second detection circuit, and a detection fusion circuit; the first detection circuit is electrically connected to the detection fusion circuit; the second detection circuit is electrically connected to the detection fusion circuit;
[0006] The first detection circuit receives the input ultrasonic echo signal, determines a first threshold based on the ultrasonic echo signal, compares the ultrasonic echo signal with the first threshold to obtain a first detection result, and outputs the first detection result to the detection fusion circuit;
[0007] The second detection circuit receives the input ultrasonic echo signal, compares the ultrasonic echo signal with a second threshold to obtain a second detection result, and outputs the second detection result to the detection fusion circuit, where the second threshold is a preset threshold;
[0008] The detection fusion circuit receives the input first detection result and the second detection result, fuses the first detection result and the second detection result based on a preset weight to obtain a target detection result, and the target detection result represents the confidence level of detecting a target object by the ultrasonic echo signal.
[0009] Among them, the first detection circuit includes: a first buffer circuit, a second buffer circuit, a first calculation circuit, and a second calculation circuit; one end of the first buffer circuit is electrically connected to the second buffer circuit, and the other end is electrically connected to the first calculation circuit; one end of the second buffer circuit is electrically connected to the first buffer circuit, and the other end is electrically connected to the second calculation circuit; one end of the first calculation circuit is electrically connected to the first buffer circuit, and the other end is electrically connected to the second calculation circuit;
[0010] The first buffer circuit receives the input ultrasonic echo signal, caches the ultrasonic echo signal, and sends the cached ultrasonic echo signal to the second buffer circuit and the first calculation circuit;
[0011] The second buffer circuit receives the input ultrasonic echo signal, caches the ultrasonic echo signal, and sends the cached ultrasonic echo signal to the second calculation circuit;
[0012] The first calculation circuit receives the ultrasonic echo signal, calculates the ultrasonic echo signal based on a preset mode to obtain a processed signal, and sends the processed signal to the second calculation circuit;
[0013] The second calculation circuit receives the ultrasonic echo signal sent by the second buffer circuit and the processed signal sent by the first calculation circuit, determines a processing weight based on the current time, determines a first threshold based on the processing weight and the processed signal, compares the ultrasonic echo signal with the first threshold to obtain a first detection result, and outputs the first detection result to the detection fusion circuit.
[0014] Among them, the first calculation circuit includes: a first control circuit, a first register, a first multiplexer, and at least two third calculation circuits; one end of the first control circuit is electrically connected to the first register, and the other end is electrically connected to the first multiplexer; one end of the first multiplexer is electrically connected to the first control circuit, and the other end is respectively electrically connected to the at least two third calculation circuits;
[0015] The first control circuit receives the input ultrasonic echo signal, reads the preset mode stored in the first register, determines the target third calculation circuit based on the preset mode, controls the first multiplexer to connect to the target third calculation circuit, and sends the ultrasonic echo signal to the target third calculation circuit. The preset mode includes at least two of sorting, mean, minimum, and maximum;
[0016] The target third calculation circuit receives the ultrasonic echo signal, processes the ultrasonic echo signal based on the preset mode to obtain the processed signal, and sends the processed signal to the second calculation circuit.
[0017] Wherein, the second calculation circuit includes: a fourth calculation circuit and a second register; the fourth calculation circuit and the second register are electrically connected;
[0018] The fourth calculation circuit receives the processed signal and the ultrasonic echo signal, reads the processing weight from the second register based on the current time, determines the first threshold based on the processing weight and the processed signal, compares the ultrasonic echo signal with the first threshold to obtain the first detection result, and outputs the first detection result to the detection fusion circuit.
[0019] Wherein, the second detection circuit includes: a fifth calculation circuit and a third register; the fifth calculation circuit and the third register are electrically connected;
[0020] The fifth calculation circuit receives the ultrasonic echo signal, reads the second threshold from the third register, compares the ultrasonic echo signal with the second threshold to obtain the second detection result, and outputs the second detection result to the detection fusion circuit.
[0021] Wherein, the detection circuit further includes: a selection circuit; the selection circuit includes a second control circuit, a fourth register, and a second multiplexer; one end of the second control circuit is electrically connected to the fourth register, and the other end is electrically connected to the second multiplexer; one end of the second multiplexer is electrically connected to the second control circuit, and the other end is respectively electrically connected to the first detection circuit and the second detection circuit;
[0022] The second control circuit reads the preset detection mode from the fourth register. When it detects that the preset detection mode is the first detection mode, it controls the second multiplexer to connect to the path of the first detection circuit and disconnect from the path of the second detection circuit;
[0023] When it detects that the preset detection mode is the second detection mode, it controls the second multiplexer to disconnect from the path of the first detection circuit and connect to the path of the second detection circuit;
[0024] It is detected that the preset detection mode is the third detection mode, and the second multiplexer is controlled to connect the paths to the first detection circuit and the second detection circuit.
[0025] Wherein, the detection circuit further includes: a third detection circuit, and the third detection circuit includes a third control circuit, a fifth register, and a counter; one end of the third control circuit is electrically connected to the fifth register, and the other end is electrically connected to the counter;
[0026] When the third control circuit receives the target detection result and determines that the target detection result has changed, it reads the first count result from the counter. The first count result is the count result when the previous target detection result changed. It controls the counter to start counting, reads the preset duration from the fifth register, and when it is detected that the first count result is less than the preset duration, all the target detection results within the counting time of the first count result are corrected to the target detection results before the previous target detection result changed.
[0027] Another aspect of the embodiments of the present application provides a detection method, which is applied to a detection circuit. The detection circuit includes: a first detection circuit, a second detection circuit, and a detection fusion circuit; the method includes:
[0028] The first detection circuit receives the input ultrasonic echo signal, determines a first threshold based on the ultrasonic echo signal, compares the ultrasonic echo signal with the first threshold to obtain a second detection result, and outputs the second detection result to the detection fusion circuit;
[0029] The second detection circuit receives the input ultrasonic echo signal, compares the ultrasonic echo signal with a second threshold to obtain a first detection result, and outputs the first detection result to the detection fusion circuit. The second threshold is a preset threshold;
[0030] The detection fusion circuit receives the input first detection result and second detection result, and fuses the first detection result and the second detection result based on a preset weight to obtain a target detection result. The target detection result represents the confidence level of detecting a target object by the ultrasonic echo signal.
[0031] Another aspect of the present application provides a chip, and the chip includes the detection circuit, and the detection circuit can execute the detection method.
[0032] Another aspect of the present application provides an electronic device, and the electronic device includes a chip, and the chip can execute the detection method.
[0033] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become readily understood through the following description. Brief Description of the Drawings
[0034] By referring to the drawings and reading the following detailed description, the above and other objects, features, and advantages of the exemplary embodiments of the present application will become readily understandable. In the drawings, several embodiments of the present application are shown in an exemplary rather than restrictive manner, where:
[0035] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.
[0036] Figure 1 A schematic structural diagram of a detection circuit according to an embodiment of the present application is shown;
[0037] Figure 2 A schematic structural diagram of a detection circuit according to another embodiment of the present application is shown;
[0038] Figure 3A A schematic diagram of the internal cache of a cache circuit according to an embodiment of the present application is shown;
[0039] Figure 3B A schematic diagram of the internal cache of a cache circuit according to another embodiment of the present application is shown;
[0040] Figure 4 A schematic structural diagram of a detection circuit according to another embodiment of the present application is shown;
[0041] Figure 5 A schematic structural diagram of a detection circuit according to another embodiment of the present application is shown;
[0042] Figure 6 A schematic structural diagram of a detection circuit according to another embodiment of the present application is shown;
[0043] Figure 7A A schematic structural diagram of a detection circuit according to another embodiment of the present application is shown;
[0044] Figure 7B A schematic structural diagram of a detection circuit according to another embodiment of the present application is shown;
[0045] Figure 7C A schematic structural diagram of a detection circuit according to another embodiment of the present application is shown;
[0046] Figure 8 A schematic structural diagram of a detection circuit according to another embodiment of the present application is shown;
[0047] Figure 9 shows a flowchart of a detection method according to an embodiment of the present application;
[0048] Figure 10 shows a flowchart of a detection method according to another embodiment of the present application;
[0049] Figure 11 shows a flowchart of a detection method according to another embodiment of the present application;
[0050] Figure 12 shows a flowchart of a detection method according to another embodiment of the present application;
[0051] Figure 13 shows a schematic diagram of the composition structure of an electronic device according to an embodiment of the present application. Detailed implementation manners
[0052] To make the objectives, features, and advantages of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.
[0053] In order to reduce the false alarm rate, reduce missed detection targets, and improve the detection accuracy when the background noise in the echo signal is non-uniform, an embodiment of the present application provides a detection circuit, as Figure 1 shown, the detection circuit 100 includes: a first detection circuit 101, a second detection circuit 102, and a detection fusion circuit 103; the first detection circuit 101 is electrically connected to the detection fusion circuit 103; the second detection circuit 102 is electrically connected to the detection fusion circuit 103.
[0054] The first detection circuit 101 receives the input ultrasonic echo signal, determines a first threshold based on the ultrasonic echo signal, compares the ultrasonic echo signal with the first threshold to obtain a first detection result, and outputs the first detection result to the detection fusion circuit 103.
[0055] In this embodiment, the ultrasonic echo signal is obtained by an ultrasonic radar (ultrasonic sensor). The ultrasonic echo signal is generated by the ultrasonic radar emitting an ultrasonic signal, which is reflected when encountering different interfaces or the surface of an object of the medium, and finally returns and is received by the receiver of the ultrasonic radar. In other implementation manners, any other device or equipment capable of emitting or receiving ultrasonic signals can also be selected to obtain the ultrasonic echo signal.
[0056] After receiving the ultrasonic echo signal, it needs to be input into the detection circuit 100, and at the same time input to the first detection circuit 101 and the second detection circuit 102.
[0057] After receiving the input ultrasonic echo signal, the first detection circuit 101 needs to determine the first threshold based on the ultrasonic echo signal. In this embodiment, the first threshold can be determined based on the ultrasonic echo signal in the following five ways:
[0058] First, calculate the mean value of other ultrasonic echo signals adjacent to the current ultrasonic echo signal. Then calculate the first threshold of the current ultrasonic echo signal according to the preset K value.
[0059] For example, the signal strength of the currently received ultrasonic echo signal is 18 dBm. The signal strengths of the first four ultrasonic echo signals adjacent to this ultrasonic echo signal are 12 dBm, 12 dBm, 14 dBm, and 15 dBm respectively. The signal strengths of the last four ultrasonic echo signals adjacent to this ultrasonic echo signal are 16 dBm, 13 dBm, 12 dBm, and 10 dBm respectively. The mean value of the signal strengths of these 8 ultrasonic echo signals is calculated to be 13 dBm, and the preset K value is 1.5. Then the first threshold is determined to be 19.5 dBm.
[0060] Second, calculate the median of other ultrasonic echo signals adjacent to the current ultrasonic echo signal. Then calculate the first threshold of the current ultrasonic echo signal according to the preset K value.
[0061] For example, the signal strength of the currently received ultrasonic echo signal is 18 dBm. The signal strengths of the first four ultrasonic echo signals adjacent to this ultrasonic echo signal are 12 dBm, 12 dBm, 14 dBm, and 15 dBm respectively. The signal strengths of the last four ultrasonic echo signals adjacent to this ultrasonic echo signal are 16 dBm, 13 dBm, 12 dBm, and 10 dBm respectively. The median of the signal strengths of these 8 ultrasonic echo signals is calculated to be 12.5 dBm, and the preset K value is 1.5. Then the first threshold is determined to be 18.75 dBm.
[0062] Third, calculate the minimum value of other ultrasonic echo signals adjacent to the current ultrasonic echo signal. Then calculate the first threshold of the current ultrasonic echo signal according to the preset K value.
[0063] For example, the signal strength of the currently received ultrasonic echo signal is 18 dBm, and the signal strengths of the first four ultrasonic echo signals adjacent to this ultrasonic echo signal are 12 dBm, 12 dBm, 14 dBm, and 15 dBm respectively. The signal strengths of the last four ultrasonic echo signals adjacent to this ultrasonic echo signal are 16 dBm, 13 dBm, 12 dBm, and 10 dBm respectively. The minimum value of the signal strengths of these 8 ultrasonic echo signals is calculated to be 10 dBm, and the preset K value is 2, so the first threshold is determined to be 20 dBm.
[0064] Fourth, calculate the maximum value of other ultrasonic echo signals adjacent to the current ultrasonic echo signal. Then calculate the first threshold of the current ultrasonic echo signal according to the preset K value.
[0065] For example, the signal strength of the currently received ultrasonic echo signal is 18 dBm, and the signal strengths of the first four ultrasonic echo signals adjacent to this ultrasonic echo signal are 12 dBm, 12 dBm, 14 dBm, and 15 dBm respectively. The signal strengths of the last four ultrasonic echo signals adjacent to this ultrasonic echo signal are 16 dBm, 13 dBm, 12 dBm, and 10 dBm respectively. The maximum value of the signal strengths of these 8 ultrasonic echo signals is calculated to be 16 dBm, and the preset K value is 1, so the first threshold is determined to be 16 dBm.
[0066] Fifth, create a sliding window at the current ultrasonic echo signal. The points in the window are mainly used to estimate the statistical characteristics of the background noise. Estimate the background noise by performing statistics on these data (such as calculating the mean or median), and calculate the first threshold of the current ultrasonic echo signal according to the preset K value.
[0067] For example, the signal strength of the currently received ultrasonic echo signal is 18 dBm, and the signal strengths of the first four ultrasonic echo signals adjacent to this ultrasonic echo signal are 12 dBm, 12 dBm, 14 dBm, and 15 dBm respectively. The signal strengths of the last four ultrasonic echo signals adjacent to this ultrasonic echo signal are 16 dBm, 13 dBm, 12 dBm, and 10 dBm respectively. Create a sliding window with a size of 1x5, slide it backward with a step size of 1, and calculate the means of the five ultrasonic echo signals within the sliding window, obtaining five means of 14.2 dBm, 15 dBm, 15.2 dBm, 14.8 dBm, and 13.8 dBm respectively. Then take the mean of these five means as 14.6 dBm, and the preset K value is 1, so the first threshold is determined to be 14.6 dBm.
[0068] It should be noted that after obtaining the above five means, the first threshold of the current ultrasonic echo signal can also be obtained by taking the median, minimum, or maximum value of these five means and then multiplying the median, minimum, or maximum value by a preset K value.
[0069] After determining the first threshold of the current ultrasonic echo signal, the first detection circuit 101 compares the first threshold with the current ultrasonic echo signal to obtain a first detection result.
[0070] For example, if the first threshold is 15 dBm and the signal strength of the current ultrasonic echo signal is 18 dBm, which is greater than or equal to the first threshold, it is determined that the first detection result is that a target object is detected.
[0071] For another example, if the first threshold is 20 dBm and the signal strength of the current ultrasonic echo signal is 18 dBm, which is less than the first threshold, it is determined that the first detection result is that no target object is detected.
[0072] The first detection circuit 101 can send the first detection result to the detection fusion circuit 103 in the form of high and low levels. For example, when the signal strength of the current ultrasonic echo signal is greater than or equal to the first threshold, the first detection circuit 101 outputs a high level to the detection fusion circuit 103. When the signal strength of the current ultrasonic echo signal is less than the first threshold, the first detection circuit 101 outputs a low level to the detection fusion circuit 103.
[0073] The second detection circuit 102 receives the input ultrasonic echo signal, compares the ultrasonic echo signal with a second threshold to obtain a second detection result, and outputs the second detection result to the detection fusion circuit 103. The second threshold is a preset threshold.
[0074] After receiving the input ultrasonic echo signal, the second detection circuit 102 compares the preset second threshold with the current ultrasonic echo signal to obtain a second detection result.
[0075] For example, if the second threshold is 10 dBm and the signal strength of the current ultrasonic echo signal is 15 dBm, which is greater than or equal to the second threshold, it is determined that the second detection result is that a target object is detected.
[0076] For another example, if the second threshold is 10 dBm and the signal strength of the current ultrasonic echo signal is 8 dBm, which is less than the second threshold, it is determined that the second detection result is that no target object is detected.
[0077] Similarly, the second detection circuit 102 can send the second detection result to the detection fusion circuit 103 in the form of high and low levels. For example, when the signal intensity of the current ultrasonic echo signal is greater than or equal to the second threshold, the second detection circuit 102 outputs a high level to the detection fusion circuit 103. When the signal intensity of the current ultrasonic echo signal is less than the second threshold, the second detection circuit 102 outputs a low level to the detection fusion circuit 103.
[0078] The detection fusion circuit 103 receives the input first detection result and the second detection result, and fuses the first detection result and the second detection result based on a preset weight to obtain a target detection result, where the target detection result represents the confidence level of detecting a target object by the ultrasonic echo signal.
[0079] After receiving the first detection result and the second detection result, the detection fusion circuit 103 fuses the first detection result and the second detection result based on a preset weight to obtain a target detection result.
[0080] For example, if the first detection circuit 101 outputs a high level to the detection fusion circuit 103 and the second detection circuit 102 outputs a high level to the detection fusion circuit 103, it is determined that the first detection result is 1 and the second detection result is 1. If the preset weight is 0.6, the target detection result is 1×0.6 + 1×0.4 = 1.
[0081] For another example, if the first detection circuit 101 outputs a high level to the detection fusion circuit 103 and the second detection circuit 102 outputs a low level to the detection fusion circuit 103, it is determined that the first detection result is 1 and the second detection result is 0. If the preset weight is 0.6, the target detection result is 1×0.6 + 0×0.4 = 0.6.
[0082] The preset weight can be set according to specific requirements. If the background noise in the ultrasonic echo signal is uneven and the image brightness difference is large, the weight of the first detection result is set higher. If the background noise in the ultrasonic echo signal is relatively uniform and the difference between the target object and the background is obvious, the weight of the second detection result is set higher.
[0083] The target detection result can represent the confidence level of detecting a target object by the ultrasonic echo signal, and is used for subsequent judgment and operations (such as judging whether there is an obstacle behind in a reverse image).
[0084] In the above solution, an ultrasonic echo signal is input to the first detection circuit 101 and the second detection circuit 102. The first detection circuit 101 dynamically determines a first threshold based on the ultrasonic echo signal, and then determines an accurate first detection result. In the case of uneven background noise and large image brightness differences in the ultrasonic echo signal, the first detection result is more accurate. The second detection circuit 102 determines a stable second detection result based on the ultrasonic echo signal and a preset second threshold. In the case of relatively uniform background noise and obvious differences between the target object and the background in the ultrasonic echo signal, the second detection result is relatively stable and reliable. The detection fusion circuit 103 further fuses the first detection result and the second detection result through a preset weight, and can obtain an accurate and stable target detection result, thereby improving the accuracy and stability of subsequent judgments and operations based on the target detection result.
[0085] In an example of the present application, a detection circuit is further provided, as Figure 2 shown, the first detection circuit 101 includes: a first buffer circuit 201, a second buffer circuit 202, a first calculation circuit 203, and a second calculation circuit 204; one end of the first buffer circuit 201 is electrically connected to the second buffer circuit 202, and the other end is electrically connected to the first calculation circuit 203; one end of the second buffer circuit 202 is electrically connected to the first buffer circuit 201, and the other end is electrically connected to the second calculation circuit 204; one end of the first calculation circuit 203 is electrically connected to the second buffer circuit 202, and the other end is electrically connected to the second calculation circuit 204.
[0086] The first buffer circuit 201 receives the input ultrasonic echo signal, caches the ultrasonic echo signal, and sends the cached ultrasonic echo signal to the second buffer circuit 202 and the first calculation circuit 203.
[0087] In this embodiment, the first buffer circuit 201 is a time-domain data cache, which is a first-in-first-out storage structure for storing and managing time-series data. For example, a FIFO buffer, a timing register, etc. In other embodiments, the first buffer circuit 201 can select any other storage device or module that follows the first-in-first-out rule.
[0088] The first buffer circuit 201 caches the received ultrasonic echo signal, and the first buffer circuit 201 sends the cached ultrasonic echo signal to the second buffer circuit 202 and the first calculation circuit 203 according to the first-in-first-out rule. As Figure 3AAs shown, there are 5 ultrasonic echo signals cached in the first cache circuit 201, namely X5, X4, X3, X2, and X1. The rightmost one is the earliest cached ultrasonic echo signal X1. Therefore, the first cache circuit 201 sends the rightmost ultrasonic echo signal X1 to the second cache circuit 202 and the first calculation circuit 203. After sending, the ultrasonic echo signals cached in the first cache circuit 201 are as Figure 3B shown. At this time, the earliest cached ultrasonic echo signal is X2. Then, the next time the first cache circuit 201 needs to send the ultrasonic echo signal X2 to the second cache circuit 202 and the first calculation circuit 203.
[0089] The second cache circuit 202 receives the input ultrasonic echo signal, caches the ultrasonic echo signal, and sends the cached ultrasonic echo signal to the second calculation circuit 204.
[0090] Similarly, the second cache circuit 202 also needs to cache the received ultrasonic echo signal. The second cache circuit 202 also needs to follow the first-in, first-out rule, and then send the cached ultrasonic echo signal to the second calculation circuit 204.
[0091] The first calculation circuit 203 receives the ultrasonic echo signal, calculates the ultrasonic echo signal based on a preset mode to obtain a processed signal, and sends the processed signal to the second calculation circuit 204.
[0092] The first calculation circuit 203 receives the ultrasonic echo signal sent by the first cache circuit, and then calculates the ultrasonic echo signal based on a preset mode to obtain a processed signal. The processed signal can be determined through the following five preset modes:
[0093] First, calculate the mean value of other ultrasonic echo signals adjacent to the current ultrasonic echo signal, and determine the mean value as the processed signal.
[0094] For example, the signal strength of the currently received ultrasonic echo signal is 18 dBm. The signal strengths of the first four ultrasonic echo signals adjacent to this ultrasonic echo signal are 12 dBm, 12 dBm, 14 dBm, and 15 dBm respectively. The signal strengths of the last four ultrasonic echo signals adjacent to this ultrasonic echo signal are 16 dBm, 13 dBm, 12 dBm, and 10 dBm respectively. The calculated mean value of the signal strengths of these 8 ultrasonic echo signals is 13 dBm, so the processed signal is determined to be 13 dBm.
[0095] Second, calculate the median of other ultrasonic echo signals adjacent to the current ultrasonic echo signal, and determine the median as the processed signal.
[0096] For example, the signal strength of the currently received ultrasonic echo signal is 18 dBm. The signal strengths of the first four ultrasonic echo signals adjacent to this ultrasonic echo signal are 12 dBm, 12 dBm, 14 dBm, and 15 dBm respectively. The signal strengths of the last four ultrasonic echo signals adjacent to this ultrasonic echo signal are 16 dBm, 13 dBm, 12 dBm, and 10 dBm respectively. The median of the signal strengths of these 8 ultrasonic echo signals is calculated to be 12.5 dBm, so the processed signal is determined to be 12.5 dBm.
[0097] Thirdly, calculate the minimum value of other ultrasonic echo signals adjacent to the current ultrasonic echo signal, and determine this minimum value as the processed signal.
[0098] For example, the signal strength of the currently received ultrasonic echo signal is 18 dBm. The signal strengths of the first four ultrasonic echo signals adjacent to this ultrasonic echo signal are 12 dBm, 12 dBm, 14 dBm, and 15 dBm respectively. The signal strengths of the last four ultrasonic echo signals adjacent to this ultrasonic echo signal are 16 dBm, 13 dBm, 12 dBm, and 10 dBm respectively. The minimum value of the signal strengths of these 8 ultrasonic echo signals is calculated to be 10 dBm, so the processed signal is determined to be 10 dBm.
[0099] Fourthly, calculate the maximum value of other ultrasonic echo signals adjacent to the current ultrasonic echo signal, and determine this maximum value as the processed signal.
[0100] For example, the signal strength of the currently received ultrasonic echo signal is 18 dBm. The signal strengths of the first four ultrasonic echo signals adjacent to this ultrasonic echo signal are 12 dBm, 12 dBm, 14 dBm, and 15 dBm respectively. The signal strengths of the last four ultrasonic echo signals adjacent to this ultrasonic echo signal are 16 dBm, 13 dBm, 12 dBm, and 10 dBm respectively. The maximum value of the signal strengths of these 8 ultrasonic echo signals is calculated to be 16 dBm, so the processed signal is determined to be 16 dBm.
[0101] Fifthly, create a sliding window at the current ultrasonic echo signal. The points in the window are mainly used to estimate the statistical characteristics of the background noise. By performing statistics on these data (such as calculating the mean or median), and determining the statistical data as the processed signal.
[0102] For example, the signal strength of the currently received ultrasonic echo signal is 18 dBm, and the signal strengths of the first four ultrasonic echo signals adjacent to the ultrasonic echo signal are 12 dBm, 12 dBm, 14 dBm, and 15 dBm respectively. The signal strengths of the last four ultrasonic echo signals adjacent to the ultrasonic echo signal are 16 dBm, 13 dBm, 12 dBm, and 10 dBm respectively. A sliding window of size 1x5 is created and slides backward with a step size of 1, and the mean values of the five ultrasonic echo signals within the sliding window are calculated, obtaining five mean values of 14.2 dBm, 15 dBm, 15.2 dBm, 14.8 dBm, and 13.8 dBm respectively. Then, the mean value of these five mean values is taken as 14.6 dBm, and the processed signal is determined to be 14.6 dBm.
[0103] It should be noted that after obtaining the above five mean values, the median, minimum value, or maximum value of these five mean values can also be taken as the processed signal of the current ultrasonic echo signal.
[0104] The second calculation circuit 204 receives the ultrasonic echo signal sent by the second buffer circuit 202 and the processed signal sent by the first calculation circuit 203, determines a processing weight based on the current time, determines the first threshold based on the processing weight and the processed signal, compares the ultrasonic echo signal with the first threshold to obtain a first detection result, and outputs the first detection result to the detection fusion circuit 103.
[0105] The second calculation circuit 204 receives the ultrasonic echo signal sent by the second buffer circuit 202 and the processed signal sent by the first calculation circuit 203, determines a processing weight (i.e., the preset K value) based on the current time, weights the processed signal based on the processing weight to obtain the first threshold, then compares the ultrasonic echo signal with the first threshold to obtain a first detection result, and finally outputs the first detection result to the detection fusion circuit 103 in the form of high and low levels.
[0106] In the above solution, through the first buffer circuit 201 and the second buffer circuit 202 that follow the first-in-first-out rule, it can be ensured that the processed signal and the ultrasonic echo signal input to the second calculation circuit 204 for calculation are corresponding to each other (i.e., the processed signal is obtained by processing the ultrasonic echo signal through the first calculation circuit 203), ensuring the stability of detection. The first calculation circuit 203 dynamically determines the corresponding processed signal based on the ultrasonic echo signal, and then the second calculation circuit 204 weights the processed signal based on the processing weight to obtain a dynamic first threshold, and finally compares the ultrasonic echo signal with the first threshold, which can determine an accurate first detection result in the case of uneven background noise and large image brightness differences in the ultrasonic echo signal, significantly improving the accuracy of detection.
[0107] In an example of the present application, a detection circuit is further provided, as Figure 4 shown. The first calculation circuit 203 includes: a first control circuit 301, a first register 302, a first multiplexer 303, and at least two third calculation circuits 304. One end of the first control circuit 301 is electrically connected to the first register 302, and the other end is electrically connected to the first multiplexer 303. One end of the first multiplexer 303 is electrically connected to the first control circuit 301, and the other end is electrically connected to the at least two third calculation circuits 304 respectively.
[0108] The first control circuit 301 receives the input ultrasonic echo signal, reads the preset mode stored in the first register 302, determines the target third calculation circuit based on the preset mode, controls the first multiplexer 303 to connect to the target third calculation circuit, and sends the ultrasonic echo signal to the target third calculation circuit. The preset mode includes at least two of sorting, mean, minimum, and maximum.
[0109] For example, as Figure 4 shown, Figure 4 in the first calculation circuit 103 shown, there are two third calculation circuits 304. The preset mode corresponding to the upper third calculation circuit 304 is sorting, and the preset mode corresponding to the lower third calculation circuit 304 is mean. If the preset mode read by the first control circuit 301 from the first register 302 is mean, then the first control circuit 301 controls the first multiplexer 303 to connect to the path of the lower third calculation circuit 304.
[0110] The target third calculation circuit receives the ultrasonic echo signal, processes the ultrasonic echo signal based on the preset mode to obtain the processed signal, and sends the processed signal to the second calculation circuit 204.
[0111] The target third calculation circuit (i.e., the third calculation circuit 304 corresponding to the preset mode read from the first register 302) receives the ultrasonic echo signal sent by the first control circuit 301, processes the ultrasonic signal based on the preset mode to obtain the processed signal, and finally sends the processed signal to the second calculation circuit 204.
[0112] In the above solution, the first control circuit 301 reads the pre-stored preset mode from the first register 302, and then controls the first multiplexer 303 to connect to the third calculation circuit 304 corresponding to the preset mode, so that the ultrasonic echo signal is processed based on the selected preset mode to obtain the processed signal. The flexibility of detection is significantly improved.
[0113] In an example of the present application, a detection circuit is further provided, as Figure 5 shown. The second calculation circuit 204 includes: a fourth calculation circuit 401 and a second register 402; the fourth calculation circuit 401 and the second register 402 are electrically connected.
[0114] The fourth calculation circuit 401 receives the processing signal and the ultrasonic echo signal, reads the processing weight from the second register 402 based on the current time, determines the first threshold based on the processing weight and the processing signal, compares the ultrasonic echo signal with the first threshold to obtain a first detection result, and outputs the first detection result to the detection fusion circuit 103.
[0115] For example, when the current time is 8:10:30, the fourth calculation circuit 401 reads the processing weight corresponding to the current time as 1 from the second register 402 based on the current time. The signal strength of the received processing signal is 12 dBm, and the signal strength of the ultrasonic echo signal is 15 dBm. Then, the first threshold is determined to be 12 dBm. The ultrasonic echo signal is compared with the first threshold. Since the ultrasonic echo signal is greater than or equal to the first threshold, the first detection result is determined to be that the target object is detected, and a high level is output to the detection fusion circuit 103.
[0116] In an example of the present application, a detection circuit is further provided, as Figure 6 shown. The second detection circuit 102 includes: a fifth calculation circuit 501 and a third register 502; the fifth calculation circuit 501 and the third register 502 are electrically connected.
[0117] The fifth calculation circuit 501 receives the ultrasonic echo signal, reads the second threshold from the third register 502, compares the ultrasonic echo signal with the second threshold to obtain a second detection result, and outputs the second detection result to the detection fusion circuit 103.
[0118] For example, the fifth calculation circuit 501 receives the ultrasonic echo signal, the signal strength of which is 12 dBm, and reads the pre-stored second threshold of 15 dBm from the third register 502. The ultrasonic echo signal is compared with the second threshold. Since the ultrasonic echo signal is less than the second threshold, the second detection result is determined to be that the target object is not detected, and a low level is output to the detection fusion circuit 103.
[0119] In an example of the present application, a detection circuit is further provided, as Figure 7AAs shown, the detection circuit 100 further includes: a selection circuit 104; the selection circuit 104 includes a second control circuit 601, a fourth register 602, and a second multiplexer 603; one end of the second control circuit 601 is electrically connected to the fourth register 602, and the other end is electrically connected to the second multiplexer 603; one end of the second multiplexer 603 is electrically connected to the second control circuit 601, and the other end is respectively electrically connected to the first detection circuit 101 and the second detection circuit 102.
[0120] The second control circuit 601 reads a preset detection mode from the fourth register 602. When it detects that the preset detection mode is the first detection mode, it controls the second multiplexer 603 to connect the path to the first detection circuit 101 and disconnect the path to the second detection circuit 102.
[0121] As Figure 7A shown, the second multiplexer 603 only connects the path to the first detection circuit 101. Therefore, at this time, only the first detection circuit 101 receives the input ultrasonic echo signal. The first detection circuit 101 dynamically determines a first threshold based on the ultrasonic echo signal, and then determines an accurate first detection result, and then outputs the first detection result to the detection fusion circuit 103. When the detection fusion circuit 103 only receives the first detection result, it directly determines the first detection result as the target detection result and outputs it.
[0122] When the second control circuit 601 detects that the preset detection mode is the second detection mode, it controls the second multiplexer 603 to disconnect the path to the first detection circuit 101 and connect the path to the second detection circuit 102.
[0123] As Figure 7B shown, the second multiplexer 603 only connects the path to the second detection circuit 102. Therefore, at this time, only the second detection circuit 102 receives the input ultrasonic echo signal. The second detection circuit 102 determines a stable second detection result based on the ultrasonic echo signal and a preset second threshold, and then outputs the second detection result to the detection fusion circuit 103. When the detection fusion circuit 103 only receives the second detection result, it directly determines the second detection result as the target detection result and outputs it.
[0124] When the second control circuit 601 detects that the preset detection mode is the third detection mode, it controls the second multiplexer 603 to connect the paths to the first detection circuit 101 and the second detection circuit 102.
[0125] As Figure 7CAs shown in the figure, the second multiplexer 603 simultaneously connects the paths to the first detection circuit 101 and the second detection circuit 102. Therefore, both the first detection circuit 101 and the second detection circuit 102 receive the input ultrasonic echo signal. The first detection circuit 101 dynamically determines the first threshold based on the ultrasonic echo signal, and then determines an accurate first detection result, and then outputs the first detection result to the detection fusion circuit 103. The second detection circuit 102 determines a stable second detection result based on the ultrasonic echo signal and a preset second threshold, and then outputs the second detection result to the detection fusion circuit 103. When the detection fusion circuit 103 receives the first detection result and the second detection result, it fuses the first detection result and the second detection result based on a preset weight to obtain a target detection result and outputs it.
[0126] It should be noted that the default preset detection mode can be initially set in the fourth register 602, and the preset detection mode stored in the fourth register 602 can be modified later through devices such as a processor or settings.
[0127] In the above solution, by setting the selection circuit 104, the second control circuit 601 in the selection circuit 104 reads the pre-stored preset detection mode from the fourth register 602, so as to control the second multiplexer 603 to only connect the path to the first detection circuit 101, only connect the path to the second detection circuit 102, or simultaneously connect the paths to the first detection circuit 101 and the second detection circuit 102. Further improves the flexibility of detection.
[0128] In an example of the present application, a detection circuit is also provided, as Figure 8 shown, the detection circuit 100 further includes: a third detection circuit 105, and the third detection circuit 105 includes: a third control circuit 701, a fifth register 702, and a counter 703; one end of the third control circuit 701 is electrically connected to the fifth register 702, and the other end is electrically connected to the counter 703;
[0129] When the third control circuit 701 receives the target detection result and determines that the target detection result has changed, it reads the first count result from the counter 703. The first count result is the count result when the previous target detection result changed, controls the counter 703 to start counting, reads the preset duration from the fifth register 702, and when it detects that the first count result is less than the preset duration, corrects all the target detection results within the counting time of the first count result to the target detection result before the previous target detection result changed.
[0130] When the third control circuit 701 first detects a change in the target detection result, since the counter 703 has never started counting, at this time, it is only necessary to control the counter 703 to start counting.
[0131] When the third control circuit 701 detects a change in the target detection result for the second time or subsequently, it first reads the first counting result from the time when the last target detection result changed to the current time from the counter 703, and then controls the counter 703 to start counting again. Then it reads the preset duration stored in the fifth register 702, and compares the first counting result with the preset duration. If the first counting result is less than the preset duration, it means that the change in the last target detection result may be caused by circuit fluctuations or other abnormal reasons. Therefore, the target detection results during this period are corrected to the target detection results before the last change in the target detection result.
[0132] For example, at 8:10:00, the third control circuit 701 detects that the target detection result changes for the first time, from 1 to 0.6, and then controls the counter 703 to start counting. At 8:10:10, it detects that the target detection result changes for the second time, from 0.6 to 0.8. The first counting result read from the counter 703 is 10 seconds, and the counter 703 is controlled to start counting again. The preset duration read from the fifth register 702 is 20 seconds, and since the first counting result is less than the preset duration, all the target detection results of 0.6 from 8:10:00 to 8:10:10 are corrected to 1.
[0133] In the above solution, the third detection circuit 105 filters out the glitches of the target detection result, corrects the target detection result that changes due to circuit fluctuations or other abnormal reasons, further improves the detection accuracy, and significantly reduces the false alarm rate.
[0134] In an example of the present application, a detection method is provided, which is applied to a detection circuit. The detection circuit includes: a first detection circuit, a second detection circuit, and a detection fusion circuit; as Figure 9 shown, the method includes:
[0135] Step 801, the first detection circuit receives the input ultrasonic echo signal, determines a first threshold based on the ultrasonic echo signal, compares the ultrasonic echo signal with the first threshold to obtain a second detection result, and outputs the second detection result to the detection fusion circuit.
[0136] Step 802, the second detection circuit receives the input ultrasonic echo signal, compares the ultrasonic echo signal with a second threshold to obtain a first detection result, and outputs the first detection result to the detection fusion circuit, where the second threshold is a preset threshold.
[0137] Step 803, the detection fusion circuit receives the input first detection result and the second detection result, fuses the first detection result and the second detection result based on a preset weight to obtain a target detection result, and the target detection result represents the confidence level of detecting a target object by the ultrasonic echo signal.
[0138] In an example of the present application, a detection method is further provided, which is applied to a detection circuit. The first detection circuit includes: a first buffer circuit, a second buffer circuit, a first calculation circuit, and a second calculation circuit; as Figure 10 shown, the method includes:
[0139] Step 901, the first buffer circuit receives the input ultrasonic echo signal, caches the ultrasonic echo signal, and sends the cached ultrasonic echo signal to the second buffer circuit and the first calculation circuit.
[0140] Step 902, the second buffer circuit receives the input ultrasonic echo signal, caches the ultrasonic echo signal, and sends the cached ultrasonic echo signal to the second calculation circuit.
[0141] Step 903, the first calculation circuit receives the ultrasonic echo signal, calculates the ultrasonic echo signal based on a preset mode to obtain a processed signal, and sends the processed signal to the second calculation circuit.
[0142] Step 904, the second calculation circuit receives the ultrasonic echo signal sent by the second buffer circuit and the processed signal sent by the first calculation circuit, determines a processing weight based on the current time, determines a first threshold based on the processing weight and the processed signal, compares the ultrasonic echo signal with the first threshold to obtain a first detection result, and outputs the first detection result to the detection fusion circuit.
[0143] In an example of the present application, a detection method is further provided, which is applied to a detection circuit. The first calculation circuit includes: a first control circuit, a first register, a first multiplexer, and at least two third calculation circuits; as Figure 11 shown, the method includes:
[0144] Step 1001, the first control circuit receives the input ultrasonic echo signal, reads the preset mode stored in the first register, determines a target third calculation circuit based on the preset mode, controls the first multiplexer to connect to the target third calculation circuit, and sends the ultrasonic echo signal to the target third calculation circuit. The preset mode includes at least two of sorting, mean, minimum, and maximum.
[0145] Step 1002: The target third computing circuit receives the ultrasonic echo signal, processes the ultrasonic echo signal based on the preset mode to obtain the processed signal, and sends the processed signal to the second computing circuit.
[0146] In an example of the present application, a detection method is further provided, which is applied to a detection circuit. The second computing circuit includes: a fourth computing circuit and a second register; the method includes:
[0147] The fourth computing circuit receives the processed signal and the ultrasonic echo signal, reads the processing weight from the second register based on the current time, determines the first threshold based on the processing weight and the processed signal, compares the ultrasonic echo signal with the first threshold to obtain a first detection result, and outputs the first detection result to the detection fusion circuit.
[0148] In an example of the present application, a detection method is further provided, which is applied to a detection circuit. The second detection circuit includes: a fifth computing circuit and a third register; the method includes:
[0149] The fifth computing circuit receives the ultrasonic echo signal, reads the second threshold from the third register, compares the ultrasonic echo signal with the second threshold to obtain a second detection result, and outputs the second detection result to the detection fusion circuit.
[0150] In an example of the present application, a detection method is further provided, which is applied to a detection circuit. The detection circuit further includes: a selection circuit; the selection circuit includes a second control circuit, a fourth register, and a second multiplexer; as Figure 12 shown, the method includes:
[0151] Step 1101: The second control circuit reads the preset detection mode from the fourth register. When it detects that the preset detection mode is the first detection mode, it controls the second multiplexer to connect the path to the first detection circuit and disconnect the path to the second detection circuit.
[0152] Step 1102: When it detects that the preset detection mode is the second detection mode, it controls the second multiplexer to disconnect the path to the first detection circuit and connect the path to the second detection circuit.
[0153] Step 1103: When it detects that the preset detection mode is the third detection mode, it controls the second multiplexer to connect the paths to the first detection circuit and the second detection circuit.
[0154] In an example of the present application, a detection method is further provided, which is applied to a detection circuit. The detection circuit further includes: a third detection circuit, and the third detection circuit includes a third control circuit, a fifth register, and a counter. The method includes:
[0155] When the third control circuit receives the target detection result and determines that the target detection result has changed, it reads the first counting result from the counter. The first counting result is the counting result when the target detection result changed last time. It controls the counter to start counting, reads the preset duration from the fifth register, and when it detects that the first counting result is less than the preset duration, it corrects all the target detection results within the counting time of the first counting result to the target detection results before the target detection result changed last time.
[0156] The schematic diagram of the hardware composition structure of the chip provided by the embodiment of the present application is as Figure 13 shown. The chip 1200 includes a processor 1210, a user interface 1230, a memory 1250, a bus 1240, and the above-mentioned detection circuit 1260. Each component in the chip 1200 is coupled together through the bus 1240. It can be understood that the bus 1240 is used to realize the connection and communication between these components. In addition to the data bus, the bus 1240 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clear illustration, in Figure 13 all kinds of buses are labeled as bus 1240.
[0157] The processor 1210 can be built into a system-on-chip or an application specific integrated circuit (ASIC). The processor 1210 can also be located on an independent semiconductor chip and has the ability to process signals, such as a general-purpose processor, a digital signal processor (DSP), a microprocessor, a microcontroller unit (MCU), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0158] The user interface 1230 is used for interacting and exchanging information with the user.
[0159] The memory 1250 stores executable instructions for implementing the data processing method provided by the embodiment of the present application. The memory 1250 can be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memories, hard disk drives, optical disc drives, etc. The memory 1250 optionally includes one or more storage devices that are physically located far from the processor 1210.
[0160] In some embodiments, the memory 1250 is capable of storing data to support various operations. Examples of such data include programs, modules, and data structures, or subsets or supersets thereof.
[0161] In some embodiments, the chip 1200 may further include:
[0162] An operating system 1251, including system programs for handling various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, an application layer, etc., for implementing various basic services and handling hardware-based tasks;
[0163] A network communication module 1252, for reaching other computing devices via one or more (wired or wireless) network interfaces 1220. Exemplary network interfaces 1220 include: Bluetooth, Wi-Fi (Wireless Fidelity), and USB (Universal Serial Bus), etc.
[0164] An embodiment of the present application further provides an electronic device, where the electronic device includes a chip, and the chip is capable of executing the detection method provided by the embodiment of the present application.
[0165] An embodiment of the present application further provides a computer-readable storage medium storing executable instructions, where the executable instructions, when executed by a processor, will cause the processor to execute the detection method provided by the embodiment of the present application.
[0166] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disc, or CD-ROM; or it may be various devices including one or any combination of the above memories.
[0167] In some embodiments, the executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including being deployed as an independent program or being deployed as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0168] As an example, the executable instructions may be deployed to execute on one computing device, or on multiple computing devices located at one location, or alternatively, on multiple computing devices distributed at multiple locations and interconnected by a communication network.
[0169] An embodiment of the present application provides a computer program product, where the computer program product includes computer programs / instructions, and when the computer programs / instructions are executed by a processor, the data processing method described in the present application is implemented.
[0170] The above are only embodiments of the present application and are not intended to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and scope of the present application are all included in the protection scope of the present application.
Claims
1. A detection circuit, the detection circuit comprising: A first detection circuit, a second detection circuit and a detection fusion circuit; The first detection circuit is electrically connected to the detection fusion circuit; The second detection circuit is electrically connected to the detection fusion circuit; The first detection circuit receives an input ultrasonic echo signal, determines a first threshold based on the ultrasonic echo signal, compares the ultrasonic echo signal with the first threshold to obtain a first detection result, and outputs the first detection result to the detection fusion circuit; The second detection circuit receives an input ultrasonic echo signal, compares the ultrasonic echo signal with a second threshold, obtains a second detection result, and outputs the second detection result to the detection fusion circuit, where the second threshold is a preset threshold; The detection fusion circuit receives the first detection result and the second detection result as input, fuses the first detection result and the second detection result based on a preset weight, and obtains a target detection result, wherein the target detection result represents the confidence level of the ultrasonic echo signal in detecting the target object.
2. The detection circuit according to claim 1, wherein the first detection circuit comprises: A first cache circuit, a second cache circuit, a first calculation circuit, and a second calculation circuit; One end of the first cache circuit is electrically connected to the second cache circuit, and the other end is electrically connected to the first calculation circuit; one end of the second cache circuit is electrically connected to the first cache circuit, and the other end is electrically connected to the second calculation circuit; one end of the first calculation circuit is electrically connected to the first cache circuit, and the other end is electrically connected to the second calculation circuit; The first buffer circuit receives an input ultrasonic echo signal, buffers the ultrasonic echo signal, and sends the buffered ultrasonic echo signal to the second buffer circuit and the first calculation circuit; The second buffer circuit receives an input ultrasonic echo signal, buffers the ultrasonic echo signal, and sends the buffered ultrasonic echo signal to the second calculation circuit; The first calculation circuit receives the ultrasonic echo signal, calculates the ultrasonic echo signal based on a preset mode to obtain a processed signal, and sends the processed signal to the second calculation circuit; The second calculation circuit receives the ultrasonic echo signal sent by the second cache circuit and the processing signal sent by the first calculation circuit, determines a processing weight based on the current time, determines the first threshold based on the processing weight and the processing signal, compares the ultrasonic echo signal with the first threshold to obtain a first detection result, and outputs the first detection result to the detection fusion circuit.
3. The detection circuit according to claim 2, wherein the first calculation circuit comprises: a first control circuit, a first register, a first multiplexer, and at least two third calculation circuits; One end of the first control circuit is electrically connected to the first register, and the other end is electrically connected to the first multi-way switch; One end of the first multi-way switch is electrically connected to the first control circuit, and the other end is electrically connected to the at least two third calculation circuits respectively; The first control circuit receives an input ultrasonic echo signal, reads a preset mode stored in the first register, determines a target third calculation circuit based on the preset mode, controls the first multi-way switch to connect the target third calculation circuit, and sends the ultrasonic echo signal to the target third calculation circuit, wherein the preset mode includes at least two of sorting, average, minimum and maximum values; The target third calculation circuit receives the ultrasonic echo signal, processes the ultrasonic echo signal based on the preset mode to obtain the processed signal, and sends the processed signal to the second calculation circuit.
4. The detection circuit according to claim 2, wherein the second calculation circuit comprises: a fourth calculation circuit and a second register; The fourth calculation circuit is electrically connected to the second register; The fourth calculation circuit receives the processed signal and the ultrasonic echo signal, reads the processing weight from the second register based on the current time, determines the first threshold based on the processing weight and the processed signal, compares the ultrasonic echo signal with the first threshold to obtain a first detection result, and outputs the first detection result to the detection fusion circuit.
5. The detection circuit according to claim 1, wherein the second detection circuit comprises: a fifth calculation circuit and a third register; The fifth calculation circuit is electrically connected to the third register; The fifth calculation circuit receives the ultrasonic echo signal, reads the second threshold value from the third register, compares the ultrasonic echo signal with the second threshold value to obtain a second detection result, and outputs the second detection result to the detection fusion circuit.
6. The detection circuit according to claim 1, further comprising: Select the circuit; The selection circuit includes a second control circuit, a fourth register and a second multi-way switch; One end of the second control circuit is electrically connected to the fourth register, and the other end is electrically connected to the second multi-way switch; One end of the second multi-way switch is electrically connected to the second control circuit, and the other end is electrically connected to the first detection circuit and the second detection circuit respectively; The second control circuit reads a preset detection mode from the fourth register, detects that the preset detection mode is the first detection mode, and controls the second multi-way switch to connect the path with the first detection circuit and disconnect the path with the second detection circuit; When it is detected that the preset detection mode is the second detection mode, the second multi-way switch is controlled to disconnect the path with the first detection circuit and connect the path with the second detection circuit; When it is detected that the preset detection mode is the third detection mode, the second multi-way switch is controlled to connect the paths with the first detection circuit and the second detection circuit.
7. The detection circuit according to claim 1, further comprising: A third detection circuit, the third detection circuit comprising a third control circuit, a fifth register and a counter; One end of the third control circuit is electrically connected to the fifth register, and the other end is electrically connected to the counter; The third control circuit receives the target detection result and determines that the target detection result has changed, then reads a first counting result from the counter, where the first counting result is the counting result of the last target detection result change, controls the counter to start counting, reads a preset time length from the fifth register, detects that the first counting result is less than the preset time length, and corrects all target detection results within the counting time of the first counting result to the target detection result before the last target detection result changed.
8. A detection method, applied to a detection circuit, the detection circuit comprising: A first detection circuit, a second detection circuit and a detection fusion circuit; The method comprises: The first detection circuit receives an input ultrasonic echo signal, determines a first threshold based on the ultrasonic echo signal, compares the ultrasonic echo signal with the first threshold to obtain a second detection result, and outputs the second detection result to the detection fusion circuit; The second detection circuit receives an input ultrasonic echo signal, compares the ultrasonic echo signal with a second threshold value, obtains a first detection result, and outputs the first detection result to the detection fusion circuit, wherein the second threshold value is a preset threshold value; The detection fusion circuit receives the first detection result and the second detection result as input, fuses the first detection result and the second detection result based on a preset weight, and obtains a target detection result, wherein the target detection result represents the confidence level of the ultrasonic echo signal in detecting the target object.
9. A chip, comprising the detection circuit according to any one of claims 1 to 7. 10 . An electronic device, comprising a chip, wherein the chip comprises the detection circuit according to claim 1 .