CN113517935B - Ultrasonic calibration method and device, mobile terminal and storage medium - Google Patents

Ultrasonic calibration method and device, mobile terminal and storage medium Download PDF

Info

Publication number
CN113517935B
CN113517935B CN202110762251.3A CN202110762251A CN113517935B CN 113517935 B CN113517935 B CN 113517935B CN 202110762251 A CN202110762251 A CN 202110762251A CN 113517935 B CN113517935 B CN 113517935B
Authority
CN
China
Prior art keywords
ultrasonic
mobile terminal
characteristic value
moving state
module
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
CN202110762251.3A
Other languages
Chinese (zh)
Other versions
CN113517935A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202110762251.3A priority Critical patent/CN113517935B/en
Publication of CN113517935A publication Critical patent/CN113517935A/en
Application granted granted Critical
Publication of CN113517935B publication Critical patent/CN113517935B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B11/00Transmission systems employing sonic, ultrasonic or infrasonic waves
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/10Monitoring; Testing of transmitters
    • H04B17/11Monitoring; Testing of transmitters for calibration

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Measurement Of Velocity Or Position Using Acoustic Or Ultrasonic Waves (AREA)

Abstract

The application discloses an ultrasonic calibration method, an ultrasonic calibration device, a mobile terminal and a storage medium, wherein the ultrasonic calibration method is applied to the mobile terminal and comprises the following steps: in the moving state of relative movement between the mobile terminal and the object, sending an ultrasonic signal through an ultrasonic transmitting module, and receiving an ultrasonic signal returned by the ultrasonic signal after encountering the object through an ultrasonic receiving module; acquiring an ultrasonic characteristic value of an ultrasonic signal in a transmission process; acquiring a difference value between the ultrasonic characteristic value and a target characteristic value, wherein the target characteristic value is a characteristic value of an ultrasonic signal detected by a standard terminal in a moving state in a transmission process; and adjusting the emission intensity when the ultrasonic signal is sent every time and adjusting the ultrasonic characteristic value obtained every time according to the difference value. The method can calibrate the ultrasonic characteristic value so as to improve the accuracy of detecting the moving state of the relative object by the mobile terminal.

Description

Ultrasonic calibration method and device, mobile terminal and storage medium
Technical Field
The present application relates to the field of mobile terminal technologies, and in particular, to an ultrasonic calibration method and apparatus, a mobile terminal, and a storage medium.
Background
Mobile terminals, such as mobile phones, tablet computers, etc., have become one of the most common consumer electronic products in people's daily life. With the increasing development of mobile terminal technology, full-screen and curved-screen mobile phones have become mainstream products, and as the top space of the mobile terminal needs to be saved, many manufacturers adopt an ultrasonic proximity detection scheme to replace the traditional infrared proximity detection scheme on the mobile terminal. However, after the mobile terminal is used for a period of time, some devices or structures inside the mobile terminal may slightly change, and these changes may affect the frequency spectrum characteristics, and thus the accuracy of the ultrasonic proximity detection scheme.
Disclosure of Invention
In view of the above problems, the present application provides an ultrasonic calibration method, apparatus, mobile terminal and storage medium to improve the above problems.
In a first aspect, an embodiment of the present application provides an ultrasonic calibration method, which is applied to a mobile terminal, where the mobile terminal includes an ultrasonic transmitting module and an ultrasonic receiving module, and the method includes: in the moving state of relative movement between the mobile terminal and the object, sending an ultrasonic signal through the ultrasonic transmitting module, and receiving an ultrasonic signal returned by the ultrasonic signal after encountering the object through the ultrasonic receiving module; acquiring an ultrasonic characteristic value of an ultrasonic signal in a transmission process; acquiring a difference value between the ultrasonic characteristic value and a target characteristic value, wherein the target characteristic value is a characteristic value of an ultrasonic signal detected by a standard terminal in the moving state in a transmission process; and adjusting the emission intensity of the mobile terminal in the moving state when the ultrasonic emission module sends the ultrasonic signal each time and adjusting the ultrasonic characteristic value acquired by the mobile terminal in the moving state each time according to the difference value.
In a second aspect, an embodiment of the present application provides an ultrasonic calibration apparatus, which is applied to a mobile terminal, where the mobile terminal includes an ultrasonic transmitting module and an ultrasonic receiving module, the apparatus includes: the mobile terminal comprises a transceiving control module, a characteristic acquisition module, a difference acquisition module and an adjustment execution module, wherein the transceiving control module is used for sending an ultrasonic signal through the ultrasonic transmitting module in a moving state of relative movement between the mobile terminal and an object and receiving an ultrasonic signal returned by the ultrasonic signal after encountering the object through the ultrasonic receiving module; the characteristic acquisition module is used for acquiring ultrasonic characteristic values of ultrasonic signals in the transmission process; the difference acquisition module is used for acquiring a difference value between the ultrasonic characteristic value and a target characteristic value, wherein the target characteristic value is a characteristic value of an ultrasonic signal detected by the standard terminal in the moving state in a transmission process; the adjustment execution module is used for adjusting the emission intensity of the mobile terminal in the moving state when the ultrasonic emission module sends the ultrasonic signal each time according to the difference value, and adjusting the ultrasonic characteristic value obtained by the mobile terminal in the moving state each time.
In a third aspect, an embodiment of the present application provides a mobile terminal, including: one or more processors; a memory; one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the ultrasonic calibration method provided by the first aspect above.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where program codes are stored in the computer-readable storage medium, and the program codes can be called by a processor to execute the ultrasonic calibration method provided in the first aspect.
The scheme that this application provided, under the mobile state of relative movement between mobile terminal and object, send ultrasonic signal through ultrasonic emission module, and receive the ultrasonic signal that ultrasonic signal returned after meetting the object through ultrasonic receiving module, acquire the ultrasonic wave eigenvalue of ultrasonic signal in the transmission course, acquire the difference value between ultrasonic wave eigenvalue and the target eigenvalue, the ultrasonic signal eigenvalue that the target eigenvalue detected under the mobile state is the eigenvalue of standard terminal in the transmission course, according to the difference value, adjust the emission intensity when ultrasonic emission module sent ultrasonic signal at every turn under the mobile state. Therefore, the emission intensity of the ultrasonic signal sent by the mobile terminal in the moving state at each time is adjusted according to the difference value between the ultrasonic characteristic value acquired by the same moving state and the ultrasonic characteristic value acquired by the standard terminal, and the ultrasonic characteristic value acquired at each time for proximity detection is adjusted, so that the acquired ultrasonic characteristic value can be calibrated, and the moving state of the mobile terminal in detecting relative objects is more accurate.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 shows a schematic diagram of a propagation path of an ultrasonic wave provided by an embodiment of the present application.
FIG. 2 shows a flow chart of an ultrasonic calibration method according to an embodiment of the present application.
FIG. 3 shows a flow chart of an ultrasonic calibration method according to another embodiment of the present application.
Fig. 4 shows a frequency spectrum diagram of audio data provided by an embodiment of the present application.
FIG. 5 shows a flow chart of an ultrasonic calibration method according to yet another embodiment of the present application.
FIG. 6 shows a block diagram of an ultrasonic calibration device according to one embodiment of the present application.
Fig. 7 is a block diagram of a mobile terminal for executing an ultrasonic calibration method according to an embodiment of the present application.
Fig. 8 is a memory unit for storing or carrying program codes for implementing an ultrasonic calibration method according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
At present, with the increasing development of mobile terminal technology, more and more mobile terminals with curved screens and full screens are available, and in order to save the top space of the mobile terminals, a plurality of manufacturers adopt an ultrasonic proximity monitoring scheme to replace the traditional infrared proximity detection scheme on the mobile terminals. Currently, the ultrasonic proximity monitoring scheme is that a mobile terminal transmits ultrasonic waves through an ultrasonic transmitting device (such as an earpiece, a horn, a dedicated ultrasonic transmitter, and the like), a part of the ultrasonic waves directly reach an ultrasonic receiving module (a sound pickup) through air propagation (as shown in path 1 of fig. 1), and a part of the ultrasonic waves are reflected by a shielding object through air propagation and then reach the ultrasonic receiving module (as shown in path 2 of fig. 1). The ultrasonic receiving module picks up the superposed signal of the direct sound and the reflected sound, and the superposed signal is converted into an audio signal through an A/D converter. And processing the audio data through an algorithm to obtain the motion state of the shielding object relative to the mobile terminal, and further guiding the display screen of the mobile terminal to be in a bright screen state or a dark screen state.
The inventor finds that, after a certain period of time, devices or structures inside a mobile terminal change subtly after the mobile terminal is used for a certain period of time, for example, ultrasonic emitting modules such as a receiver and a loudspeaker of ultrasonic waves of the mobile terminal change, and the changes affect the frequency spectrum characteristics, thereby affecting the accuracy of an ultrasonic detection scheme.
In view of the above problems, the inventor proposes an ultrasonic calibration method, an ultrasonic calibration apparatus, a mobile terminal, and a storage medium provided in this embodiment of the present application, in which a difference between an ultrasonic characteristic value obtained in the same moving state and an ultrasonic characteristic value obtained by a standard terminal is obtained, the transmission intensity of an ultrasonic signal sent by the mobile terminal in the moving state at each time is adjusted according to the difference, and the ultrasonic characteristic value obtained at each time is adjusted, so that the obtained ultrasonic characteristic value can be calibrated, and thus the moving state of the mobile terminal between opposite objects can be detected more accurately. The specific ultrasonic calibration method is described in detail in the following examples.
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating an ultrasonic calibration method according to an embodiment of the present disclosure. The ultrasonic calibration method is used for adjusting the emission intensity of ultrasonic signals sent by the mobile terminal in the moving state each time and adjusting the ultrasonic characteristic value obtained each time according to the difference value between the ultrasonic characteristic value obtained in the same moving state and the ultrasonic characteristic value obtained by the standard terminal, so that the ultrasonic characteristic value obtained for proximity detection can be calibrated. In a specific embodiment, the ultrasonic calibration method is applied to the ultrasonic calibration apparatus 400 shown in fig. 6 and the mobile terminal 100 (fig. 7) equipped with the ultrasonic calibration apparatus 400. The following will describe a specific process of this embodiment by taking a mobile terminal as an example, and it is understood that the mobile terminal applied in this embodiment may be a smart phone, a tablet computer, a wearable electronic device, and the like, which is not limited herein. In this embodiment, the mobile terminal may include an ultrasonic wave transmitting module and an ultrasonic wave receiving module, and as will be described in detail with reference to the flow shown in fig. 2, the ultrasonic wave calibration method may specifically include the following steps:
step S110: and in the moving state of relative movement between the mobile terminal and the object, the ultrasonic wave transmitting module is used for transmitting an ultrasonic wave signal, and the ultrasonic wave receiving module is used for receiving the ultrasonic wave signal returned after the ultrasonic wave signal meets the object.
In the embodiment of the present application, the mobile terminal may include both the ultrasonic wave transmitting module and the ultrasonic wave receiving module. In the process of the movement of the ultrasonic wave transmitting module relative to the object, the essence is that the mobile terminal moves relative to the object, so that the ultrasonic wave receiving module also moves relative to the object. The wavelength of the object radiation varies due to the relative motion of the source (mobile terminal) and the observer (object) according to the doppler effect, which is formulated as follows:
Figure BDA0003150371380000041
where f' is the observed frequency, f is the original emission frequency of the emission originating in the medium, v is the propagation velocity of the wave in the medium, v 0 The moving speed of the observer is the forward operation sign is plus sign if the observer approaches the emission source, otherwise, the forward operation sign is minus sign; v. of s For the emitting source moving speed, the forward operation symbol is a minus sign if the object is close to the observer, and a plus sign if the object is not close to the observer. As can be seen from the doppler effect formula, when the emission source is relatively close to the observer, the frequency of the signal received by the observer will become higher; when the emission source is relatively far away from the observer, the frequency of the signal received by the observer becomes smaller; when the source and the observer are relatively stationary, the signal received by the observer is at a frequency that is consistent with the source.
In this embodiment, the mobile terminal may calibrate an ultrasonic detection function, where the ultrasonic detection function may be to determine a relative movement state between the mobile terminal and an object by using an ultrasonic characteristic value obtained by the mobile terminal.
In some embodiments, the mobile terminal may calibrate the ultrasonic testing function by aligning ultrasonic characteristic values required by the mobile terminal to perform the ultrasonic testing function, so that the ultrasonic characteristic values used for determining the relative movement state between the mobile terminal and the object are more accurate.
In some embodiments, the mobile terminal may send an ultrasonic signal with a fixed frequency through an ultrasonic sending module built in the mobile terminal in a moving state in which the mobile terminal and an object move relative to each other, it can be understood that a part of the ultrasonic signal sent by the ultrasonic sending module directly reaches the ultrasonic receiving module through air propagation, and another part of the ultrasonic signal reaches the ultrasonic receiving module after being reflected by a shielding object through air propagation, and the ultrasonic receiving module picks up a superimposed signal of the direct sound and the reflected sound and converts the superimposed signal into an audio signal through a/D, where the shielding object may include a human face, a human body, and the like. For example, an earphone, a speaker or a dedicated ultrasonic transmitter built in the mobile terminal may be used to transmit an ultrasonic signal with a fixed frequency, a part of the ultrasonic signal is directly transmitted to the sound pick-up through air propagation, and another part of the ultrasonic signal is reflected by the shielding object through air propagation and then reaches the sound pick-up, where the sound pick-up is a superposed signal of direct sound and reflected sound obtained by the sound pick-up and is converted into an audio signal through a/D.
In the embodiment of the present application, the moving state of the relative movement between the mobile terminal and the object may include a moving speed, a moving direction, and the like. The moving state may be an approaching movement between the mobile terminal and the object at a certain speed, or a moving away movement between the mobile terminal and the object at a moving speed, which is not limited herein.
In this embodiment, in a moving state of relative movement between the mobile terminal and the object, the mobile terminal may send an ultrasonic signal through the ultrasonic sending module, and receive an ultrasonic signal returned after the ultrasonic signal encounters the object through the ultrasonic receiving module, or extract an ultrasonic signal (reflected sound) returned after the ultrasonic signal encounters the object from the ultrasonic signal (direct sound and reflected sound) received by the ultrasonic receiving module, which is not limited herein.
Step S120: and acquiring an ultrasonic characteristic value of the ultrasonic signal in the transmission process.
In some embodiments, the mobile terminal may obtain an ultrasonic characteristic value of the ultrasonic signal transmitted by the ultrasonic transmission module during transmission. The ultrasonic characteristic value of the ultrasonic signal during transmission may include a doppler effect area difference, a doppler effect area sum, or an absolute value of an amplitude change rate of the ultrasonic wave, which is not limited herein.
Step S130: and acquiring a difference value between the ultrasonic characteristic value and a target characteristic value, wherein the target characteristic value is a characteristic value of an ultrasonic signal detected by the standard terminal in the moving state in a transmission process.
In this embodiment, after acquiring the ultrasonic characteristic values of the ultrasonic signals sent in the moving state in the transmission process, the mobile terminal may determine the characteristic values corresponding to the moving state of the mobile terminal from a plurality of characteristic values of the ultrasonic signals detected by the standard terminal in a plurality of different moving states in the transmission process, where the plurality of different moving states of the standard terminal correspond to the plurality of characteristic values one to one, that is, each different moving state corresponds to one characteristic value. The moving state of the mobile terminal is a moving state in which the mobile terminal and the object move relative to each other when the mobile terminal transmits and receives the ultrasonic signal in step S110. It can be understood from the doppler effect formula that the frequency of the received ultrasonic signal is related to the specific moving state (speed and moving direction) of the sound source relative to the object, so that the ultrasonic characteristic values obtained by the mobile terminal and the standard terminal are different in different moving states. The standard terminal can be a mobile terminal with optimal indexes and parameters, and the accuracy of the ultrasonic detection function is good, so that the standard terminal has reference significance.
In some embodiments, the mobile terminal may store a plurality of feature values of the ultrasonic signal detected by the standard terminal in a plurality of different moving states during transmission, so that the mobile terminal may determine the feature value corresponding to the moving state of the mobile terminal from the plurality of feature values corresponding to the plurality of moving states of the standard terminal, and use the determined feature value as the target feature value.
In some embodiments, the mobile terminal may also generate a request for obtaining the target feature value according to a moving state of the mobile terminal relative to the object, and send the request to the server, and the server may determine, according to the request, a feature value corresponding to the moving state of the relative object from a plurality of feature values corresponding to a plurality of moving states of the standard terminal, and send the determined feature value as the target feature value to the mobile terminal.
In this embodiment of the application, after the mobile terminal acquires the target characteristic value, a difference between the ultrasonic characteristic value and the target characteristic value may be calculated, and the calculated difference is used as a difference between the ultrasonic characteristic value and the target characteristic value, so that the mobile terminal calibrates the ultrasonic detection function according to the difference.
In addition, the first transmission parameter (for example, transmission intensity, transmission frequency, etc.) of the ultrasonic signal corresponding to the ultrasonic characteristic value is the same as the second transmission parameter of the ultrasonic signal corresponding to the target characteristic value, so that the target characteristic value has strong reference. The first transmission parameter is a transmission parameter for transmitting the ultrasonic signal when the mobile terminal acquires the ultrasonic characteristic value of the ultrasonic signal in the transmission process; the second transmitting parameter is the transmitting parameter for transmitting the ultrasonic signal when the target terminal acquires the target characteristic value of the ultrasonic signal in the transmission process.
Step S140: and adjusting the emission intensity of the mobile terminal in the moving state when the ultrasonic emission module sends the ultrasonic signal each time and adjusting the ultrasonic characteristic value acquired by the mobile terminal in the moving state each time according to the difference value.
In this embodiment of the application, the mobile terminal obtains the difference value, so that the difference between the ultrasonic characteristic value obtained in the moving state of the mobile terminal moving relative to the object and the target characteristic value obtained in the same moving state of the standard terminal can be obtained. The mobile terminal can calibrate the ultrasonic detection function according to the difference value, so that the accuracy of the ultrasonic characteristic value finally used by the mobile terminal for determining the moving state of the relative object is high.
In some embodiments, the mobile terminal may adjust the transmission intensity and the ultrasonic characteristic value obtained each time when the mobile terminal sends the ultrasonic signal in the moving state when the mobile terminal obtains the ultrasonic characteristic value according to the difference value, so as to compensate the difference value, thereby making the ultrasonic characteristic value finally used for determining the moving state of the relative object more accurate.
In some embodiments, the mobile terminal adjusts the transmission intensity of the mobile terminal in the moving state where the ultrasonic characteristic value is obtained each time when the ultrasonic signal is transmitted and the ultrasonic characteristic value obtained each time according to the difference value, the difference value may be split into two parts, one part of the difference value is compensated by adjusting the transmission intensity when the ultrasonic signal is transmitted, and the other part of the difference value is compensated by adjusting the obtained ultrasonic characteristic value, so that the ultrasonic characteristic value finally used for determining the moving state of the relative object is close to or the same as the target characteristic value obtained by the standard device, thereby improving the accuracy of the ultrasonic characteristic value finally used for determining the moving state of the relative object. The ultrasonic characteristic value which is obtained after calibration and used for determining the moving state of the relative object is high in accuracy, so that the determined moving state of the mobile terminal relative to the object is more accurate according to the ultrasonic characteristic value obtained after calibration, and the accuracy of controlling the screen-on and screen-off states of the display screen by the mobile terminal according to the moving state of the relative object is improved.
According to the ultrasonic calibration method provided by the embodiment of the application, the ultrasonic characteristic value obtained in the same moving state and the difference value of the ultrasonic characteristic value obtained by the standard terminal are obtained, the emission intensity of the ultrasonic signal sent by the mobile terminal in the moving state at each time is adjusted according to the difference value, the ultrasonic characteristic value obtained at each time is adjusted, the obtained ultrasonic characteristic value can be calibrated, and therefore the moving state of the mobile terminal detected relative objects is more accurate. In addition, the situation that the power consumption of the mobile terminal is increased due to the fact that part of the difference values are compensated by adjusting the emission intensity of the ultrasonic signals can be avoided, the situation that the obtained ultrasonic characteristic values are directly compensated through the difference values to influence the detection effect of an ultrasonic detection algorithm for detecting the moving state of the mobile terminal relative to the object is also avoided, and therefore calibration is more accurate.
Referring to fig. 3, fig. 3 is a schematic flow chart illustrating an ultrasonic calibration method according to another embodiment of the present application. The method is applied to the mobile terminal, which includes an ultrasonic wave transmitting module and an ultrasonic wave receiving module, and as will be described in detail with respect to the flow shown in fig. 3, the ultrasonic wave calibration method may specifically include the following steps:
step S210: and in the moving state of relative movement between the mobile terminal and the object, the ultrasonic wave transmitting module is used for transmitting an ultrasonic wave signal, and the ultrasonic wave receiving module is used for receiving the ultrasonic wave signal returned after the ultrasonic wave signal meets the object.
In the embodiment of the present application, step S210 may refer to the contents of the foregoing embodiments, which are not described herein again.
Step S220: and acquiring an ultrasonic characteristic value of the ultrasonic signal in the transmission process.
In this embodiment, the first characteristic value of the ultrasonic signal during transmission may include a doppler effect area difference, a doppler effect area sum, or an absolute value of an amplitude change rate of the ultrasonic wave, which is not limited herein.
Taking the doppler effect area difference as an example, the doppler effect area of the ultrasonic signal in the transmission process is described, and the process of acquiring the doppler effect area of the ultrasonic signal in the transmission process may include:
acquiring the sending frequency of the ultrasonic signal sent by the ultrasonic sending module and the frequency range of the ultrasonic signal received by the ultrasonic receiving module; determining a first frequency variation interval and a second frequency variation interval based on the transmission frequency and the frequency range; calculating to obtain a first area according to the first frequency change interval and a first intensity change curve corresponding to the first frequency change interval; calculating to obtain a second area according to the second frequency change interval and a second intensity change curve corresponding to the second frequency change interval; and calculating the difference between the first area and the second area to obtain the Doppler effect area difference of the ultrasonic signal in the transmission process.
When the mobile terminal is in a call state, the relative motion state of the mobile terminal relative to the object is substantially the process that the user takes the mobile terminal close to or away from the human body in the process that the user uses the mobile terminal, and the change of the speed of taking the mobile terminal by the user in a certain range is considered, so that the frequency change of the ultrasonic signal received by the ultrasonic receiving module is correspondingly in a certain range, namely the frequency range of the ultrasonic signal.
In some embodiments, the mobile terminal may acquire a transmission frequency of an ultrasonic signal transmitted by its built-in ultrasonic transmission module and acquire a frequency range of an ultrasonic signal received by its built-in ultrasonic reception module. The transmission frequency of the ultrasonic signal transmitted by the ultrasonic transmission module may be a fixed frequency, and therefore, the mobile terminal may acquire the transmission frequency based on the set transmission parameters of the ultrasonic signal of the ultrasonic transmission module. In addition, the frequency range of the ultrasonic signal received by the ultrasonic receiving module is related to the relative motion relationship between the mobile terminal and the object, so that the change range of the motion speed of most users in the process of using the mobile terminal can be obtained, and the frequency range of the ultrasonic signal received by the ultrasonic receiving module is determined according to the change range of the motion speed.
Specifically, based on the doppler effect formula, f' is the frequency of the ultrasonic signal reflected by the object received by the ultrasonic receiving module. f is the transmission frequency of the ultrasonic signal transmitted by the ultrasonic transmission module. v is the propagation speed of sound in air, and is taken as 340m/s. Suppose a mobile terminalEnd is stationary, then v s And =0. If the speed of movement of the object relative to the terminal is v 01 Then the moving speed of the object in the Doppler effect formula is v 0 =2v 01 . It is assumed that the transmission frequency of the ultrasonic signal transmitted by the ultrasonic transmission module is ultrasonic =22500Hz, and the frequency range of the ultrasonic signal received by the ultrasonic reception module is [22420hz,22580hz]Then, the maximum relative speed between the object and the mobile terminal, which can be identified according to the doppler effect, is:
Figure BDA0003150371380000081
if the data length of the Fourier Transform (DFT) Transform is fftlen =8192 and the audio data sampling rate is fs =48kHz, the frequency resolution of the DFT result is:
Figure BDA0003150371380000082
then is represented by
Figure BDA0003150371380000083
And formula
Figure BDA0003150371380000091
Then the minimum relative speed between the object and the mobile terminal that can be identified is:
Figure BDA0003150371380000092
therefore, in the present embodiment, the maximum relative velocity and the minimum relative velocity of the mobile terminal and the object may be obtained based on the history data and the like, and the frequency range of the ultrasonic signal received by the ultrasonic receiving module may be obtained by reversely deriving the maximum relative velocity, the minimum relative velocity and the above formula.
In some embodiments, after acquiring the transmission frequency of the ultrasonic signal transmitted by the ultrasonic transmission module and the frequency range of the ultrasonic signal received by the ultrasonic reception module, the frequency variation interval may be determined based on the transmission frequency and the frequency range. For example, as shown in fig. 4, fig. 4 shows a spectrogram of audio data provided in the embodiment of the present application, where a frequency spectrum is an abbreviation of a frequency spectrum, and is a distribution curve of frequencies, and for discrete audio data sampling points, the frequency spectrum can be obtained by discrete fourier transform, and in fig. 4, the spectrogram is obtained by discrete fourier transform of a segment of audio data, each point on an abscissa corresponds to a real frequency value, and an ordinate represents a signal intensity of the frequency.
In some embodiments, the feature extraction module performs DFT transform each time using a data module with length fftlen =8192 to obtain a corresponding magnitude-frequency vector X as shown in fig. 4,
actual frequency f n The relation with the nth data of the amplitude-frequency vector X is as follows:
Figure BDA0003150371380000093
wherein f is s For the sampling rate, fftlen is the data length. Then X [ n ]]Representing the actual frequency f n The strength of (2).
Assuming that the key frequencies considered in the algorithm are ultrasonic =22500Hz, f _ min _ low =22494Hz, f _ min _ up =22506Hz, f _ low =22420Hz, f _ up =22580Hz, the key frequencies considered are: n1, n2, n3, n4 and n5, n1 being point _ low, n2 being point _ mid _ low, n3 being point _ mid, n4 being point _ mid _ up, n5 being point _ up, wherein,
Figure BDA0003150371380000094
Figure BDA0003150371380000095
Figure BDA0003150371380000096
Figure BDA0003150371380000101
Figure BDA0003150371380000102
as shown in fig. 4, the sending frequency of the ultrasonic signal sent by the ultrasonic sending module is point _ mid, the signal strength corresponding to the sending frequency is ultrasonic _ amp, and the frequency range of the ultrasonic signal received by the ultrasonic receiving module is point _ low to point _ up, so that the frequency variation interval can be determined to be point _ low to point _ mid _ low and point _ min-up to point _ up.
In some embodiments, the first frequency variation interval and the second frequency variation interval may be determined based on the transmission frequency and the frequency range. For example, as shown in fig. 4, the first frequency variation interval is from point _ low to point _ mid _ low, and the second frequency variation interval is from point _ min-up to point _ up.
In some embodiments, after the frequency variation interval is acquired, an intensity variation curve corresponding to the frequency variation interval may be acquired based on the spectrogram, and the doppler effect area difference of the ultrasonic signal during transmission may be calculated based on the frequency variation interval and the intensity variation curve corresponding to the frequency variation interval.
Specifically, after the first frequency variation interval is acquired, a first intensity variation curve corresponding to the first frequency variation interval may be acquired based on a spectrogram, and a first area of the ultrasonic signal during transmission may be calculated based on the first intensity variation curve corresponding to the first frequency variation interval and the first frequency variation interval, and meanwhile, after the second frequency variation interval is acquired, a second intensity variation curve corresponding to the second frequency variation interval may be acquired based on the spectrogram, and a second area of the ultrasonic signal during transmission may be calculated based on the second frequency variation interval and a second intensity variation curve corresponding to the second frequency variation interval. Further, the difference between the first area and the second area is calculated, for example, by subtracting the second area from the first area or by subtracting the first area from the second area, the doppler effect area difference of the ultrasonic signal during transmission can be obtained.
Similarly, the sum of the first area and the second area is calculated to obtain the doppler effect area sum.
Taking the absolute value of the ultrasonic amplitude change rate as an example, the process of obtaining the absolute value of the ultrasonic amplitude change rate of the ultrasonic signal in the transmission process is described, and the process of obtaining the absolute value of the ultrasonic amplitude change rate of the ultrasonic signal in the transmission process may include:
acquiring a first ultrasonic amplitude corresponding to the ultrasonic signal received by the ultrasonic receiving module and a second ultrasonic amplitude corresponding to the ultrasonic signal received by the ultrasonic receiving module at the previous moment; and acquiring an absolute value of a difference value between the first ultrasonic amplitude and the second ultrasonic amplitude to obtain an absolute value of the ultrasonic amplitude change rate of the ultrasonic signal in the transmission process.
When the first characteristic value comprises an absolute value of ultrasonic amplitude change rate, the mobile terminal can acquire a first ultrasonic amplitude value corresponding to an ultrasonic signal received by the ultrasonic receiving module at the current moment and acquire a second ultrasonic amplitude value of the ultrasonic signal received by the ultrasonic receiving module at the previous moment. The specific interval between the current time and the previous time is not limited, and may be, for example, 0.5s,0.75s, or the like. In some embodiments, when the mobile terminal receives the ultrasonic signal through the ultrasonic receiving module, the amplitude of the ultrasonic signal received at each time may be recorded.
After the mobile terminal obtains the first ultrasonic amplitude and the second ultrasonic amplitude, a difference value between the first ultrasonic amplitude and the second ultrasonic amplitude can be calculated, and an absolute value of the difference value is taken, so that an ultrasonic amplitude change rate absolute value of the ultrasonic signal in the transmission process is obtained.
Of course, the specific manner of acquiring the ultrasonic characteristic value may not be limited in the embodiment of the present application.
Step S230: and acquiring a difference value between the ultrasonic characteristic value and a target characteristic value, wherein the target characteristic value is a characteristic value of an ultrasonic signal detected by the standard terminal in the moving state in a transmission process.
In the embodiment of the present application, step S230 may refer to the contents of the foregoing embodiments, and is not described herein again. The manner of acquiring the characteristic value by the target terminal may be the same as the manner of acquiring the ultrasonic characteristic value by the mobile terminal.
Step S240: and judging whether the absolute value of the difference value is larger than a preset threshold value.
In the embodiment of the application, the mobile terminal obtains the sum of the difference values between the ultrasonic characteristic value of the ultrasonic signal in the transmission process and the target characteristic value of the standard terminal, and judges whether the absolute value of the difference value is greater than a preset threshold value or not so as to determine whether calibration is needed or not. If the absolute value of the difference value is greater than the preset threshold value, it indicates that the current ultrasonic detection effect of the mobile terminal is not good, that is, the obtained ultrasonic characteristic value is inaccurate, which may affect the accuracy of judging the moving state of the mobile terminal relative to the object, so that subsequent calibration is required; if the absolute value of the difference value is less than or equal to the preset threshold, the difference between the currently acquired ultrasonic characteristic value and the target characteristic value is within the acceptable range, so that subsequent calibration is not performed, that is, the subsequent steps are not performed. The specific value of the preset threshold may not be limited, and the preset threshold is related to the specific type of the ultrasonic characteristic value, for example, the preset threshold corresponding to the doppler effect area difference is different from the preset threshold corresponding to the absolute value of the ultrasonic amplitude change rate. In addition, since the difference value may be positive, that is, the ultrasonic characteristic value is greater than the target characteristic value, and the difference value may also be negative, that is, the ultrasonic characteristic value is less than the target characteristic value, an absolute value of the difference value is compared with a preset threshold, which may reflect a difference between the ultrasonic characteristic value and the target characteristic value.
Step S250: if the difference value is larger than the preset threshold value, dividing the difference value into a first difference value and a second difference value, wherein the sum of the first difference value and the second difference value is the difference value.
In the embodiment of the present application, if the absolute value of the difference value is greater than the preset threshold in step S240, calibration is required. Therefore, the transmission intensity of each time of sending the ultrasonic wave signal and the ultrasonic wave characteristic value obtained each time can be adjusted according to the difference value in the moving state of the mobile terminal when obtaining the ultrasonic wave characteristic value.
In some embodiments, the mobile terminal may divide the difference value when adjusting the transmission intensity each time the ultrasonic signal is transmitted and the ultrasonic characteristic value each time the ultrasonic signal is acquired according to the difference value, where the difference value may be divided into a first difference value and a second difference value, and a sum of the first difference value and the second difference value is equal to the difference value. The mobile terminal can adjust the ultrasonic characteristic value acquired by the mobile terminal in the mobile state each time according to the first difference value, so that the first difference value is compensated; the mobile terminal can adjust the transmitting intensity of the ultrasonic signal transmitted by the mobile terminal in the moving state each time according to the second difference value, so that the second difference value is compensated.
In some embodiments, the partial difference value that needs to be compensated by adjusting the ultrasonic characteristic value obtained each time may be a preset proportion of the whole difference value. The mobile terminal can obtain a product of the difference value and a preset proportion, and the obtained product is used as a first difference value; and the other part of the difference values can be used as second difference values by calculating the difference value between the difference value and the first difference value. The specific value of the preset ratio may not be limited, for example, the preset ratio may be 40% to 50%, so that the difference value that needs to be compensated by adjusting the ultrasonic characteristic value directly will not be too large, and the effect of the ultrasonic detection algorithm is not affected; for example, the preset ratio may be 50% to 60%, so that the difference value that needs to be compensated by adjusting the emission intensity is not too large, and the situation of large power consumption of the mobile terminal is avoided.
Of course, it may also be that a part of the difference values that need to be compensated by adjusting the ultrasonic characteristic value obtained each time may occupy a first proportion of the entire difference value, another part of the difference values that need to be compensated by adjusting the transmission intensity of transmitting the ultrasonic signal each time may occupy a second proportion of the entire difference value, a sum of the first proportion and the second proportion is 1, the difference value is multiplied by the first proportion to obtain a first difference value, and the difference value is multiplied by the second proportion to obtain a second difference value.
Step S260: and adjusting the ultrasonic characteristic value acquired by the mobile terminal in the mobile state each time according to the first difference value.
In this embodiment of the application, the adjusting, by the mobile terminal, the ultrasonic characteristic value obtained by the mobile terminal in the moving state each time according to the first difference value may include:
and increasing or decreasing the ultrasonic characteristic value acquired by the mobile terminal each time in the moving state by the first difference value.
If the difference value between the ultrasonic characteristic value acquired by the mobile terminal and the target characteristic value is positive, the ultrasonic characteristic value acquired by the mobile terminal in the moving state is greater than the target characteristic value acquired by the standard terminal in the moving state, so that the ultrasonic characteristic acquired by the mobile terminal in the moving state each time can be reduced by the first difference value to compensate the first difference value; on the contrary, when the difference value is negative, the size of the first difference value can be increased by the ultrasonic features acquired by the mobile terminal in the moving state each time, so as to compensate the first difference value.
Step S270: and acquiring target adjustment intensity according to the second difference value, and adjusting the emission intensity of the mobile terminal in the moving state when the ultrasonic emission module sends the ultrasonic signal each time according to the target adjustment intensity.
In this application embodiment, the mobile terminal adjusts the emission intensity of the mobile terminal sending the ultrasonic signal at each time in the moving state according to the second difference value, and may acquire the target adjustment intensity according to the second difference value, where the target adjustment intensity may be the emission intensity that needs to be adjusted at each time, and the mobile terminal adjusts the target adjustment intensity through the emission intensity that needs to be sent at each time to the ultrasonic emission module in the moving state. The target adjustment strength is obtained by the mobile terminal according to the second difference value, and the second difference value can be compensated by the obtained ultrasonic characteristic value by adjusting the target adjustment strength of the emission strength.
In some embodiments, the mobile terminal may calculate, according to the correspondence between the transmission intensity and the transmission frequency of the ultrasonic signal, the doppler effect formula, and the second difference value, a target adjustment intensity corresponding to the second difference value, and then increase or decrease the transmission intensity of the mobile terminal in the moving state when the ultrasonic transmission module transmits the ultrasonic signal each time by the target adjustment intensity. It can be understood that, after the ultrasonic wave signal is transmitted by the ultrasonic wave transmitting module, the ultrasonic wave signal is received by the ultrasonic wave receiving module, and the ultrasonic wave characteristic value of the ultrasonic wave signal in the transmission process is affected by the transmitting intensity, so that the transmitting frequency corresponding to the second difference value can be calculated according to the second difference value and the doppler effect formula, and then the transmitting intensity corresponding to the transmitting frequency obtained by calculation is obtained through the corresponding relationship between the transmitting intensity of the ultrasonic wave signal and the transmitting frequency. The acquired emission intensity can be used as a target adjustment intensity, that is, the target adjustment intensity can generate an influence on the size of the second difference value on the ultrasonic characteristic value, so that the target adjustment intensity can be adjusted by adjusting the emission intensity of the ultrasonic signal emitted by the ultrasonic emission module every time, and the size of the second difference value can be compensated for the ultrasonic characteristic value. When the difference value is negative, the transmission intensity of the ultrasonic wave signal transmitted by the ultrasonic wave transmitting module at each time can be increased by the target adjustment intensity.
In the embodiment of the application, the mobile terminal can determine the moving state of the mobile terminal relative to the object by using an ultrasonic detection algorithm according to the ultrasonic characteristic value obtained each time after calibration, so that the display screen is controlled to be in the screen-off state or the screen-on state according to the moving state of the mobile terminal relative to the object. If the mobile terminal is in a close state relative to the moving state of the object, controlling the display screen to be in a screen-off state; if the mobile terminal is in a far state relative to the moving state of the object, controlling the display screen to be in a bright screen state; and if the mobile terminal is in a static state relative to the moving state of the object, controlling the display screen to keep the current display state.
The ultrasonic calibration method provided by the embodiment of the application divides the difference value into a first difference value and a second difference value by obtaining the difference value between the ultrasonic characteristic value obtained in the same moving state and the ultrasonic characteristic value obtained by the standard terminal, and realizes the compensation of the first difference value of the obtained ultrasonic characteristic value by directly increasing or decreasing the ultrasonic characteristic value obtained each time when the mobile terminal is in the moving state.
Referring to fig. 5, fig. 5 is a schematic flow chart illustrating an ultrasonic calibration method according to another embodiment of the present application. The method is applied to the mobile terminal, which includes an ultrasonic wave transmitting module and an ultrasonic wave receiving module, and as will be described in detail with reference to the flow shown in fig. 5, the method for calibrating an ultrasonic wave may specifically include the following steps:
step S310: and in the moving state of relative movement between the mobile terminal and the object, the ultrasonic wave transmitting module is used for transmitting an ultrasonic wave signal, and the ultrasonic wave receiving module is used for receiving the ultrasonic wave signal returned after the ultrasonic wave signal meets the object.
Step S320: and acquiring an ultrasonic characteristic value of the ultrasonic signal in the transmission process.
Step S330: and acquiring the relative movement speed between the mobile terminal and the object.
In the embodiment of the present application, as can be known from the doppler effect formula, the frequency of the received ultrasonic signal is related to the moving speed (speed and moving direction) of the sound source relative to the object, so that the obtained ultrasonic characteristic value is different between the mobile terminal and the standard terminal in the moving state with different moving speeds. Therefore, when the mobile terminal acquires the difference value between the ultrasonic characteristic value and the target characteristic value, the characteristic value detected by the standard terminal at the relative movement speed can be acquired through the relative movement speed between the mobile terminal and the object at the moment, so as to acquire the target characteristic value detected by the standard terminal at the same movement state as the mobile terminal.
In some embodiments, the mobile terminal obtains a relative moving speed between the mobile terminal and the object, and may calculate the moving speed of the mobile terminal through a built-in acceleration sensor according to a relation between acceleration detected by the acceleration sensor and time, and may use the calculated moving speed of the mobile terminal as the relative moving speed between the mobile terminal and the object. It can be understood that the scene of detecting the moving state of the mobile terminal relative to the object by using ultrasonic waves is used for controlling the turning-off and turning-on of the display screen in the scene when the mobile terminal is in a call, and the scene is that the mobile terminal is close to the face of a person, so that the movement between the mobile terminal and the object is mostly the object is stationary, and the mobile terminal moves, so that the relative moving speed between the mobile terminal and the object can be determined by detecting the moving speed of the mobile terminal.
Step S340: and calculating the difference value between the ultrasonic characteristic value and the target characteristic value to obtain the difference value of the mobile terminal in the moving state of the relative moving speed.
In this embodiment, the mobile terminal may determine, according to a plurality of feature values of the ultrasonic signal detected by the standard terminal at a plurality of relative movement speeds in the transmission process, the feature value corresponding to the movement state of the relative movement speed detected by the mobile terminal, where the relative movement speed is the movement speed of the standard terminal relative to the object, and use the determined feature value as the target feature value.
Further, the difference value of the ultrasonic characteristic value acquired by the mobile terminal and the target characteristic value is calculated, so that the difference value of the mobile terminal in the moving state of the relative moving speed can be obtained.
Step S350: the method comprises the steps of obtaining a plurality of difference values of the mobile terminal in a plurality of moving states with different relative moving speeds, wherein the plurality of moving states correspond to the plurality of difference values one to one.
In some embodiments, the mobile terminal may further obtain a plurality of difference values in a plurality of moving states with different relative moving speeds through the manner from step S310 to step S340, so that the mobile terminal selects a corresponding difference value to adjust according to an actual relative moving speed each time the mobile terminal uses the ultrasonic detection function.
Step S360: and acquiring the current relative movement speed between the mobile terminal and the object when the emission intensity of the ultrasonic emission module is adjusted and the ultrasonic characteristic value acquired by the mobile terminal is adjusted each time.
In some embodiments, each time the mobile terminal calibrates the ultrasonic detection function, the current relative movement speed between the current mobile terminal and the object may be obtained, so that the mobile terminal selects a corresponding difference value according to the actual relative movement speed for calibration.
Step S370: and acquiring a target difference value corresponding to the moving state of the current relative moving speed from the plurality of difference values.
In some embodiments, since the plurality of difference values and the moving states of the plurality of different relative moving speeds are in a one-to-one correspondence relationship, the mobile terminal may obtain a difference value corresponding to the moving state of the current relative speed from the difference values corresponding to the moving states of the plurality of relative moving speeds, and use the obtained difference value as the target difference value.
In some embodiments, the mobile terminal may further record a difference value corresponding to the movement state of different relative movement speeds acquired each time, so that a plurality of difference values acquired at different times corresponding to the movement state of each relative movement speed may be recorded. The mobile terminal may select all difference values corresponding to the current relative moving speed acquired in a time period, calculate an average value of all difference values, and use the average value as a target difference value.
Step S380: and adjusting the transmitting intensity of the ultrasonic transmitting module each time when the ultrasonic signal is transmitted by the mobile terminal in the moving state of the current relative moving speed according to the target difference value, and adjusting the ultrasonic characteristic value acquired by the mobile terminal each time in the moving state.
In this embodiment of the application, the mobile terminal adjusts the emission intensity of the ultrasonic wave signal emitted by the ultrasonic wave emitting module each time and adjusts the ultrasonic wave characteristic value obtained each time in the moving state of the current relative moving speed according to the target difference value, which may refer to the contents of the foregoing embodiments and is not described herein again.
According to the scheme provided by the embodiment of the application, the ultrasonic characteristic value obtained under the moving state with different relative moving speeds and the difference value of the ultrasonic characteristic value obtained by the standard terminal are obtained, so that when the mobile terminal is used for calibrating the ultrasonic function, the target difference value corresponding to the moving state with the current relative moving speed can be selected, the transmitting intensity of the ultrasonic signal sent by the mobile terminal under the moving state at each time is adjusted according to the target difference value, the ultrasonic characteristic value obtained at each time is adjusted, the obtained ultrasonic characteristic value can be calibrated, and the moving state of the mobile terminal detected relative objects is more accurate.
Referring to fig. 6, a block diagram of an ultrasonic calibration apparatus 400 according to an embodiment of the present disclosure is shown. The ultrasonic calibration apparatus 400 is applied to the mobile terminal, which includes an ultrasonic transmitting module and an ultrasonic receiving module. The ultrasonic calibration apparatus 400 includes: a transceiving control module 410, a feature acquisition module 420, a difference acquisition module 430, and an adjustment execution module 440. The transceiving control module 410 is configured to, in a moving state where the mobile terminal and an object move relatively, send an ultrasonic signal through the ultrasonic transmitting module, and receive, through the ultrasonic receiving module, an ultrasonic signal returned after the ultrasonic signal encounters the object; the characteristic obtaining module 420 is configured to obtain an ultrasonic characteristic value of the ultrasonic signal in a transmission process; the difference obtaining module 430 is configured to obtain a difference value between the ultrasonic characteristic value and a target characteristic value, where the target characteristic value is a characteristic value of an ultrasonic signal detected by a standard terminal in the moving state in a transmission process; the adjustment executing module 440 is configured to adjust, according to the difference value, the transmission intensity of the mobile terminal in the moving state when the ultrasonic wave transmitting module transmits the ultrasonic wave signal each time, and adjust the ultrasonic wave characteristic value obtained by the mobile terminal in the moving state each time.
In some embodiments, the adjustment performing module 440 may include a difference value determining unit and a feature value adjusting unit. The difference value judging unit is used for judging whether the absolute value of the difference value is larger than a preset threshold value or not; the characteristic value adjusting unit is used for adjusting the transmitting intensity of the mobile terminal in the moving state when the ultrasonic transmitting module transmits the ultrasonic signal each time and adjusting the ultrasonic characteristic value obtained by the mobile terminal in the moving state each time according to the difference value if the absolute value of the difference value is larger than the preset threshold value.
In some embodiments, the adjustment performing module 440 may include: the device comprises a difference value dividing unit, a first adjusting unit and a second adjusting unit. The difference value dividing unit is used for dividing the difference value into a first difference value and a second difference value, and the sum of the first difference value and the second difference value is the difference value; the first adjusting unit is used for adjusting the ultrasonic characteristic value acquired by the mobile terminal in the moving state each time according to the first difference value; and the second adjusting unit is used for acquiring target adjusting strength according to the second difference value and adjusting the transmitting strength of the mobile terminal in the moving state when the ultrasonic transmitting module transmits the ultrasonic signal each time according to the target adjusting strength.
In this embodiment, the second adjusting unit may be specifically configured to: calculating to obtain target adjustment intensity corresponding to the second difference value according to the corresponding relation between the emission intensity and the emission frequency of the ultrasonic signal, a Doppler effect formula and the second difference value; and increasing or decreasing the emission intensity of the mobile terminal in the moving state every time the ultrasonic emission module sends the ultrasonic signal by the target adjustment intensity.
In this embodiment, the first adjusting unit may specifically be configured to: and increasing or decreasing the ultrasonic characteristic value acquired by the mobile terminal in the moving state each time by the size of the first difference value.
In this embodiment, the difference value dividing unit may be specifically configured to: obtaining a product of the difference value and a preset proportion, and taking the product as a first difference value; and acquiring a difference value between the difference value and the first difference value, and taking the difference value as a second difference value.
In some embodiments, the difference obtaining module 430 includes a speed obtaining unit, a feature value selecting unit, and a difference value calculating unit. The speed acquisition unit is used for acquiring the relative movement speed between the mobile terminal and the object; the characteristic value selection unit is used for acquiring a target characteristic value detected by the standard terminal in the moving state of the relative moving speed; the difference value calculating unit is used for calculating the difference value between the ultrasonic characteristic value and the target characteristic value to obtain the difference value of the mobile terminal in the moving state of the relative moving speed.
In this embodiment, the difference obtaining module 430 is further configured to obtain a plurality of difference values of the mobile terminal in a plurality of moving states with different relative moving speeds, where the plurality of moving states correspond to the plurality of difference values one to one.
Further, the adjustment execution module 440 may specifically be configured to: when the transmitting intensity of the ultrasonic transmitting module is adjusted and the ultrasonic characteristic value obtained by the mobile terminal is adjusted each time, the current relative moving speed between the mobile terminal and an object is obtained; acquiring a target difference value corresponding to the moving state of the current relative moving speed from the plurality of difference values; and adjusting the transmitting intensity of the ultrasonic transmitting module each time when the ultrasonic signal is transmitted by the mobile terminal in the moving state of the current relative moving speed according to the target difference value, and adjusting the ultrasonic characteristic value acquired by the mobile terminal each time in the moving state.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working processes of the above-described devices and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling between the modules may be electrical, mechanical or other type of coupling.
In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
To sum up, the scheme that this application provided, under the mobile state of relative movement between mobile terminal and object, send ultrasonic signal through ultrasonic emission module, and receive the ultrasonic signal that ultrasonic signal returned after meetting the object through ultrasonic receiving module, acquire the ultrasonic wave eigenvalue of ultrasonic signal in transmission process, acquire the difference value between ultrasonic wave eigenvalue and the target eigenvalue, the target eigenvalue is the eigenvalue of the ultrasonic signal of standard terminal detection under the mobile state in transmission process, according to the difference value, adjust the transmitting strength when ultrasonic emission module sent ultrasonic signal at every turn under the mobile state to mobile terminal. Therefore, the emission intensity of the ultrasonic signal sent by the mobile terminal in the moving state at each time is adjusted according to the difference value between the ultrasonic characteristic value acquired by the same moving state and the ultrasonic characteristic value acquired by the standard terminal, and the ultrasonic characteristic value acquired at each time for proximity detection is adjusted, so that the acquired ultrasonic characteristic value can be calibrated, and the moving state of the mobile terminal in detecting relative objects is more accurate.
Referring to fig. 7, a block diagram of a mobile terminal according to an embodiment of the present application is shown. The mobile terminal 100 may be a smart phone, a tablet computer, an electronic book, or other mobile terminal capable of running an application. The mobile terminal 100 in the present application may include one or more of the following components: a processor 110, a memory 120, a display 130, an ultrasound transmission module 140, an ultrasound reception module 150, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by the one or more processors 110, the one or more programs configured to perform the methods as described in the aforementioned method embodiments.
Processor 110 may include one or more processing cores. The processor 110 interfaces with various components throughout the mobile terminal 100 using various interfaces and lines, and performs various functions of the mobile terminal 100 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 120 and invoking data stored in the memory 120. Alternatively, the processor 110 may be implemented in hardware using at least one of Digital Signal Processing (DSP), field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 110 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 110, but may be implemented by a communication chip.
The Memory 120 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 120 may be used to store instructions, programs, code sets, or instruction sets. The memory 120 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The storage data area may also store data created by the terminal 100 in use, such as a phonebook, audio-video data, chat log data, and the like.
The Display 130 is used for displaying information input by a user, information provided to the user, and various graphic user interfaces of the mobile terminal 100, which may be composed of graphics, text, icons, numbers, video, and any combination thereof, and in one example, the Display 130 may be a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), and the like, which are not limited herein.
The ultrasonic wave emitting module 140 is used for emitting ultrasonic waves, and the ultrasonic wave emitting device module 140 may be a receiver, a speaker, a dedicated ultrasonic wave emitter, and the like, which is not limited herein. The ultrasonic receiving module 150 is used for receiving ultrasonic waves, and the ultrasonic receiving module 150 may be a microphone, and the like, but is not limited thereto.
Referring to fig. 8, a block diagram of a computer-readable storage medium provided in an embodiment of the present application is shown. The computer-readable medium 800 has stored therein a program code that can be called by a processor to execute the method described in the above-described method embodiments.
The computer-readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 800 includes a non-volatile computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 to perform any of the method steps of the method described above. The program code can be read from and written to one or more computer program products. The program code 810 may be compressed, for example, in a suitable form.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (7)

1. An ultrasonic calibration method is applied to a mobile terminal, wherein the mobile terminal comprises an ultrasonic transmitting module and an ultrasonic receiving module, and the method comprises the following steps:
in a moving state of relative movement between the mobile terminal and an object, sending an ultrasonic signal through the ultrasonic transmitting module, and receiving an ultrasonic signal returned by the ultrasonic signal after encountering the object through the ultrasonic receiving module;
acquiring an ultrasonic characteristic value of an ultrasonic signal in a transmission process;
acquiring the relative movement speed between the mobile terminal and an object;
acquiring a target characteristic value of the ultrasonic signal detected by the standard terminal in the moving state of the relative moving speed in the transmission process;
calculating the difference value between the ultrasonic characteristic value and the target characteristic value to obtain the difference value of the mobile terminal in the moving state of the relative moving speed;
and adjusting the transmitting intensity of the mobile terminal in the moving state when the ultrasonic transmitting module transmits the ultrasonic signal every time, and adjusting the ultrasonic characteristic value acquired by the mobile terminal in the moving state every time according to the difference value.
2. The method according to claim 1, wherein the adjusting, according to the difference value, the transmission intensity of the ultrasonic wave transmission module each time when the ultrasonic wave signal is transmitted by the mobile terminal in the moving state and the ultrasonic wave characteristic value obtained by the mobile terminal each time in the moving state comprises:
judging whether the absolute value of the difference value is larger than a preset threshold value or not;
if the difference value is larger than the preset threshold value, adjusting the transmitting intensity of the ultrasonic transmitting module in the moving state every time when the ultrasonic signal is transmitted by the mobile terminal according to the difference value, and adjusting the ultrasonic characteristic value obtained by the mobile terminal in the moving state every time.
3. The method of claim 1, further comprising:
the method comprises the steps of obtaining a plurality of difference values of the mobile terminal in a plurality of moving states with different relative moving speeds, wherein the plurality of moving states correspond to the plurality of difference values one to one.
4. The method according to claim 3, wherein the adjusting, according to the difference value, the transmission intensity of the ultrasonic wave transmission module each time when the ultrasonic wave signal is transmitted by the mobile terminal in the moving state and the ultrasonic wave characteristic value obtained by the mobile terminal each time in the moving state comprises:
when the transmitting intensity of the ultrasonic transmitting module is adjusted and the ultrasonic characteristic value obtained by the mobile terminal is adjusted each time, the current relative moving speed between the mobile terminal and an object is obtained;
acquiring a target difference value corresponding to the moving state of the current relative moving speed from the plurality of difference values;
and adjusting the transmitting intensity of the ultrasonic transmitting module each time when the ultrasonic signal is transmitted by the mobile terminal in the moving state of the current relative moving speed according to the target difference value, and adjusting the ultrasonic characteristic value acquired by the mobile terminal each time in the moving state.
5. An ultrasonic calibration device, characterized in that, be applied to mobile terminal, mobile terminal includes ultrasonic wave emission module and ultrasonic wave receiving module, the device includes: a receiving and sending control module, a characteristic acquisition module, a difference acquisition module and an adjustment execution module, wherein the difference acquisition module comprises a speed acquisition unit, a characteristic value selection unit and a difference value calculation unit,
the receiving and transmitting control module is used for sending an ultrasonic signal through the ultrasonic transmitting module in a moving state that the mobile terminal and an object move relatively, and receiving an ultrasonic signal returned by the ultrasonic signal after encountering the object through the ultrasonic receiving module;
the characteristic acquisition module is used for acquiring ultrasonic characteristic values of ultrasonic signals in a transmission process;
the speed acquisition unit is used for acquiring the relative moving speed between the mobile terminal and the object;
the characteristic value selection unit is used for acquiring a target characteristic value of the ultrasonic signal detected by the standard terminal in the moving state of the relative moving speed in the transmission process;
the difference value calculating unit is used for calculating the difference value between the ultrasonic characteristic value and the target characteristic value to obtain the difference value of the mobile terminal in the moving state of the relative moving speed;
the adjustment execution module is used for adjusting the emission intensity of the mobile terminal in the moving state when the ultrasonic emission module sends the ultrasonic signal each time according to the difference value, and adjusting the ultrasonic characteristic value obtained by the mobile terminal in the moving state each time.
6. A mobile terminal, comprising:
one or more processors;
a memory;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-4.
7. A computer-readable storage medium, having stored thereon program code that can be invoked by a processor to perform the method according to any one of claims 1 to 4.
CN202110762251.3A 2019-07-31 2019-07-31 Ultrasonic calibration method and device, mobile terminal and storage medium Active CN113517935B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110762251.3A CN113517935B (en) 2019-07-31 2019-07-31 Ultrasonic calibration method and device, mobile terminal and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110762251.3A CN113517935B (en) 2019-07-31 2019-07-31 Ultrasonic calibration method and device, mobile terminal and storage medium
CN201910701488.3A CN110535535B (en) 2019-07-31 2019-07-31 Ultrasonic calibration method and device, mobile terminal and storage medium

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
CN201910701488.3A Division CN110535535B (en) 2019-07-31 2019-07-31 Ultrasonic calibration method and device, mobile terminal and storage medium

Publications (2)

Publication Number Publication Date
CN113517935A CN113517935A (en) 2021-10-19
CN113517935B true CN113517935B (en) 2023-01-06

Family

ID=68661710

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202110762251.3A Active CN113517935B (en) 2019-07-31 2019-07-31 Ultrasonic calibration method and device, mobile terminal and storage medium
CN201910701488.3A Active CN110535535B (en) 2019-07-31 2019-07-31 Ultrasonic calibration method and device, mobile terminal and storage medium

Family Applications After (1)

Application Number Title Priority Date Filing Date
CN201910701488.3A Active CN110535535B (en) 2019-07-31 2019-07-31 Ultrasonic calibration method and device, mobile terminal and storage medium

Country Status (1)

Country Link
CN (2) CN113517935B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11156714B2 (en) * 2020-02-13 2021-10-26 Tymphany Acoustic Technology (Huizhou) Co., Ltd. Object movement detection based on ultrasonic sensor data analysis

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106385290A (en) * 2016-08-16 2017-02-08 北京小米移动软件有限公司 Ultrasonic calibration method and device
CN108566479A (en) * 2017-12-29 2018-09-21 努比亚技术有限公司 screen state control method, mobile terminal and computer readable storage medium
CN108562890A (en) * 2017-12-29 2018-09-21 努比亚技术有限公司 Calibration method, device and the computer readable storage medium of ultrasonic wave characteristic value

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9538982B2 (en) * 2010-12-18 2017-01-10 Massachusetts Institute Of Technology User interface for ultrasound scanning system
US8676438B2 (en) * 2012-07-31 2014-03-18 Ford Global Technologies Method and system for implementing ultrasonic sensor signal strength calibrations
US9667352B2 (en) * 2015-01-09 2017-05-30 Facebook, Inc. Ultrasonic communications for wireless beacons
US11125866B2 (en) * 2015-06-04 2021-09-21 Chikayoshi Sumi Measurement and imaging instruments and beamforming method
CN106546969B (en) * 2016-10-19 2018-12-25 北京小米移动软件有限公司 The method and device of ultrasonic wave calibration
CN106546970B (en) * 2016-10-19 2019-02-12 北京小米移动软件有限公司 The ultrasonic wave calibration method and device of mobile device
CN107991664A (en) * 2017-11-30 2018-05-04 努比亚技术有限公司 Calibration method, device and the computer-readable recording medium of ultrasonic wave threshold value
CN108196778B (en) * 2017-12-29 2021-08-10 努比亚技术有限公司 Control method of screen state, mobile terminal and computer readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106385290A (en) * 2016-08-16 2017-02-08 北京小米移动软件有限公司 Ultrasonic calibration method and device
CN108566479A (en) * 2017-12-29 2018-09-21 努比亚技术有限公司 screen state control method, mobile terminal and computer readable storage medium
CN108562890A (en) * 2017-12-29 2018-09-21 努比亚技术有限公司 Calibration method, device and the computer readable storage medium of ultrasonic wave characteristic value

Also Published As

Publication number Publication date
CN113517935A (en) 2021-10-19
CN110535535A (en) 2019-12-03
CN110535535B (en) 2021-08-17

Similar Documents

Publication Publication Date Title
CN110515085B (en) Ultrasonic processing method, ultrasonic processing device, electronic device, and computer-readable medium
CN110139262B (en) Bluetooth communication control method and related product
CN113382439B (en) Information reporting method, access mode determining method, terminal and network equipment
US9335825B2 (en) Gesture control
WO2021017947A1 (en) Terminal control method and device, mobile terminal and storage medium
CN110502109B (en) Information processing method, information processing device, electronic equipment and storage medium
WO2021017943A1 (en) Ultrasonic processing method and apparatus, electronic device, and computer-readable medium
CN110519448B (en) Screen state control method and device, mobile terminal and storage medium
CN110865710B (en) Terminal control method and device, mobile terminal and storage medium
WO2021017855A1 (en) Ring processing method and apparatus, mobile terminal and storage medium
CN109889217B (en) Interference processing method and terminal equipment
CN111083386B (en) Image processing method and electronic device
WO2021017927A1 (en) Method and device for controlling apparatus, electronic apparatus, and storage medium
CN109274441B (en) Tuning method and terminal equipment
WO2021017851A1 (en) Screen state control method and apparatus, mobile terminal and storage medium
US20230333205A1 (en) Sound source positioning method and apparatus
CN115797401B (en) Verification method and device for alignment parameters, storage medium and electronic equipment
CN113517935B (en) Ultrasonic calibration method and device, mobile terminal and storage medium
WO2022199354A1 (en) Call volume adjustment method and apparatus, and terminal and storage medium
CN110601771B (en) Frame loss processing method and device based on ultrasonic waves, mobile terminal and storage medium
CN109309758B (en) Audio processing device, terminal equipment and signal processing method
CN110581712B (en) Antenna determination method and terminal equipment
CN116246645A (en) Voice processing method and device, storage medium and electronic equipment
CN115762504A (en) Voice processing method, device, terminal equipment, server equipment and storage medium
CN108683846B (en) Image compensation method and device and mobile terminal

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