CN116049614B - Ultrasonic signal processing method and electronic equipment - Google Patents

Ultrasonic signal processing method and electronic equipment Download PDF

Info

Publication number
CN116049614B
CN116049614B CN202210885662.6A CN202210885662A CN116049614B CN 116049614 B CN116049614 B CN 116049614B CN 202210885662 A CN202210885662 A CN 202210885662A CN 116049614 B CN116049614 B CN 116049614B
Authority
CN
China
Prior art keywords
ultrasonic signal
window
electronic device
envelope
amplitude envelope
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210885662.6A
Other languages
Chinese (zh)
Other versions
CN116049614A (en
Inventor
许海坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210885662.6A priority Critical patent/CN116049614B/en
Priority to PCT/CN2023/089772 priority patent/WO2024021700A1/en
Publication of CN116049614A publication Critical patent/CN116049614A/en
Application granted granted Critical
Publication of CN116049614B publication Critical patent/CN116049614B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S5/00Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations
    • G01S5/18Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations using ultrasonic, sonic, or infrasonic waves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/15Correlation function computation including computation of convolution operations
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computational Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Algebra (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Measurement Of Velocity Or Position Using Acoustic Or Ultrasonic Waves (AREA)
  • Transducers For Ultrasonic Waves (AREA)

Abstract

The application discloses an ultrasonic signal processing method and electronic equipment, and relates to the technical field of terminals. When an ultrasonic signal is sent in the scenes of ultrasonic direction finding, ultrasonic distance measuring and the like, the ultrasonic signal meets the following conditions: within a first duration after the starting time of ultrasonic signal transmission, the amplitude envelope of the ultrasonic signal rises from 0, and the rising rate of the amplitude envelope is smaller than a preset rising threshold value; and within a second time period before the end time of ultrasonic signal transmission, the amplitude envelope of the ultrasonic signal is reduced to 0, and the reduction rate of the amplitude envelope is smaller than a preset reduction threshold. In this way, the ultrasonic signal does not have abrupt change of signal amplitude envelope at the starting time and the ending time, and the influence of the generation of plosive on the user feeling can be avoided.

Description

Ultrasonic signal processing method and electronic equipment
Technical Field
The present application relates to the field of terminal technologies, and in particular, to an ultrasonic signal processing method and an electronic device.
Background
Along with the continuous development of terminal technology and continuous enrichment of terminal types, multiple devices are used cooperatively and widely. Terminals cooperate with each other and often need to acquire the position, distance, etc. of each other. One possible method is to measure the distance or direction between terminals by sending an ultrasonic signal. The frequency of the ultrasonic signal exceeds the human ear perception range, so that the ultrasonic signal can not be perceived by a user, and the use feeling of the user can not be influenced.
But at the beginning and end of the ultrasonic signaling there may be a POP sound (POP sound) that can be perceived by the user, affecting the user experience.
Disclosure of Invention
The embodiment of the application provides an ultrasonic signal processing method and electronic equipment, which can eliminate plosive when ultrasonic signals are sent and ended and improve the use experience of users.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical scheme:
in a first aspect, an ultrasonic signal processing method is provided and applied to a first electronic device, where the first electronic device includes a first ultrasonic signal transmitting device and a second ultrasonic signal transmitting device, and the first ultrasonic signal transmitting device is located at the left side of the second ultrasonic signal transmitting device, and the method includes: the first electronic equipment sends a first ultrasonic signal to the second electronic equipment through the ultrasonic signal first sending device at a first moment, so that the second electronic equipment receives the first ultrasonic signal at a second moment; the first electronic equipment sends a second ultrasonic signal to the second electronic equipment through the ultrasonic signal second sending device at the first moment, so that the second electronic equipment receives the second ultrasonic signal at the third moment; the first electronic device determines that if the second moment is earlier than the third moment, the second electronic device is positioned at the left side of the first electronic device; if the second moment is later than the third moment, the second electronic device is located on the right side of the first electronic device. Wherein, the time domain waveforms of the first ultrasonic signal and the second ultrasonic signal satisfy preset conditions, and the preset conditions include: within a first duration after the starting time of ultrasonic signal transmission, the amplitude envelope of the ultrasonic signal rises from 0, and the rising rate of the amplitude envelope is smaller than a preset rising threshold value; and within a second time period before the end time of ultrasonic signal transmission, the amplitude envelope of the ultrasonic signal is reduced to 0, and the reduction rate of the amplitude envelope is smaller than a preset reduction threshold.
That is, at the beginning of the transmission signal, the amplitude envelope of the ultrasonic signal slowly rises from 0; at the end of the transmitted signal, the amplitude envelope of the ultrasound signal slowly drops to 0. In this way, in the ultrasonic direction-finding scene, the transmitted ultrasonic signal does not have abrupt changes of signal amplitude envelopes at the starting time and the ending time, and the generation of plosive sounds can be prevented from being perceived by a user.
With reference to the first aspect, in one possible implementation manner, the first electronic device generates an original ultrasonic signal, where the original ultrasonic signal is a modulated signal, such as a chirp signal or a pseudo random signal, and so on; the first electronic device carries out envelope remodeling on the original ultrasonic signal by adopting a window function to obtain a first ultrasonic signal and a second ultrasonic signal; wherein the magnitude of the window function starts to rise from 0 and ends to fall to 0.
In this method, a modulated signal such as a chirp signal or a pseudo random signal is first generated, and then the amplitude envelope of the modulated signal is changed by a window function. Since the amplitude of the window function slowly rises from 0 and slowly falls to 0 at the end, the ultrasonic signal after envelope remodeling can meet the preset condition.
The window function may include: a Hanning window, tukey window, bartlett-Hanning window, blackman-Harris window, bohman window, chebyshev window, hann window, nuttall window or Parzen window. These window functions all meet that the amplitude starts from 0 and ends down to 0.
Wherein the rate of rise (slope of rising edge) and the rate of fall (slope of falling edge) of a class of window functions are not adjustable. Such as a Hanning window. The rising edge of the ultrasonic signal slowly rises and the falling edge slowly falls, so that the ultrasonic signal after envelope remodeling can meet the preset condition.
The rate of rise (slope of rising edge) and the rate of fall (slope of falling edge) of another class of window functions may be adjusted. Such as a Tukey window. The rising edge and the falling edge of the window function can be slowly increased by adjusting the rising rate and the falling rate of the window function, and the ultrasonic signal after envelope remodeling can meet the preset condition.
When the window function is a Tukey window, the window function is expressed as:
where n represents the nth sample point, r represents the duty cycle of the rising and falling edges throughout the Tukey window length, and r >0.2.
That is, when r >0.2, the rising edge of the tukey window slowly rises and the falling edge slowly falls, so that the envelope remodeled ultrasonic signal can meet the preset condition.
With reference to the first aspect, in one possible implementation manner, the preset rising threshold is an amplitude envelope rising rate of the envelope remodeled ultrasonic signal corresponding to r=0.2; the preset drop threshold is the amplitude envelope drop rate of the envelope remodeled ultrasonic signal corresponding to r=0.2.
With reference to the first aspect, in one possible implementation manner, performing envelope remodeling on the original ultrasound signal using a window function includes: the window function is used to multiply the original ultrasonic signal, changing the amplitude envelope of the original ultrasonic signal.
With reference to the first aspect, in one possible implementation manner, the amplitude envelope of the original ultrasonic signal is a constant envelope or a gaussian envelope or an envelope of white noise.
In a second aspect, there is provided an ultrasonic signal processing method applied to a first electronic device, the method including: the first electronic device sends a first ultrasonic signal to the second electronic device at a first moment; the second electronic equipment receives the first ultrasonic signal at the second moment and sends the second ultrasonic signal to the first electronic equipment at the third moment; the first electronic device receives a second ultrasonic signal at a fourth time; the first electronic device determines that the distance between the first electronic device and the second electronic device is: ((t 4-t 1) - (t 3-t 2)). C/2; wherein t1 is the value at the first moment, t2 is the value at the second moment, t3 is the value at the third moment, t4 is the value at the fourth moment, and C is the propagation speed of the ultrasonic signal in the air. Wherein, the time domain waveforms of the first ultrasonic signal and the second ultrasonic signal satisfy preset conditions, and the preset conditions include: within a first duration after the starting time of ultrasonic signal transmission, the amplitude envelope of the ultrasonic signal rises from 0, and the rising rate of the amplitude envelope is smaller than a preset rising threshold value; and within a second time period before the end time of ultrasonic signal transmission, the amplitude envelope of the ultrasonic signal is reduced to 0, and the reduction rate of the amplitude envelope is smaller than a preset reduction threshold.
That is, at the beginning of the transmission signal, the amplitude envelope of the ultrasonic signal slowly rises from 0; at the end of the transmitted signal, the amplitude envelope of the ultrasound signal slowly drops to 0. In this way, in the ultrasonic ranging scene, the transmitted ultrasonic signal does not have abrupt changes of signal amplitude envelopes at the starting time and the ending time, and the generation of plosive sounds can be prevented from being perceived by a user.
With reference to the second aspect, in a possible implementation manner, the method further includes: the first electronic device generates an original ultrasonic signal, wherein the original ultrasonic signal is a modulation signal, such as a linear frequency modulation signal or a pseudo random signal; the first electronic equipment carries out envelope remodeling on an original ultrasonic signal by adopting a window function to obtain the first ultrasonic signal; wherein the magnitude of the window function starts to rise from 0 and ends to fall to 0.
In this method, a modulated signal such as a chirp signal or a pseudo random signal is first generated, and then the amplitude envelope of the modulated signal is changed by a window function. Since the amplitude of the window function slowly rises from 0 and slowly falls to 0 at the end, the ultrasonic signal after envelope remodeling can meet the preset condition.
The window function includes: a Hanning window, tukey window, bartlett-Hanning window, blackman-Harris window, bohman window, chebyshev window, hann window, nuttall window or Parzen window. These window functions all meet that the amplitude starts from 0 and ends down to 0.
Wherein the rate of rise (slope of rising edge) and the rate of fall (slope of falling edge) of a class of window functions are not adjustable. Such as a Hanning window. The rising edge of the ultrasonic signal slowly rises and the falling edge slowly falls, so that the ultrasonic signal after envelope remodeling can meet the preset condition.
The rate of rise (slope of rising edge) and the rate of fall (slope of falling edge) of another class of window functions may be adjusted. Such as a Tukey window. The rising edge and the falling edge of the window function can be slowly increased by adjusting the rising rate and the falling rate of the window function, and the ultrasonic signal after envelope remodeling can meet the preset condition.
When the window function is a Tukey window, the window function is expressed as:
where n represents the nth sample point, r represents the duty cycle of the rising and falling edges throughout the Tukey window length, and r >0.2.
That is, when r >0.2, the rising edge of the tukey window slowly rises and the falling edge slowly falls, so that the envelope remodeled ultrasonic signal can meet the preset condition.
With reference to the second aspect, in one possible implementation manner, the preset rising threshold is an amplitude envelope rising rate of the envelope remodeled ultrasonic signal corresponding to r=0.2; the preset drop threshold is the amplitude envelope drop rate of the envelope remodeled ultrasonic signal corresponding to r=0.2.
With reference to the second aspect, in a possible implementation manner, performing envelope remodeling on the original ultrasonic signal by using a window function includes: the window function is used to multiply the original ultrasonic signal, changing the amplitude envelope of the original ultrasonic signal.
With reference to the second aspect, in one possible implementation, the amplitude envelope of the original ultrasound signal is a constant envelope or a gaussian envelope or an envelope of white noise.
In a third aspect, there is provided an ultrasonic signal processing method, including: generating an original ultrasonic signal; the original ultrasonic signal is a modulating signal such as a linear frequency modulation signal or a pseudo random signal; envelope remodeling is carried out on the original ultrasonic signal by adopting a window function, and an ultrasonic signal after envelope remodeling is obtained; wherein the amplitude of the window function starts to rise from 0 and drops to 0 after the end; the time domain waveform of the ultrasonic signal after enveloping the remodelling meets the preset condition; the preset conditions comprise: within a first duration after the starting time of ultrasonic signal transmission, the amplitude envelope of the ultrasonic signal rises from 0, and the rising rate of the amplitude envelope is smaller than a preset rising threshold value; and within a second time period before the end time of ultrasonic signal transmission, the amplitude envelope of the ultrasonic signal is reduced to 0, and the reduction rate of the amplitude envelope is smaller than a preset reduction threshold.
In the method, the amplitude envelope of the ultrasonic signal slowly rises from 0 at the beginning of the signal transmission; at the end of the transmitted signal, the amplitude envelope of the ultrasound signal slowly drops to 0. In this way, the ultrasonic signal does not have abrupt changes of the signal amplitude envelope at the starting time and the ending time, and the generation of plosive sounds can be prevented from being perceived by a user.
With reference to the third aspect, in one possible implementation manner, the window function includes: a Hanning window, tukey window, bartlett-Hanning window, blackman-Harris window, bohman window, chebyshev window, hann window, nuttall window or Parzen window. These window functions all meet that the amplitude starts from 0 and ends down to 0.
Wherein the rate of rise (slope of rising edge) and the rate of fall (slope of falling edge) of a class of window functions are not adjustable. Such as a Hanning window. The rising edge of the ultrasonic signal slowly rises and the falling edge slowly falls, so that the ultrasonic signal after envelope remodeling can meet the preset condition.
The rate of rise (slope of rising edge) and the rate of fall (slope of falling edge) of another class of window functions may be adjusted. Such as a Tukey window. The rising edge and the falling edge of the window function can be slowly increased by adjusting the rising rate and the falling rate of the window function, and the ultrasonic signal after envelope remodeling can meet the preset condition.
When the window function is a Tukey window, the window function is expressed as:
where n represents the nth sample point, r represents the duty cycle of the rising and falling edges throughout the Tukey window length, and r >0.2.
That is, when r >0.2, the rising edge of the tukey window slowly rises and the falling edge slowly falls, so that the envelope remodeled ultrasonic signal can meet the preset condition.
With reference to the third aspect, in one possible implementation manner, the preset rising threshold is an amplitude envelope rising rate of the envelope remodeled ultrasonic signal corresponding to r=0.2; the preset drop threshold is the amplitude envelope drop rate of the envelope remodeled ultrasonic signal corresponding to r=0.2.
With reference to the third aspect, in one possible implementation manner, performing envelope remodeling on the original ultrasound signal using a window function includes: the window function is used to multiply the original ultrasonic signal, changing the amplitude envelope of the original ultrasonic signal.
With reference to the third aspect, in one possible implementation manner, the amplitude envelope of the original ultrasound signal is a constant envelope or a gaussian envelope or an envelope of white noise.
In a fourth aspect, an electronic device is provided, which has the functionality to implement the method described in the first, second or third aspect. The functions can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above.
In a fifth aspect, there is provided an electronic device comprising: a processor and a memory; the memory is for storing computer-executable instructions which, when executed by the electronic device, cause the electronic device to perform the method of any of the first, second or third aspects described above.
In a sixth aspect, there is provided an electronic device comprising: a processor; the processor is configured to, after being coupled to the memory and reading the instructions in the memory, perform the method according to any of the first, second or third aspects described above in accordance with the instructions.
In a seventh aspect, there is provided a computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the method of any of the first, second or third aspects above.
In an eighth aspect, there is provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of any of the first, second or third aspects above.
In a ninth aspect, there is provided an apparatus (e.g. the apparatus may be a system-on-a-chip) comprising a processor for supporting an electronic device to implement the functions as referred to in the first, second or third aspects above. In one possible design, the apparatus further includes a memory for storing program instructions and data necessary for the electronic device. When the device is a chip system, the device can be formed by a chip, and can also comprise the chip and other discrete devices.
The technical effects caused by any one of the design manners of the fourth aspect to the ninth aspect may be referred to as technical effects caused by different design manners of the first aspect, the second aspect or the third aspect, and are not described herein.
Drawings
Fig. 1 is a schematic diagram of a scenario where an ultrasonic signal processing method provided by an embodiment of the present application is applicable;
fig. 2 is a schematic diagram of a scenario where the ultrasonic signal processing method provided by the embodiment of the present application is applicable;
fig. 3 is a schematic diagram of a scenario where the ultrasonic signal processing method provided by the embodiment of the present application is applicable;
fig. 4 is a waveform schematic of a constant-envelope chirp signal;
FIG. 5 is a schematic waveform diagram of a chirp signal with a Gaussian envelope;
Fig. 6 is a schematic hardware structure of an electronic device according to an embodiment of the present application;
fig. 7 is a schematic software architecture diagram of an electronic device according to an embodiment of the present application;
fig. 8A is a schematic diagram of a time domain waveform of an ultrasonic signal according to an embodiment of the present application;
fig. 8B is a schematic flow chart of an ultrasonic signal processing method according to an embodiment of the present application;
FIG. 9 is a schematic waveform diagram of a Hanning window;
FIG. 10 is a schematic waveform diagram of a graph base window;
fig. 11 is a schematic diagram of structural components of an electronic device according to an embodiment of the present application.
Detailed Description
In the description of embodiments of the present application, the terminology used in the embodiments below is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include, for example, "one or more" such forms of expression, unless the context clearly indicates to the contrary. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" means one or more than two (including two). The term "and/or" is used to describe an association relationship of associated objects, meaning that there may be three relationships; for example, a and/or B may represent: a alone, a and B together, and B alone, wherein A, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise. The term "coupled" includes both direct and indirect connections, unless stated otherwise. The terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
In embodiments of the application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g." in an embodiment should not be taken as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
The number of vibrations per second of sound is called the frequency of the sound, in hertz (Hz). The frequency of sound waves that can be heard by our human ears is typically 20Hz-20000Hz. Therefore, we call sound waves with frequencies above 20000Hz "ultrasound". The terminal may measure direction, distance, etc. using "ultrasound". The ultrasonic direction measurement is performed by using the ultrasonic wave, and the distance measurement is performed by using the ultrasonic wave.
As terminal technology advances, many terminals have the ability to transmit and receive ultrasonic signals (i.e., ultrasound). For example, the terminal may acquire the direction in which the other terminal is located by ultrasonic direction finding. For example, a terminal may acquire the distance of another terminal through ultrasonic ranging.
In some scenarios, a terminal needs to acquire the direction in which another terminal is located. Illustratively, as shown in fig. 1, a personal computer (personal computer, PC) 100 and a tablet computer 200 work cooperatively. A user may move a cursor on PC 100 via an input device such as a mouse, keyboard, etc. When the cursor moves to the edge of the PC 100 screen, the cursor shuttles to the tablet 200 screen. When the cursor passes out of the screen of the PC 100, if the tablet PC 200 is located on the right side of the PC 100, the cursor passes out of the right side of the screen of the PC 100; if tablet 200 is located on the left side of PC 100, the cursor passes out of the left side of the screen of PC 100. That is, the PC 100 needs to acquire the direction in which the tablet PC 200 is located.
In one implementation, as shown in FIG. 2, one speaker is provided on each of the left and right sides of the PC 100. The left and right speakers may transmit ultrasonic signals simultaneously. An audio receiving unit (such as a microphone) of the tablet PC 200 may receive ultrasonic signals emitted from left and right speakers on the PC 100. The distance between the left speaker and the audio receiving unit on the tablet pc 200 is S1, and the distance between the right speaker and the audio receiving unit on the tablet pc 200 is S2. Because the distances between the left and right speakers on the PC 100 and the audio receiving unit on the tablet PC 200 are different, the moments when the audio receiving unit on the tablet PC 200 receives the ultrasonic signals of the left and right speakers are also different. For example, the time when the audio receiving unit on the tablet pc 200 receives the ultrasonic signal of the left speaker is T1, and the time when the audio receiving unit receives the ultrasonic signal of the right speaker is T2. If T1 is later than T2, S1 is greater than S2, i.e., tablet 200 is on the right side of PC 100; if T1 is earlier than T2, it means that S1 is less than S2, i.e., tablet 200 is on the left side of PC 100.
In some scenarios, a terminal needs to acquire the distance of another terminal. In one implementation, as shown in fig. 3, the handsets 300 and 400 are each provided with a speaker that can be used to transmit ultrasonic signals. The cell phone 300 and the cell phone 400 are respectively provided with microphones, which can be used to receive ultrasonic signals. Illustratively, at time t1, the handset 300 emits a first ultrasonic signal through the speaker; at time t2, the handset 400 receives a first ultrasonic signal through the microphone. In response to receiving the first ultrasonic signal, handset 400 sends a second ultrasonic signal through the speaker at time t 3; at time t4, the handpiece 300 receives a second ultrasonic signal through the microphone. Thus, the handset 300 can calculate the distance S of the handset 400. Wherein s= ((t 4-t 1) - (t 3-t 2)) ×c/2; c is the propagation speed of the ultrasonic signal in the air; (t 3-t 2) is the processing time between the receipt of the first ultrasonic signal by the handpiece 400 and the emission of the second ultrasonic signal, and may be stored in advance on the handpiece 300.
Typically, the ultrasound signal transmitted by the terminal is a constant-envelope chirp signal (chirp signal) or a gaussian-envelope chirp signal. Illustratively, fig. 4 shows a constant-envelope chirp signal, in which the dashed line is the amplitude envelope of the chirp signal. It can be seen that the amplitude envelope of the signal suddenly changes to 1 at the signal transmission start time; at the end of signal transmission, the amplitude envelope of the signal abruptly changes from 1 to vanish. Fig. 5 shows a chirp signal of gaussian envelope, in which the dashed line is the amplitude envelope of the chirp signal. It can be seen that the amplitude envelope of the signal suddenly changes to a value close to 0.5 at the signal transmission start time; at the end of signal transmission, the amplitude envelope of the signal suddenly changes from a value close to 0.5 to vanish. As can be seen from fig. 4 and 5, there is an amplitude envelope mutation at both the signal transmission start time and the signal transmission end time, regardless of whether the chirp signal of the constant envelope or the chirp signal of the gaussian envelope; thus, the starting time and the ending time of the terminal transmitting the ultrasonic signal may emit plosive sounds. The plosive can be perceived by the user, affecting the user experience.
The embodiment of the application provides an ultrasonic signal processing method, wherein an ultrasonic signal sent by a terminal is that an amplitude envelope slowly rises from 0 at the beginning and slowly drops to 0 at the end, so that abrupt change of the amplitude envelope of the ultrasonic signal is eliminated, namely plosive is eliminated. When the terminal utilizes ultrasonic direction finding or ultrasonic distance finding, the sent ultrasonic signal is not perceived by a user.
The ultrasonic signal processing method provided by the embodiment of the application can be applied to the scene of ultrasonic direction finding or ultrasonic distance finding by the terminal. The terminal for transmitting the ultrasonic signal may be an electronic device including an ultrasonic signal transmitting device. For example, the ultrasonic signal transmitting means is a speaker. The terminal for receiving the ultrasonic signal may be an electronic device including an ultrasonic signal receiving device. For example, the ultrasonic signal receiving device is a microphone.
In an ultrasonic direction finding scene, a first electronic device (a terminal for sending ultrasonic signals) comprises an ultrasonic signal first sending device and an ultrasonic signal second sending device, wherein the ultrasonic signal first sending device is positioned at the left side of the ultrasonic signal second sending device; for example, the first ultrasonic signal transmitting device is a left speaker, and the second ultrasonic signal transmitting device is a right speaker. The second electronic device (terminal receiving the ultrasonic signal) comprises ultrasonic signal receiving means, such as a microphone. Illustratively, the first electronic device is the PC 100 shown in fig. 2, and the second electronic device is the tablet PC 200 shown in fig. 2.
The first electronic equipment transmits a first ultrasonic signal at a first moment through an ultrasonic signal first transmitting device and transmits a second ultrasonic signal through an ultrasonic signal second transmitting device. Wherein the first ultrasonic signal and the second ultrasonic signal are ultrasonic signals with abrupt changes in the amplitude envelope removed. The second electronic device receives the first ultrasonic signal at a second time and receives the second ultrasonic signal at a third time. The first electronic device or the second electronic device can judge according to the second moment and the third moment, and if the second moment is earlier than the third moment, the second electronic device is determined to be positioned at the left side of the first electronic device; and if the second moment is later than the third moment, determining that the second electronic device is positioned on the right side of the first electronic device.
Since the ultrasonic signal has no abrupt change of the signal amplitude envelope at the start time and the end time, no plosive sound is generated. In this ultrasound direction finding scenario, the user does not perceive that the electronic device is sending ultrasound signals.
In an ultrasonic ranging scenario, the first electronic device comprises an ultrasonic signal first transmitting means (such as a speaker) and an ultrasonic signal first receiving means (such as a microphone); the second electronic device comprises ultrasonic signal second transmitting means, such as a loudspeaker, and ultrasonic signal second receiving means, such as a microphone. Illustratively, the first electronic device is the handset 300 shown in fig. 3, and the second electronic device is the handset 400 shown in fig. 3.
At a first moment, the first electronic device transmits a first ultrasonic signal to the second electronic device through the ultrasonic signal first transmitting device. At a second moment, the second electronic device receives the first ultrasonic signal through the ultrasonic signal second receiving device. In response to receiving the first ultrasonic signal, at a third time, the second electronic device transmits a second ultrasonic signal to the first electronic device through the ultrasonic signal second transmitting means. At a fourth moment, the first electronic device receives the second ultrasonic signal through the ultrasonic signal first receiving device.
The second electronic device is fixed in duration from receiving one ultrasonic signal to emitting another ultrasonic signal in response to receiving the ultrasonic signal. The first electronic device may acquire in advance the duration of the second electronic device from the reception of the first ultrasonic signal to the emission of the second ultrasonic signal, i.e. acquire the value (third time-second time). The first electronic device may obtain a distance S between the first electronic device and the second electronic device according to the formula s= ((t 4-t 1) - (t 3-t 2)) ×c/2. Wherein t1 is the value at the first moment, t2 is the value at the second moment, t3 is the value at the third moment, t4 is the value at the fourth moment, and C is the propagation speed of the ultrasonic signal in the air.
Wherein the first ultrasonic signal and the second ultrasonic signal are ultrasonic signals with abrupt changes in the amplitude envelope removed. Because the ultrasonic signal does not have amplitude envelope mutation at the starting time and the ending time of transmission, plosive sound is not generated. In the ultrasonic ranging scenario, the user does not perceive ultrasonic signals transmitted by the first electronic device and the second electronic device.
The first electronic device and the second electronic device may be electronic devices including an ultrasonic signal transmitting means and an ultrasonic signal receiving means. The electronic device may include a mobile phone, a tablet computer, a notebook computer, a personal computer (personal computer, PC), an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a handheld computer, a netbook, an intelligent home device (e.g., an intelligent television, a smart screen, a large screen, an intelligent speaker, an intelligent air conditioner, etc.), a personal digital assistant (personal digital assistant, PDA), a wearable device (e.g., an intelligent watch, an intelligent bracelet, etc.), a vehicle-mounted device, a virtual reality device, etc., which the embodiments of the present application do not limit in any way.
By way of example, fig. 6 shows a schematic structural diagram of an electronic device 600. The electronic device 600 may be the first electronic device or the second electronic device. The electronic device 600 may include a processor 610, a memory 620, a universal serial bus (universal serial bus, USB) interface 630, a power module 640, a communication module 650, an audio module 660, a speaker 660A, a microphone 660B, a display 670, an input device 680, and the like.
It should be understood that the illustrated structure of the embodiment of the present application does not constitute a specific limitation on the electronic device 600. In other embodiments of the application, electronic device 600 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 610 may include one or more processing units, such as: the processor 610 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and a command center of the electronic device 600, among others. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 610 for storing instructions and data. In some embodiments, the memory in the processor 610 is a cache memory. The memory may hold instructions or data that the processor 610 has just used or recycled. If the processor 610 needs to reuse the instruction or data, it may be called directly from the memory. Repeated accesses are avoided, reducing the latency of the processor 610 and thus improving the efficiency of the system.
In some embodiments, the processor 610 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface 630, among others. In other embodiments of the present application, the electronic device 600 may also use different interfacing manners, or a combination of multiple interfacing manners, as in the above embodiments.
Memory 620 may be used to store computer executable program code that includes instructions. The processor 610 executes instructions stored in the memory 620 to thereby perform various functional applications and data processing of the electronic device 600. The memory 620 may include a stored program area and a stored data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 600 (e.g., audio data, phonebook, etc.), and so forth. In addition, the memory 620 may include high-speed random access memory, and may also include nonvolatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash memory (universal flash storage, UFS), and the like.
The power module 640 may be used to power various components contained in the electronic device 600. In some embodiments, the power module 640 may be a battery, such as a rechargeable battery.
The communication module 650 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied on the electronic device 600; alternatively, solutions are provided for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication (near field communication, NFC), infrared (IR), etc., for application on the electronic device 600. The communication module 650 may be one or more devices integrating at least one communication processing module. In some embodiments, at least some of the functional modules of the communication module 650 may be disposed in the processor 610. In some embodiments, at least some of the functional modules of the communication module 650 may be disposed in the same device as at least some of the modules of the processor 610.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device such as speaker 660A or displays images or video through display 670. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the communication module 650 or other functional modules, independent of the processor 610.
The electronic device 600 implements display functions through a GPU, a display 670, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 670 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 610 may include one or more GPUs that execute program instructions to generate or change display information.
The display 670 is used to display images, videos, and the like. The display 670 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED) or an active-matrix organic light-emitting diode (matrix organic light emitting diode), a flexible light-emitting diode (flex), a mini, a Micro led, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the electronic device 600 may include 1 or N displays 670, N being a positive integer greater than 1.
Input device 680 may include a keyboard, mouse, etc. The keyboard is used to input english alphabets, numerals, punctuation marks, etc. into the electronic device 600, thereby giving commands, inputting data, etc. to the electronic device 600. The mouse is a pointer for displaying the system aspect ratio positioning of the electronic device 600, and is used for inputting instructions and the like to the electronic device 600. The input device 680 may be connected to the electronic device 600 through a wired connection, for example, the input device 680 is connected to the electronic device 600 through a GPIO interface, a USB interface, or the like. The input device 680 may also be connected to the electronic apparatus 600 by wireless means, for example, the input device 680 is connected to the electronic apparatus 600 by bluetooth, infrared, etc.
The electronic device 600 may implement audio functions through an audio module 660, a speaker 660A, a microphone 660B, an application processor, and the like. Such as music playing, recording, transceiving ultrasonic signals, etc.
The audio module 660 is used to convert digital audio information to an analog audio signal output and also to convert an analog audio input to a digital audio signal. The audio module 660 may also be used to encode and decode audio signals. In some embodiments, the audio module 660 may be disposed in the processor 610, or some of the functional modules of the audio module 660 may be disposed in the processor 610.
The speaker 660A, also referred to as a "horn," is used to convert audio electrical signals into sound signals or ultrasound signals. The electronic device 600 may play music, send ultrasonic signals, etc. through the speaker 660A.
Microphone 660B, also referred to as a "microphone," is used to convert acoustic or ultrasonic signals into electrical signals. The electronic device 600 may be provided with at least one microphone 660B. When making a call or transmitting voice information, the user can sound near the microphone 660B through the mouth, inputting a sound signal to the microphone 660B. When ultrasonically facing or ultrasonically ranging, an ultrasonic signal may be received by microphone 660B.
In the embodiment of the application, the electronic device is an electronic device capable of running an operating system and installing an application program. Alternatively, the operating system on which the electronic device runs may beSystem (S)>System (S)>A system, etc.
In one example, referring to fig. 7, a software system of an electronic device 600 may employ a layered architecture that divides the software into several layers, each layer having a distinct role and division of labor. The layers communicate via interfaces. In some embodiments, the system may include an application layer, an application framework layer, a hardware abstraction layer (hardware abstraction layer, HAL), and a kernel layer.
The application layer may include a series of application packages, among other things.
As shown in fig. 7, an Application package (App) may include a music App, a video App, a device management App, and the like. The music App is used for playing audio; the video App is used for playing the video; the device management App is for managing the system of the electronic device 600, for example, the device management App is a PC manager.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions. For example, an activity manager, a window manager, a content provider, a view system, a resource manager, a notification manager, an audio framework, etc., to which embodiments of the application are not limited in any way. Among other things, the audio framework may include audio tracks (audio track), audio managers (audio manager), audio services (audio service), audio systems (audio system), audio synthesis (audio speaker) units, audio mixing (audio mixer) units, and the like.
HAL is encapsulation of Linux kernel driver, provides interfaces upwards, and shields implementation details of underlying hardware. The HAL may include Wi-Fi HAL, audio (audio) HAL, camera HAL (Camera HAL), and the like.
The kernel layer is a layer between hardware and software, and provides a bottom layer of drive for various hardware. For example, the kernel layer may contain display drivers, camera drivers, audio drivers, and the like.
In the embodiment of the application, the audio App or the video App can be used for generating an audio signal, and the equipment management App can be used for generating an ultrasonic signal, wherein the ultrasonic signal is an ultrasonic signal without amplitude envelope mutation.
The ultrasonic signals generated by the device management App are transmitted to the audio framework. The audio signals generated by the audio App or video App are also transmitted to the audio framework. The audio frame may mix the ultrasonic signal with the audio signal. Further, the mixed signal is transmitted to a loudspeaker for playing through an audio HAL and an audio driver. This may enable the electronic device 600 to transmit ultrasound signals.
In some embodiments, the electronic device 600 may receive ultrasonic signals through a microphone, the ultrasonic signals being transmitted to the audio frame through an audio drive and an audio HAL. The audio framework distributes the ultrasound signals to the device management App. Further, the device management App may calculate the distance or direction of another device from the time of transmitting the ultrasonic signal and the time of receiving the ultrasonic signal.
It should be noted that, the embodiment of the present application is described by taking an example that the device management App is located in the application layer. In other embodiments, some of the functions of the device management App (such as generating ultrasound signals) may be implemented by other modules or units (such as an audio framework of an application framework layer). The embodiment of the present application is not limited thereto.
Taking an equipment management App as an example, the ultrasonic signal processing method provided by the application is realized. The device management App generates an ultrasonic signal, and a time domain waveform of the ultrasonic signal meets a preset condition. The preset conditions include: within a first duration after the starting time of ultrasonic signal transmission, the amplitude envelope of the ultrasonic signal rises from 0, and the rising rate of the amplitude envelope is smaller than a preset rising threshold value; and within a second time period before the end time of ultrasonic signal transmission, the amplitude envelope of the ultrasonic signal is reduced to 0, and the reduction rate of the amplitude envelope is smaller than a preset reduction threshold. The first duration and the second duration may be equal or unequal.
Fig. 8A illustrates a time domain waveform of an ultrasonic signal according to an embodiment of the present application. As shown in fig. 8A, the horizontal axis represents time in milliseconds (ms); the vertical axis represents amplitude. The envelope of the amplitude of the ultrasonic signal shown in fig. 8A rises slowly from 0, rises to a maximum value at 1ms, and then falls slowly to 0.
The ultrasonic signals generated by the equipment management App do not have abrupt changes of signal amplitude envelopes at the starting time and the ending time, and plosive sounds are not generated.
In one implementation, as shown in fig. 8B, the device management App generates the original ultrasonic signal, which is a modulated signal; for example, a chirp signal or a pseudo random signal; the amplitude envelope of the original ultrasonic signal is a constant envelope or a gaussian envelope or an envelope of white noise, etc. And then, carrying out envelope remodeling on the original ultrasonic signal by adopting a window function, so that the ultrasonic signal after envelope remodeling meets the preset condition.
Envelope remodeling is carried out on the original ultrasonic signal by adopting a window function, namely, the window function is multiplied with the original ultrasonic signal, so that the amplitude envelope of the original ultrasonic signal is changed. The magnitude of the window function starts from 0 to 0 and ends with slow magnitude rise and fall.
Wherein the window function may include: hanning windows, tukey windows, bartlett-Hanning windows, blackman-Harris windows, bohman windows, chebyshev windows, hann windows, nuttall windows or Parzen windows. The window functions have different rising and falling shapes, and the effect that the amplitude gradually rises from 0 and finally gradually falls to 0 can be realized.
In one example, the original ultrasound signal is a chirp signal of gaussian envelope and the window function is a Hanning window.
The original ultrasonic signal may be represented by equation 1 and the Hanning window may be represented by equation 2.
Wherein f s For the sampling frequency of the original ultrasonic signal, f 0 For the initial frequency f 1 For the cut-off frequency, N is the sampling sequence length, N represents the nth sampling point, 0<=n<N。
Where N is the sampling sequence length, N represents the nth sampling point, 0< = N < N.
And carrying out envelope remodeling on the original ultrasonic signal by adopting the Hanning window to obtain an ultrasonic signal after envelope remodeling as shown in a formula 3.
By way of example, fig. 9 shows a waveform schematic of a Hanning window. It can be seen that the amplitude of the Hanning window slowly rises from 0 and finally slowly drops to 0. And carrying out envelope remodeling on the original ultrasonic signal by adopting a Hanning window to obtain a time domain waveform of the ultrasonic signal after envelope remodeling as shown in fig. 8A.
In another example, the original ultrasound signal is a chirp signal of gaussian envelope and the window function is a Tukey window. The Tukey window may be represented by equation 4.
Where n represents the nth sample point and r represents the duty cycle of the rising and falling edges throughout the Tukey window length, each of the rising and falling edges being r/2 of the length.
Illustratively, fig. 10 shows a waveform schematic of a Tukey window. It can be seen that the magnitude of the Tukey window rises from 0 and finally falls to 0. The rising and falling speeds of the Tukey window may be adjusted by adjusting the duty cycle of the rising and falling edges by adjusting the value of r. The larger the value of r, the slower the rising edge rises and the slower the falling edge falls.
And carrying out envelope remodeling on the original ultrasonic signal by adopting a Tukey window to obtain an ultrasonic signal after envelope remodeling. The larger the value of r in the Tukey window is, the slower the rising edge rises, and the smaller the amplitude envelope rising rate of the envelope remodeled ultrasonic signal is; correspondingly, the slower the Tukey window falling edge falls, the smaller the amplitude envelope falling rate of the envelope remodeled ultrasonic signal. The preset rising threshold is, for example, the corresponding rising rate of the amplitude envelope of the envelope remodeled ultrasonic signal when r=0.2; the preset drop threshold is the corresponding drop rate of the amplitude envelope of the envelope remodeled ultrasonic signal when r=0.2. That is, when r >0.2, the amplitude envelope rising rate of the envelope-remodeled ultrasonic signal is smaller than the preset rising threshold, the amplitude envelope falling rate of the envelope-remodeled ultrasonic signal is smaller than the preset falling threshold, and the envelope-remodeled ultrasonic signal has no abrupt change of the signal amplitude envelope at the starting time and the ending time.
According to the ultrasonic signal processing method provided by the embodiment of the application, the original ultrasonic signal is subjected to envelope remodeling by adopting the window function of which the amplitude is gradually increased from 0 and finally gradually decreased to 0, so that the time domain waveform of the ultrasonic signal subjected to envelope remodeling meets the preset condition. The amplitude envelope of the ultrasonic signal after envelope remodeling slowly rises from 0 and finally slowly falls to 0; the envelope remodeled ultrasonic signal has no abrupt change of the signal amplitude envelope at the starting time and the ending time. In the scenes of ultrasonic direction finding, ultrasonic distance finding and the like, the adoption of the envelope remodeled ultrasonic signal provided by the embodiment of the application can avoid the generation of plosive when the ultrasonic signal is sent.
It should be noted that, the embodiment of the present application is described by taking an example of transmitting an ultrasonic signal in a scenario where an electronic device uses ultrasonic direction finding or ultrasonic distance finding. It can be appreciated that the method for processing an ultrasonic signal provided by the embodiment of the application can also be used for eliminating plosive when sending an ultrasonic signal in other scenes (such as an ultrasonic proximity sensing scene). The embodiment of the application is not used for one-to-one example of the scene to which the ultrasonic signal processing method is applicable.
It may be understood that, in order to implement the above-mentioned functions, the electronic device provided in the embodiment of the present application includes corresponding hardware structures and/or software modules for executing each function. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the embodiments of the present application.
The embodiment of the application can divide the functional modules of the electronic device according to the method example, for example, each functional module can be divided corresponding to each function, or two or more functions can be integrated in one processing module. The integrated modules may be implemented in hardware or in software functional modules. It should be noted that, in the embodiment of the present application, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation.
In one example, please refer to fig. 11, which shows a possible structural schematic diagram of the electronic device involved in the above embodiment. The electronic device 800 includes: a processing unit 810, a storage unit 820, and an ultrasound unit 830.
The processing unit 810 is configured to control and manage an action of the electronic device 800. The storage unit 820 is used to store program codes and data of the electronic device 800, and the processing unit 810 calls the program codes stored in the storage unit 820 to perform the steps in the above method embodiments. The ultrasonic unit 830 is used for transmitting and receiving ultrasonic signals.
Of course, the unit modules in the electronic device 800 described above include, but are not limited to, the processing unit 810, the storage unit 820, and the ultrasound unit 830 described above. For example, a power supply unit, a display unit, and the like may also be included in the electronic device 800. The power supply unit is used to power the electronic device 800. The display unit is used to display a user interface of the electronic device 800.
The processing unit 810 may be a processor or controller, such as a central processing unit (central processing unit, CPU), a digital signal processor (digital signal processor, DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (field programmable gate array, FPGA) or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. The storage unit 820 may be a memory. The ultrasound unit 830 may be an audio transmitting and receiving device. The display unit may be a display screen or the like.
For example, processing unit 810 is a processor (e.g., processor 610 shown in fig. 6), storage unit 820 may be a memory (e.g., memory 620 shown in fig. 6), and ultrasound unit 830 may include a speaker (e.g., speaker 660A shown in fig. 6) and a microphone (e.g., microphone 660B shown in fig. 6). The display unit may be a display (such as display 670 shown in fig. 6). The electronic device 800 provided by the embodiment of the present application may be the electronic device 600 shown in fig. 6. Wherein the processor, memory, display, speaker, microphone, etc. may be coupled together, such as via a bus. The processor invokes the memory-stored program code to perform the steps in the method embodiments above.
The embodiment of the application also provides a chip system which comprises at least one processor and at least one interface circuit. The processors and interface circuits may be interconnected by wires. For example, the interface circuit may be used to receive signals from other devices (e.g., a memory of an electronic apparatus). For another example, the interface circuit may be used to send signals to other devices (e.g., processors). The interface circuit may, for example, read instructions stored in the memory and send the instructions to the processor. The instructions, when executed by a processor, may cause an electronic device to perform the various steps of the embodiments described above. Of course, the system-on-chip may also include other discrete devices, which are not particularly limited in accordance with embodiments of the present application.
The embodiment of the application also provides a computer readable storage medium, which comprises computer instructions, when the computer instructions run on the electronic device, the electronic device is caused to execute the functions or steps executed by the mobile phone in the embodiment of the method.
The embodiment of the application also provides a computer program product which, when run on a computer, causes the computer to execute the functions or steps executed by the mobile phone in the above method embodiment.
It will be apparent to those skilled in the art from this description that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present application should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (15)

1. The ultrasonic signal processing method is applied to first electronic equipment, the first electronic equipment comprises an ultrasonic signal first transmitting device and an ultrasonic signal second transmitting device, and the ultrasonic signal first transmitting device is positioned at the left side of the ultrasonic signal second transmitting device, and the method is characterized by comprising the following steps:
the first electronic equipment generates an original ultrasonic signal, wherein the original ultrasonic signal is a modulation signal;
the first electronic device multiplies the original ultrasonic signal by a window function, changes the amplitude envelope of the original ultrasonic signal, and acquires a first ultrasonic signal and a second ultrasonic signal; the amplitude of the window function starts to rise from 0 and descends to 0 after the window function ends;
the first electronic equipment sends the first ultrasonic signal to second electronic equipment through the ultrasonic signal first sending device at a first moment, so that the second electronic equipment receives the first ultrasonic signal at a second moment;
The first electronic device sends the second ultrasonic signal to the second electronic device through the ultrasonic signal second sending device at the first moment, so that the second electronic device receives the second ultrasonic signal at a third moment;
the time domain waveforms of the first ultrasonic signal and the second ultrasonic signal meet preset conditions, and the preset conditions comprise: within a first duration after the starting time of ultrasonic signal transmission, the amplitude envelope of the ultrasonic signal rises from 0, and the rising rate of the amplitude envelope is smaller than a preset rising threshold value; within a second time period before the end time of ultrasonic signal transmission, the amplitude envelope of the ultrasonic signal is reduced to 0, and the reduction rate of the amplitude envelope is smaller than a preset reduction threshold;
if the second moment is earlier than the third moment, the first electronic device determines that the second electronic device is positioned on the left side of the first electronic device; and if the second moment is later than the third moment, the first electronic device determines that the second electronic device is positioned on the right side of the first electronic device.
2. The method of claim 1, wherein the window function comprises:
a Hanning window, tukey window, bartlett-Hanning window, blackman-Harris window, bohman window, chebyshev window, hann window, nuttall window or Parzen window.
3. The method of claim 2, wherein when the window function is a Tukey window, the window function is expressed as:
where n represents the nth sampling point and r represents the duty cycle of the rising edge and the falling edge in the whole Tukey window length;
and when r >0.2, the time domain waveforms of the first ultrasonic signal and the second ultrasonic signal meet preset conditions.
4. The method of claim 3, wherein the step of,
the preset rising threshold value is the rising rate of the amplitude envelope of the envelope remodeled ultrasonic signal corresponding to r=0.2;
the preset drop threshold is the drop rate of the amplitude envelope of the envelope remodeled ultrasonic signal corresponding to r=0.2.
5. An ultrasonic signal processing method applied to a first electronic device, the method comprising:
the first electronic equipment generates an original ultrasonic signal, wherein the original ultrasonic signal is a modulation signal;
the first electronic device multiplies the original ultrasonic signal by a window function, changes the amplitude envelope of the original ultrasonic signal, and acquires a first ultrasonic signal; the amplitude of the window function starts to rise from 0 and descends to 0 after the window function ends;
the first electronic device sends the first ultrasonic signal to the second electronic device at a first moment; the second electronic equipment receives the first ultrasonic signal at a second moment and sends a second ultrasonic signal to the first electronic equipment at a third moment;
The first electronic device receives the second ultrasonic signal at a fourth time;
the time domain waveforms of the first ultrasonic signal and the second ultrasonic signal meet preset conditions, and the preset conditions comprise: within a first duration after the starting time of ultrasonic signal transmission, the amplitude envelope of the ultrasonic signal rises from 0, and the rising rate of the amplitude envelope is smaller than a preset rising threshold value; within a second time period before the end time of ultrasonic signal transmission, the amplitude envelope of the ultrasonic signal is reduced to 0, and the reduction rate of the amplitude envelope is smaller than a preset reduction threshold;
the first electronic device determines that the distance between the first electronic device and the second electronic device is: ((t 4-t 1) - (t 3-t 2)). C/2;
wherein t1 is the value at the first moment, t2 is the value at the second moment, t3 is the value at the third moment, t4 is the value at the fourth moment, and C is the propagation speed of the ultrasonic signal in the air.
6. The method of claim 5, wherein the window function comprises:
a Hanning window, tukey window, bartlett-Hanning window, blackman-Harris window, bohman window, chebyshev window, hann window, nuttall window or Parzen window.
7. The method of claim 6, wherein when the window function is a Tukey window, the window function is expressed as:
Where n represents the nth sampling point and r represents the duty cycle of the rising edge and the falling edge in the whole Tukey window length;
and when r >0.2, the time domain waveforms of the first ultrasonic signal and the second ultrasonic signal meet preset conditions.
8. The method of claim 7, wherein the step of determining the position of the probe is performed,
the preset rising threshold value is the rising rate of the amplitude envelope of the envelope remodeled ultrasonic signal corresponding to r=0.2;
the preset drop threshold is the drop rate of the amplitude envelope of the envelope remodeled ultrasonic signal corresponding to r=0.2.
9. An ultrasonic signal processing method, comprising:
generating an original ultrasonic signal; the original ultrasonic signal is a modulation signal;
multiplying the original ultrasonic signal by a window function, changing the amplitude envelope of the original ultrasonic signal, and obtaining an envelope remodeled ultrasonic signal; the amplitude of the window function starts to rise from 0 and descends to 0 after the window function ends; the time domain waveform of the ultrasonic signal after envelope remodeling meets a preset condition;
the preset conditions include:
within a first duration after the starting time of ultrasonic signal transmission, the amplitude envelope of the ultrasonic signal rises from 0, and the rising rate of the amplitude envelope is smaller than a preset rising threshold value; and within a second time period before the end time of ultrasonic signal transmission, the amplitude envelope of the ultrasonic signal is reduced to 0, and the reduction rate of the amplitude envelope is smaller than a preset reduction threshold.
10. The method of claim 9, wherein the window function comprises:
a Hanning window, tukey window, bartlett-Hanning window, blackman-Harris window, bohman window, chebyshev window, hann window, nuttall window or Parzen window.
11. The method of claim 10, wherein when the window function is a Tukey window, the window function is expressed as:
where n represents the nth sampling point and r represents the duty cycle of the rising edge and the falling edge in the whole Tukey window length;
and when r is more than 0.2, the time domain waveform of the ultrasonic signal after envelope remodeling meets the preset condition.
12. The method of claim 11, wherein the step of determining the position of the probe is performed,
the preset rising threshold value is the rising rate of the amplitude envelope of the envelope remodeled ultrasonic signal corresponding to r=0.2;
the preset drop threshold is the drop rate of the amplitude envelope of the envelope remodeled ultrasonic signal corresponding to r=0.2.
13. The method according to any one of claims 9-12, wherein,
the amplitude envelope of the original ultrasonic signal is a constant envelope or a gaussian envelope or an envelope of white noise.
14. An electronic device, comprising: a processor and a memory; the memory has stored therein one or more computer programs, the one or more computer programs comprising instructions, which when executed by the electronic device, cause the electronic device to perform the method of any of claims 1-13.
15. A computer-readable storage medium comprising computer instructions; the computer instructions, when run on an electronic device, cause the electronic device to perform the method of any one of claims 1-13.
CN202210885662.6A 2022-07-26 2022-07-26 Ultrasonic signal processing method and electronic equipment Active CN116049614B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210885662.6A CN116049614B (en) 2022-07-26 2022-07-26 Ultrasonic signal processing method and electronic equipment
PCT/CN2023/089772 WO2024021700A1 (en) 2022-07-26 2023-04-21 Ultrasonic signal processing method and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210885662.6A CN116049614B (en) 2022-07-26 2022-07-26 Ultrasonic signal processing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN116049614A CN116049614A (en) 2023-05-02
CN116049614B true CN116049614B (en) 2023-11-14

Family

ID=86112032

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210885662.6A Active CN116049614B (en) 2022-07-26 2022-07-26 Ultrasonic signal processing method and electronic equipment

Country Status (2)

Country Link
CN (1) CN116049614B (en)
WO (1) WO2024021700A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014175847A (en) * 2013-03-08 2014-09-22 Pioneer Electronic Corp Sound signal processing device, acoustic device, method for controlling sound signal processing device, and program
CN104367344A (en) * 2014-10-10 2015-02-25 广东工业大学 Method and device for detecting instant heart rate of fetus on basis of Shanon envelope
CN110519450A (en) * 2019-07-31 2019-11-29 Oppo广东移动通信有限公司 Ultrasonic processing method, device, electronic equipment and computer-readable medium
CN111343332A (en) * 2018-12-19 2020-06-26 恩智浦有限公司 Mobile device locator

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150144586A (en) * 2014-06-17 2015-12-28 엘지전자 주식회사 Mobile terminal and method for controlling the same
CN106911449A (en) * 2015-12-23 2017-06-30 深圳超级数据链技术有限公司 A kind of overlapped time division multiplexing modulator approach, apparatus and system
CN110045379B (en) * 2019-04-11 2023-03-31 花瓣云科技有限公司 Distance measuring method, related equipment and system
CN113873444B (en) * 2020-06-30 2023-03-10 华为技术有限公司 Positioning method and electronic equipment
CN114363457A (en) * 2020-09-30 2022-04-15 华为技术有限公司 Method, device and system for adjusting position information

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014175847A (en) * 2013-03-08 2014-09-22 Pioneer Electronic Corp Sound signal processing device, acoustic device, method for controlling sound signal processing device, and program
CN104367344A (en) * 2014-10-10 2015-02-25 广东工业大学 Method and device for detecting instant heart rate of fetus on basis of Shanon envelope
CN111343332A (en) * 2018-12-19 2020-06-26 恩智浦有限公司 Mobile device locator
CN110519450A (en) * 2019-07-31 2019-11-29 Oppo广东移动通信有限公司 Ultrasonic processing method, device, electronic equipment and computer-readable medium

Also Published As

Publication number Publication date
WO2024021700A1 (en) 2024-02-01
CN116049614A (en) 2023-05-02

Similar Documents

Publication Publication Date Title
CN109194796B (en) Screen sounding method and device, electronic device and storage medium
WO2020244622A1 (en) Notification prompt method, terminal and system
EP3910457A1 (en) Image rendering method and electronic device
CN111724775B (en) Voice interaction method and electronic equipment
CN106897715A (en) A kind of unlocked by fingerprint processing method and mobile terminal
EP3809671A1 (en) Message playing method and terminal
CN109089192B (en) Method for outputting voice and terminal equipment
CN109189362B (en) Sound production control method and device, electronic equipment and storage medium
WO2021017947A1 (en) Terminal control method and device, mobile terminal and storage medium
CN116052618B (en) Screen refresh rate switching method and electronic equipment
US20150332668A1 (en) Audio signal recognition method and electronic device supporting the same
CN111986454A (en) Wireless earphone searching method, device, storage medium and terminal
WO2023015961A1 (en) Playing interface display method and electronic device
CN116049614B (en) Ultrasonic signal processing method and electronic equipment
CN108900689B (en) Sound production control method and device, electronic equipment and storage medium
US20220311700A1 (en) Method for multiplexing http channels and terminal
WO2022127211A1 (en) Vibration method and apparatus, and electronic device and readable storage medium
CN116774203A (en) Method and device for sensing target
CN115531889A (en) Multi-application screen recording method and device
CN115086888A (en) Message notification method and device and electronic equipment
CN109189311B (en) Sounding control method and device, electronic equipment and storage medium
CN109155803A (en) audio data processing method, terminal device and storage medium
CN116347320B (en) Audio playing method and electronic equipment
CN116664375B (en) Image prediction method, device, equipment and storage medium
CN111770233B (en) Frequency compensation method and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant