Ultrasonic signal processing method and device, equipment and storage medium
By automatically generating PWM-coded ultrasonic signals through a generator network and an identification network, the problems of high cost and insufficient anti-interference capability of traditional ultrasonic radar systems are solved. This enables high-precision echo signal detection and target distance determination, improving detection accuracy and robustness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI ZHIWEI ROBOT CO LTD
- Filing Date
- 2026-02-02
- Publication Date
- 2026-05-05
AI Technical Summary
Traditional ultrasonic radar systems rely on high-performance hardware, resulting in high costs. Furthermore, existing PWM encoding methods have limited anti-interference capabilities in complex and variable environments, making them prone to false alarms and missed detections.
By generating pulse width modulation (PWM) coding parameters through a generative network, generating ultrasonic signals based on environmental noise and random noise, and using an identification network to identify echo signals and determine target distance, the dependence on high-performance modulation hardware is broken, and the automatic generation of PWM-coded ultrasonic signals with high uniqueness and strong anti-interference capability is achieved.
It improves the detection accuracy, robustness, and real-time processing capability of ultrasonic radar systems in complex dynamic environments, and achieves high-precision echo signal detection and matching.
Smart Images

Figure CN121978695A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of signal processing technology, and in particular to a method, apparatus, device, storage medium and program product for processing ultrasonic signals. Background Technology
[0002] With the rapid development of intelligent robots, autonomous driving, and industrial automation, ultrasonic radar has become an important means of spatial perception and target detection due to its low cost, low power consumption, and strong environmental adaptability. Traditional ultrasonic radar systems generally employ hardware solutions such as frequency modulation (FM) and phase modulation (PM), using specific encoding methods to improve signal anti-interference capabilities and ranging accuracy. However, these solutions often rely on dedicated high-performance hardware (such as high-precision DDS chips and complex analog front-ends), resulting in high overall system costs and hindering widespread adoption in large-scale, low-cost terminals or embedded platforms. Furthermore, existing signal generation methods such as PWM encoding are mostly static designs, which have limited anti-interference capabilities and signal uniqueness when facing complex and ever-changing real-world application scenarios, easily leading to false alarms and missed detections. Summary of the Invention
[0003] This invention provides a method, apparatus, device, and storage medium for processing ultrasonic signals, which can improve the detection accuracy, robustness, and real-time processing capability of ultrasonic radar systems in complex dynamic environments.
[0004] In a first aspect, embodiments of the present invention provide a method for processing ultrasonic signals, comprising: Environmental noise and random noise are input into the generation network to generate pulse width modulation (PWM) coding parameters; wherein, the PWM coding parameters include at least one of the following: frequency, duty cycle, and modulation sequence; An ultrasonic signal is generated based on the PWM encoding parameters, and the ultrasonic signal is emitted. The system acquires echo signals and inputs the echo signals and the ultrasonic signals into an identification network, outputting a first identification result; wherein, the first identification result includes whether the echo signal is the echo signal corresponding to the ultrasonic signal and the confidence level; If the identification result indicates that the echo signal is the echo signal corresponding to the ultrasonic signal, then the target distance is determined based on the reception time of the echo signal and the transmission time of the ultrasonic signal.
[0005] Secondly, embodiments of the present invention also provide an ultrasonic signal processing apparatus, comprising: A PWM encoding parameter generation module is used to input environmental noise and random noise into a generation network to generate pulse width modulation (PWM) encoding parameters; wherein, the PWM encoding parameters include at least one of the following: frequency, duty cycle, and modulation sequence; An ultrasonic signal generation module is used to generate an ultrasonic signal based on the PWM encoding parameters and to transmit the ultrasonic signal. The first identification result determination module is used to acquire echo signals, input the echo signals and the ultrasonic signals into an identification network, and output a first identification result; wherein, the first identification result includes whether the echo signal is the echo signal corresponding to the ultrasonic signal and the confidence level; The target distance determination module is used to determine the target distance based on the reception time of the echo signal and the transmission time of the ultrasonic signal if the identification result indicates that the echo signal is the echo signal corresponding to the ultrasonic signal.
[0006] Thirdly, embodiments of the present invention also provide an electronic device, the electronic device comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the ultrasonic signal processing method described in the embodiments of the present invention.
[0007] Fourthly, embodiments of the present invention also provide a computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions, which are used to cause a processor to execute and implement the ultrasonic signal processing method described in the embodiments of the present invention.
[0008] Fifthly, embodiments of the present invention also provide a computer program product, including a computer program, characterized in that, when executed by a processor, the computer program implements the ultrasonic signal processing method described in the embodiments of the present invention.
[0009] This invention discloses a method, apparatus, device, and storage medium for processing ultrasonic signals. Environmental noise and random noise are input into a generation network to generate pulse width modulation (PWM) coding parameters. The PWM coding parameters include at least one of the following: frequency, duty cycle, and modulation sequence. An ultrasonic signal is generated based on the PWM coding parameters and then transmitted. Echo signals are acquired, and the echo signals and the ultrasonic signal are input into an identification network to output a first identification result. The first identification result includes whether the echo signal corresponds to the ultrasonic signal and its confidence level. If the identification result indicates that the echo signal corresponds to the ultrasonic signal, the target distance is determined based on the reception time of the echo signal and the transmission time of the ultrasonic signal. The ultrasonic signal processing method provided in this embodiment overcomes the dependence on high-performance modulation hardware, automatically generating highly unique and highly anti-interference PWM-coded ultrasonic signals, and achieving high-precision detection and matching of echo signals. This significantly improves the detection accuracy, robustness, and real-time processing capability of ultrasonic radar systems in complex dynamic environments. Attached Figure Description
[0010] Figure 1 This is a flowchart of an ultrasonic signal processing method according to Embodiment 1 of the present invention; Figure 2 This is a schematic diagram of the structure of an ultrasonic signal processing device according to Embodiment 2 of the present invention; Figure 3 This is a schematic diagram of the structure of an electronic device according to Embodiment 3 of the present invention. Detailed Implementation
[0011] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0012] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0013] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0014] Example 1 Figure 1 This is a flowchart of an ultrasonic signal processing method provided in Embodiment 1 of the present invention. This embodiment is applicable to the generation and recognition of ultrasonic signals. The method can be executed by an ultrasonic signal processing device, which can be implemented in software and / or hardware, optionally through an electronic device, such as a mobile terminal, PC, or server. The solution of this embodiment can be applied to the following scenarios: intelligent robot navigation and obstacle avoidance systems, autonomous driving assisted perception radar (low-speed unmanned vehicles / AGVs), industrial automated object detection and sorting lines, smart security space monitoring and intrusion detection, and portable medical ultrasound imaging and anomaly detection. Figure 1 As shown, the method specifically includes the following steps: S110 inputs environmental noise and random noise into the generation network to generate pulse width modulation (PWM) coding parameters.
[0015] The PWM encoding parameters include at least one of the following: frequency, duty cycle, and modulation sequence. These three parameters determine the time-domain shape, energy distribution, and control characteristics of the PWM signal. Environmental noise is obtained by collecting noise data from the current environment; random noise can be generated using a pseudo-random generator. The generation network can be a pre-trained neural network used to generate the PWM encoding parameters.
[0016] In this embodiment, the process of inputting environmental noise and random noise into the generation network to generate PWM coding parameters can be as follows: First, extract features from the environmental noise and random noise respectively to obtain the feature vectors corresponding to the environmental noise and the random noise. Then, concatenate these two vectors and finally input the concatenated feature vectors into the generation network to output PWM coding parameters.
[0017] The generator network can include an input layer, a decoder, and an output layer. The input layer can be a fully connected layer used to map the concatenated feature vectors to a preset dimension (e.g., 64-dimensional). The decoder includes a Transformer module and a positional encoding module. The Transformer module includes a multi-head attention layer, a feedforward network, layer normalization, and residual connections. The multi-head attention layer captures the correlation between positions in the sequence, and can learn representations from different subspaces. The feedforward network performs a non-linear transformation on the representation of each position, increasing the model's expressive power. The positional encoding module adds positional encoding to enable the model to perceive positional information in the sequence. The output layer includes a fully connected layer and an activation function. The fully connected layer maps the decoder's output to multiple PWM encoding parameters, where the dimension can be represented as "number of channels × parameter value for each channel." The activation function limits the output to a preset range.
[0018] S120 generates and transmits ultrasonic signals based on PWM encoding parameters.
[0019] The PWM encoding parameters can be input into the ultrasonic generation module to generate ultrasonic signals, which can then be transmitted and received via an ultrasonic transducer.
[0020] In this embodiment, multiple ultrasonic signals can be generated using a multi-channel drive array mode (e.g., 3 channels). Since the phase or time offset differs between channels, multiple ultrasonic signals with different phases can be generated. Specifically, PWM encoding parameters are sent to each channel, and the ultrasonic generation module in each channel generates ultrasonic signals based on the PWM encoding parameters and phase information (or time offset information). The ultrasonic signals are then transmitted and received via ultrasonic transducers in the channels.
[0021] S130 acquires the echo signal and inputs the echo signal and ultrasonic signal into the recognition network, outputting the first recognition result.
[0022] The first identification result includes whether the echo signal corresponds to an ultrasonic signal and its confidence level. That is, the first identification result can be: the echo signal corresponds to an ultrasonic signal (represented by "1") and its confidence level, or the echo signal does not correspond to an ultrasonic signal (represented by "0") and its confidence level. An ADC module can be used to acquire the echo signal. In this embodiment, the ultrasonic transducer converts the mechanical vibration of the echo into a weak analog electrical signal, and the ADC samples this analog signal into a digital signal.
[0023] The recognition network is a pre-trained neural network model used to identify whether an echo signal is an echo signal corresponding to an ultrasonic signal.
[0024] Optionally, the method for inputting the echo signal and the ultrasonic signal into the recognition network and outputting the first recognition result can be as follows: performing a Fourier transform on the echo signal to obtain the echo frequency domain signal; filtering the echo signal to obtain the filtered echo time domain signal; and inputting the echo frequency domain signal, the echo time domain signal, and the ultrasonic signal into the recognition network to output the first recognition result.
[0025] The echo signal can be filtered using an adaptive filtering algorithm, such as Least Mean Square (LMS), Normalized Least Mean Square (NLMS), or Frequency-Domain Block Least Mean Square (FBLMS). In this embodiment, after obtaining the echo frequency domain signal and the echo time domain signal, the echo frequency domain signal, the echo time domain signal, and the ultrasonic signal are input into the recognition network. The recognition network processes these three signals to output the first recognition result.
[0026] Optionally, the identification network includes a time-domain processing subnetwork, a frequency-domain processing subnetwork, a signal comparison subnetwork, and a fusion discrimination subnetwork. The process of inputting the echo frequency-domain signal, the echo time-domain signal, and the ultrasonic signal into the identification network and outputting a first identification result can be as follows: extracting features from the echo time-domain signal based on the time-domain processing subnetwork to obtain echo time-domain features; extracting features from the echo frequency-domain signal based on the frequency-domain processing subnetwork to obtain echo frequency-domain features; processing the echo time-domain signal and the ultrasonic signal based on the signal comparison subnetwork to obtain comparison features; and fusing and discriminating the echo time-domain features, echo frequency-domain features, and comparison features based on the fusion discrimination subnetwork to obtain the first identification result.
[0027] The temporal processing subnetwork can include one-dimensional convolutional layers and max pooling layers. The process of feature extraction of echo temporal signals based on the temporal processing subnetwork can be as follows: first, local features of the echo signal are extracted based on one-dimensional convolutional layers to obtain multiple local features; then, the multiple local features are aggregated based on max pooling layers to obtain the echo temporal features.
[0028] The frequency domain processing subnetwork can include fully connected layers and activation functions. The process of extracting features from the echo frequency domain signal based on the frequency domain processing subnetwork can be as follows: first, the echo frequency domain signal is mapped into a feature vector of a preset dimension based on the fully connected layer; then, the feature vector is nonlinearly processed based on the activation function to obtain the echo frequency domain features.
[0029] The signal alignment subnetwork can include a stitching layer, a one-dimensional convolutional layer, and an average pooling layer. The process of processing the echo time-domain signal and the ultrasonic signal based on the signal alignment subnetwork can be as follows: First, the echo time-domain signal and the ultrasonic signal are stitched together using the stitching layer to obtain stitched features. Then, the stitched features are used to extract associated local features using the one-dimensional convolutional layer to obtain multiple associated local features. Finally, the multiple associated local features are aggregated using the average pooling layer to obtain the alignment features.
[0030] The fusion discrimination subnetwork can include a splicing layer, a category regression layer, and a confidence regression layer. The process of fusing and discriminating echo time-domain features, echo frequency-domain features, and comparison features based on the fusion discrimination subnetwork can be as follows: First, the echo time-domain features, echo frequency-domain features, and comparison features are spliced together using the splicing layer; then, the spliced features are processed using the category regression layer to obtain the category result of whether the echo signal is the echo signal corresponding to the ultrasonic signal; and finally, the spliced features are processed using the confidence regression layer to obtain the confidence level corresponding to the category result.
[0031] Optionally, the recognition network includes an input layer, a hidden layer, and an output layer. The method of inputting the echo signal and the ultrasonic signal into the recognition network and outputting the first recognition result can be as follows: the echo signal and the ultrasonic signal are combined and processed based on the input layer to obtain a combined signal; wherein, the combination processing is splicing processing or differential processing; the combined signal is feature extracted based on the hidden layer to obtain time-frequency features; and the time-frequency features are processed based on the input layer to obtain the first recognition result.
[0032] The process of combining the echo signal and the ultrasonic signal at the input layer can be as follows: First, the received signal r and the transmitted signal p are normalized. Then, the two normalized signals are concatenated along their feature dimensions or differentially processed. The differential processing can be represented as rp. This combined processing of the echo signal and the ultrasonic signal captures the relationship between them.
[0033] The combined signal has a shape of (N, L, C), where N is the batch size, L is the signal sequence length, and C is the number of channels.
[0034] The hidden layers include convolutional feature extraction layers and a self-attention mechanism module. The convolutional feature extraction layers consist of one-dimensional convolutional layers used to extract local features of the combined signal. The kernel size and stride are preset to capture features at different scales. Batch normalization and activation functions (such as ReLU) can be used after each convolutional layer. The self-attention mechanism module may include multi-head self-attention layers to capture global contextual information and understand long-range dependencies in the signal.
[0035] The output layer consists of a fully connected layer and an activation function. One or two fully connected layers are used to map the features extracted by the convolutional feature extraction layer and the self-attention mechanism module into a vector; the activation function is then used to perform non-linear processing on this vector to obtain the first recognition result.
[0036] S140, if the identification result is that the echo signal is the echo signal corresponding to the ultrasonic signal, then the target distance is determined based on the reception time of the echo signal and the transmission time of the ultrasonic signal.
[0037] Where the transmission time of the ultrasonic signal is t1 and the reception time of the echo signal is t2, the formula for calculating the target distance can be expressed as: , where V represents the speed of sound propagation.
[0038] Optionally, the training method for the generator network and the recognition network is as follows: Obtain a noise sample set; input the noise sample set into the generator network to output a PWM encoding parameter sample set; generate an ultrasonic sample set based on the PWM encoding parameter sample set, and simulate the echo sample set corresponding to the ultrasonic sample set; combine the ultrasonic samples and echo samples pairwise to obtain sample pairs, and add labels to the sample pairs; wherein, the sample pairs include positive sample pairs and negative sample pairs; input the sample pairs into the recognition network to output a second recognition result; wherein, the second recognition result includes whether the echo sample is the echo sample corresponding to the ultrasonic sample and the confidence level; and perform collaborative training of the generator network and the recognition network based on the second recognition result, the labels, and the confidence level.
[0039] In this example, assuming the generator network is represented by G and the recognition network by D, and taking two noise samples as an example: z1 and z2, the generated PWM encoded parameter samples are represented as: y1=G(z1), y2=G(z2). The generated ultrasonic samples are represented as: p1=C(y1), p2=C(y2). The simulated echo signals are represented as: r1 and r2, where r1 corresponds to p1 and r2 corresponds to p2. Simulated noise or other radar signals are used to generate interference signal n. The positive sample pairs consist of: (r1+n, p1), (r2+n, p2), labeled 1; the negative sample pairs consist of: (r1+n, p2), (r2+n, p1), labeled 0.
[0040] Specifically, the method for co-training the generator network and the recognition network based on the second recognition result, label, and confidence score can be as follows: first, determine the loss function based on the second recognition result, label, and confidence score, and then perform back gradient tuning on the generator network and the recognition network based on the loss function until training is completed.
[0041] Optionally, after determining the target distance based on the reception time of the echo signal and the transmission time of the ultrasonic signal, the following steps are also included: obtaining signal quality assessment indicators; and adjusting the PWM encoding parameters generated next time based on the signal quality assessment quality and confidence level.
[0042] The signal quality assessment indicators include at least one of the following: the type of environmental noise, the amplitude of the ultrasonic signal, the number of times the ultrasonic signal is intercepted, and the signal-to-noise ratio of the echo signal. The types of environmental noise include high-frequency noise and low-frequency noise. High-frequency and low-frequency can be distinguished according to preset values, for example, values above a certain value are considered high-frequency, and values below another value are considered low-frequency. This is not limited here.
[0043] The PWM encoding parameters generated in the next step can be understood as the PWM encoding parameters generated by inputting the environmental noise and random noise of the next moment into the generation network.
[0044] Specifically, the method for adjusting the next generated PWM encoding parameters based on signal quality assessment and confidence level can be as follows: if the signal-to-noise ratio of the echo signal is less than a first set value and the confidence level is less than a second set value, then at least one of the following adjustment strategies can be executed: if the type of ambient noise is low-frequency noise, then increase the frequency; or, if the amplitude of the ultrasonic signal is less than a third set value, then increase the duty cycle; or, if the number of times the ultrasonic signal is intercepted exceeds a set threshold, then randomize the modulation sequence.
[0045] In this embodiment, the anti-interference capability of ultrasonic signals can be increased by raising the frequency, increasing the duty cycle, or randomizing the modulation sequence.
[0046] In this embodiment, if the confidence level output by the recognition network is less than the fourth set value (the fourth set value is less than the second set value), then the generation network and the recognition network need to be retrained.
[0047] The technical solution of this embodiment inputs environmental noise and random noise into a generation network to generate pulse width modulation (PWM) coding parameters. The PWM coding parameters include at least one of the following: frequency, duty cycle, and modulation sequence. An ultrasonic signal is generated based on the PWM coding parameters and then emitted. Echo signals are acquired, and the echo signals and ultrasonic signals are input into an identification network to output a first identification result. The first identification result includes whether the echo signal corresponds to the ultrasonic signal and its confidence level. If the identification result indicates that the echo signal corresponds to the ultrasonic signal, the target distance is determined based on the reception time of the echo signal and the emission time of the ultrasonic signal. The ultrasonic signal processing method provided in this embodiment overcomes the dependence on high-performance modulation hardware, automatically generating highly unique and strongly anti-interference PWM-coded ultrasonic signals, and achieving high-precision detection and matching of echo signals. This significantly improves the detection accuracy, robustness, and real-time processing capability of the ultrasonic radar system in complex dynamic environments.
[0048] Example 2 Figure 2 This is a schematic diagram of the structure of an ultrasonic signal processing device provided in Embodiment 2 of the present invention, as shown below. Figure 2 As shown, the device includes: The PWM encoding parameter generation module 210 is used to input environmental noise and random noise into the generation network to generate pulse width modulation (PWM) encoding parameters; wherein, the PWM encoding parameters include at least one of the following: frequency, duty cycle, and modulation sequence; The ultrasonic signal generation module 220 is used to generate ultrasonic signals based on PWM encoding parameters and to transmit ultrasonic signals. The first identification result determination module 230 is used to acquire echo signals, input the echo signals and ultrasonic signals into the identification network, and output the first identification result; wherein, the first identification result includes whether the echo signal is the echo signal corresponding to the ultrasonic signal and the confidence level; The target distance determination module 240 is used to determine the target distance based on the reception time of the echo signal and the transmission time of the ultrasonic signal if the identification result is that the echo signal is the echo signal corresponding to the ultrasonic signal.
[0049] Optionally, the first recognition result determination module 230 is also used for: Perform a Fourier transform on the echo signal to obtain the echo frequency domain signal; The echo signal is filtered to obtain the filtered echo time-domain signal; The echo frequency domain signal, echo time domain signal, and ultrasonic signal are input into the recognition network, and the first recognition result is output.
[0050] Optionally, the identification network includes a time-domain processing subnetwork, a frequency-domain processing subnetwork, a signal comparison subnetwork, and a fusion discrimination subnetwork; the first identification result determination module 230 is further used for: Echo time-domain features are obtained by extracting features from the echo time-domain signal based on the time-domain processing subnetwork. Feature extraction of echo frequency domain signals is performed based on a frequency domain processing subnetwork to obtain echo frequency domain features; The echo time-domain signal and ultrasonic signal are processed based on the signal comparison sub-network to obtain comparison features; The first identification result is obtained by fusing and discriminating the echo time-domain features, echo frequency-domain features, and comparison features based on the fusion discriminating subnetwork.
[0051] Optionally, the recognition network includes an input layer, a hidden layer, and an output layer; the first recognition result determination module 230 is further used for: The input layer performs combined processing on the echo signal and the ultrasonic signal to obtain a combined signal; the combined processing can be either splicing or differential processing. Feature extraction of combined signals is performed based on hidden layers to obtain time-frequency features; The first recognition result is obtained by processing the time-frequency features based on the input layer.
[0052] Optionally, it also includes: a PWM encoding parameter adjustment module, used for: Obtain signal quality assessment indicators; wherein the signal quality assessment indicators include at least one of the following: type of environmental noise, amplitude of ultrasonic signal, number of times ultrasonic signal is intercepted, and signal-to-noise ratio of echo signal; The parameters for the next PWM encoding are adjusted based on the signal quality assessment and confidence level.
[0053] Optionally, the PWM encoding parameter adjustment module is also used for: If the signal-to-noise ratio of the echo signal is less than a first set value and the confidence level is less than a second set value, then at least one of the following adjustment strategies will be executed: If the ambient noise is low-frequency, then increase the frequency; or, If the amplitude of the ultrasonic signal is less than the third preset value, then increase the duty cycle; or, If the number of times the ultrasonic signal is intercepted exceeds a set threshold, the modulation sequence is randomized.
[0054] Optionally, it also includes: training modules for the generator network and the recognition network, used for: Obtain a noise sample set; Input the noise sample set into the generator network, and output the PWM encoding parameter sample set; An ultrasonic sample set is generated based on the PWM encoding parameter sample set, and the echo sample set corresponding to the ultrasonic sample set is simulated. The ultrasound sample and the echo sample are paired to obtain sample pairs, and the sample pairs are labeled; the sample pairs include positive sample pairs and negative sample pairs. The sample pairs are input into the recognition network, which outputs a second recognition result; the second recognition result includes whether the echo sample is the echo sample corresponding to the ultrasonic sample and the confidence level. The generator network and the recognition network are trained collaboratively based on the second recognition result, the label, and the confidence level.
[0055] The above-described apparatus can execute the methods provided in all the foregoing embodiments of the present invention, and has the corresponding functional modules and beneficial effects for executing the above methods. Technical details not described in detail in this embodiment can be found in the methods provided in all the foregoing embodiments of the present invention.
[0056] Example 3 Figure 3 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components, connections and relationships between components, and their functions shown herein are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0057] like Figure 3 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0058] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0059] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as methods for processing ultrasonic signals.
[0060] In some embodiments, the ultrasonic signal processing method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the ultrasonic signal processing method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the ultrasonic signal processing method by any other suitable means (e.g., by means of firmware).
[0061] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0062] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0063] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0064] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0065] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0066] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0067] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the ultrasonic signal processing method provided in any embodiment of this application.
[0068] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0069] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0070] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A method for processing ultrasonic signals, characterized in that, include: Environmental noise and random noise are input into the generation network to generate pulse width modulation (PWM) coding parameters; wherein, the PWM coding parameters include at least one of the following: frequency, duty cycle, and modulation sequence; An ultrasonic signal is generated based on the PWM encoding parameters, and the ultrasonic signal is emitted. The system acquires echo signals and inputs the echo signals and the ultrasonic signals into an identification network, outputting a first identification result; wherein, the first identification result includes whether the echo signal is the echo signal corresponding to the ultrasonic signal and the confidence level; If the identification result indicates that the echo signal is the echo signal corresponding to the ultrasonic signal, then the target distance is determined based on the reception time of the echo signal and the transmission time of the ultrasonic signal.
2. The method according to claim 1, characterized in that, The echo signal and the ultrasonic signal are input into the recognition network, and a first recognition result is output, including: Perform a Fourier transform on the echo signal to obtain the echo frequency domain signal; The echo signal is filtered to obtain the filtered echo time-domain signal; The echo frequency domain signal, the echo time domain signal, and the ultrasonic signal are input into the recognition network, and the first recognition result is output.
3. The method according to claim 2, characterized in that, The identification network includes a time-domain processing subnetwork, a frequency-domain processing subnetwork, a signal comparison subnetwork, and a fusion discrimination subnetwork; the echo frequency-domain signal, the echo time-domain signal, and the ultrasonic signal are input into the identification network, and a first identification result is output, including: Based on the time-domain processing sub-network, feature extraction is performed on the echo time-domain signal to obtain echo time-domain features; Based on the frequency domain processing sub-network, feature extraction is performed on the echo frequency domain signal to obtain echo frequency domain features; The echo time-domain signal and the ultrasonic signal are processed based on the signal comparison sub-network to obtain comparison features; The first identification result is obtained by fusing and discriminating the echo time-domain features, the echo frequency-domain features, and the comparison features based on the fusion discriminating subnetwork.
4. The method according to claim 1, characterized in that, The recognition network includes an input layer, a hidden layer, and an output layer; the echo signal and the ultrasonic signal are input into the recognition network, and a first recognition result is output, including: The echo signal and the ultrasonic signal are combined and processed based on the input layer to obtain a combined signal; wherein, the combined processing is splicing processing or differential processing. Based on the hidden layer, feature extraction is performed on the combined signal to obtain time-frequency features; The time-frequency features are processed based on the input layer to obtain a first recognition result.
5. The method according to claim 1, characterized in that, After determining the target distance based on the reception time of the echo signal and the transmission time of the ultrasonic signal, the method further includes: Obtain signal quality assessment indicators; wherein the signal quality assessment indicators include at least one of the following: the type of environmental noise, the amplitude of the ultrasonic signal, the number of times the ultrasonic signal is intercepted, and the signal-to-noise ratio of the echo signal; The signal quality assessment and the confidence level are used to adjust the parameters of the next generated PWM encoding.
6. The method according to claim 5, characterized in that, Based on the signal quality assessment and the confidence level, the parameters for the next generated PWM encoding are adjusted, including: If the signal-to-noise ratio of the echo signal is less than a first set value and the confidence level is less than a second set value, then at least one of the following adjustment strategies will be executed: If the type of ambient noise is low-frequency noise, then increase the frequency; or, If the amplitude of the ultrasonic signal is less than the third preset value, then the duty cycle is increased; or, If the number of times the ultrasonic signal is intercepted exceeds a set threshold, the modulation sequence is randomized.
7. The method according to claim 1, characterized in that, The training methods for the generator network and the recognition network are as follows: Obtain a noise sample set; The noise sample set is input into the generation network, and the PWM encoding parameter sample set is output. An ultrasonic sample set is generated based on the PWM encoding parameter sample set, and the echo sample set corresponding to the ultrasonic sample set is simulated. The ultrasonic sample and the echo sample are combined in pairs to obtain sample pairs, and the sample pairs are labeled; wherein, the sample pairs include positive sample pairs and negative sample pairs; The sample pair is input into the recognition network, and a second recognition result is output; wherein, the second recognition result includes whether the echo sample is the echo sample corresponding to the ultrasonic sample and the confidence level; The generator network and the recognition network are trained collaboratively based on the second recognition result, the label, and the confidence level.
8. An ultrasonic signal processing device, characterized in that, include: A PWM encoding parameter generation module is used to input environmental noise and random noise into a generation network to generate pulse width modulation (PWM) encoding parameters; wherein, the PWM encoding parameters include at least one of the following: frequency, duty cycle, and modulation sequence; An ultrasonic signal generation module is used to generate an ultrasonic signal based on the PWM encoding parameters and to transmit the ultrasonic signal. The first identification result determination module is used to acquire echo signals, input the echo signals and the ultrasonic signals into an identification network, and output a first identification result; wherein, the first identification result includes whether the echo signal is the echo signal corresponding to the ultrasonic signal and the confidence level; The target distance determination module is used to determine the target distance based on the reception time of the echo signal and the transmission time of the ultrasonic signal if the identification result indicates that the echo signal is the echo signal corresponding to the ultrasonic signal.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the ultrasonic signal processing method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the method for processing ultrasonic signals according to any one of claims 1-7.