Ultrasonic proximity sensing method, device, computer equipment and storage medium

文档序号:152368 发布日期:2021-10-26 浏览:41次 中文

阅读说明:本技术 超声波接近感应方法、装置、计算机设备和存储介质 (Ultrasonic proximity sensing method, device, computer equipment and storage medium ) 是由 张润 于 2020-04-24 设计创作,主要内容包括:本申请涉及一种超声波接近感应方法、装置、计算机设备和存储介质。所述方法包括:实时获取在预设时间段内检测的超声波干扰强度数据;根据预设时间段内的所述超声波干扰强度数据,确定超声波发射器当前发射的超声波频段对应的干扰强度;当所述超声波发射器当前发射的超声波频段对应的干扰强度大于或等于预设阈值时,切换当前发射的超声波频段。采用本方法能够避免自身超声波发射器发射的超声波,受其他设备发射的超声波的影响,提高了超声波接近感应识别的准确度。(The application relates to an ultrasonic proximity sensing method, an ultrasonic proximity sensing device, a computer device and a storage medium. The method comprises the following steps: acquiring ultrasonic interference intensity data detected in a preset time period in real time; determining the interference intensity corresponding to the current ultrasonic frequency band transmitted by the ultrasonic transmitter according to the ultrasonic interference intensity data in a preset time period; and when the interference intensity corresponding to the currently transmitted ultrasonic frequency band of the ultrasonic transmitter is greater than or equal to a preset threshold value, switching the currently transmitted ultrasonic frequency band. By adopting the method, the ultrasonic waves emitted by the ultrasonic emitter can be prevented from being influenced by the ultrasonic waves emitted by other equipment, and the accuracy of the ultrasonic proximity induction identification is improved.)

1. An ultrasonic proximity sensing method, comprising:

acquiring ultrasonic interference intensity data detected in a preset time period in real time;

determining the interference intensity corresponding to the current ultrasonic frequency band transmitted by the ultrasonic transmitter according to the ultrasonic interference intensity data in a preset time period;

and when the interference intensity corresponding to the currently transmitted ultrasonic frequency band of the ultrasonic transmitter is greater than or equal to a preset threshold value, switching the currently transmitted ultrasonic frequency band.

2. The method of claim 1, wherein the means for detecting the intensity of the ultrasonic interference comprises:

acquiring audio data of a microphone recording the current environment in real time;

performing spectrum analysis according to the environmental audio data of the current environment to obtain a spectrum analysis result;

and determining the ultrasonic interference intensity of the current environment according to the spectrum analysis result.

3. The method of claim 2, wherein the step of determining the current environmental ultrasonic interference strength according to the result of the spectrum analysis comprises:

acquiring an ultrasonic frequency band and coding information currently transmitted by the ultrasonic transmitter;

filtering the frequency spectrum analysis result according to the ultrasonic frequency band and the coding information currently transmitted by the ultrasonic transmitter to obtain a noise frequency spectrum;

and determining the ultrasonic interference intensity of the current environment according to the noise spectrum.

4. The method of claim 2, wherein the step of determining the current environmental ultrasonic interference strength according to the result of the spectrum analysis comprises:

and determining the ultrasonic interference intensity in the frequency range of 22KHz-27KHz in the current environment according to the frequency spectrum analysis result.

5. The method according to claim 1, wherein the step of determining the interference strength corresponding to the currently transmitted ultrasonic frequency band of the ultrasonic transmitter according to the ultrasonic interference strength data in the preset time period comprises:

analyzing the ultrasonic interference intensity data in a preset time period to determine the comprehensive interference intensity of an ultrasonic frequency band;

and determining the interference intensity corresponding to the current ultrasonic frequency band transmitted by the ultrasonic transmitter according to the comprehensive interference intensity.

6. The method according to claim 1, wherein the step of switching the currently transmitted ultrasonic frequency band when the interference intensity corresponding to the currently transmitted ultrasonic frequency band of the ultrasonic transmitter is greater than or equal to a preset threshold value comprises:

when the interference intensity corresponding to the currently transmitted ultrasonic frequency band of the ultrasonic transmitter is greater than or equal to a preset threshold, determining an available ultrasonic frequency band with the interference intensity smaller than the preset threshold according to the ultrasonic interference intensity data in a preset time period;

and switching the current ultrasonic frequency band transmitted by the ultrasonic transmitter into an ultrasonic frequency band within the range of the available ultrasonic frequency band.

7. The method of claim 2, wherein the step of capturing the audio data of the current environment recorded by the microphone in real time comprises:

the method comprises the steps of obtaining audio data of a current environment recorded in real time through a microphone on the back of the mobile terminal, wherein the back of the mobile terminal is a back-to-back surface of a display screen of the mobile terminal.

8. An ultrasonic proximity sensing device, the device comprising:

the data acquisition module is used for acquiring ultrasonic interference intensity data detected in a preset time period in real time;

the interference intensity determining module is used for determining the interference intensity corresponding to the ultrasonic frequency band currently transmitted by the ultrasonic transmitter according to the ultrasonic interference intensity data in a preset time period;

and the ultrasonic frequency band switching module is used for switching the currently transmitted ultrasonic frequency band when the interference intensity corresponding to the currently transmitted ultrasonic frequency band of the ultrasonic transmitter is greater than or equal to a preset threshold value.

9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.

10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.

Technical Field

The present application relates to the field of electronic information technology, and in particular, to an ultrasonic proximity sensing method and apparatus, a computer device, and a storage medium.

Background

With the development of electronic information technology, an ultrasonic sensing technology has appeared, which can sense whether an object is approaching by transmitting ultrasonic waves, and is widely applied to various fields, such as: the ultrasonic induction technology is applied to mobile equipment to realize proximity induction, and is used for inducing whether a user pastes the mobile equipment to the face to answer a call or not in the process of putting through the call, and automatically turning off a screen when the user pastes the mobile equipment to the face to answer the call, so that the power consumption can be saved, and misoperation can be prevented.

At present, ultrasonic proximity sensing of a mobile device generally continuously sends ultrasonic waves at a certain frequency point or frequency range to calculate the distance of an obstacle in a manner of obtaining a continuous echo, but is easily interfered by the frequency point or frequency range to cause abnormal judgment.

Therefore, the ultrasonic proximity sensing accuracy of the current mobile equipment is low.

Disclosure of Invention

In view of the above, it is desirable to provide an ultrasonic proximity sensing method, an apparatus, a computer device, and a storage medium capable of improving accuracy of ultrasonic proximity sensing.

An ultrasonic proximity sensing method, the method comprising:

acquiring ultrasonic interference intensity data detected in a preset time period in real time;

determining the interference intensity corresponding to the current ultrasonic frequency band transmitted by the ultrasonic transmitter according to the ultrasonic interference intensity data in a preset time period;

and when the interference intensity corresponding to the currently transmitted ultrasonic frequency band of the ultrasonic transmitter is greater than or equal to a preset threshold value, switching the currently transmitted ultrasonic frequency band.

In one embodiment, the method for detecting the intensity of the ultrasonic interference includes:

acquiring audio data of a microphone recording the current environment in real time;

performing spectrum analysis according to the environmental audio data of the current environment to obtain a spectrum analysis result;

and determining the ultrasonic interference intensity of the current environment according to the spectrum analysis result.

In one embodiment, the step of determining the intensity of the ultrasonic interference in the current environment according to the result of the spectrum analysis includes:

acquiring an ultrasonic frequency band and coding information currently transmitted by the ultrasonic transmitter;

filtering the frequency spectrum analysis result according to the current ultrasonic frequency band and the coding information transmitted by the ultrasonic transmitter to obtain a noise frequency spectrum;

and determining the ultrasonic interference intensity of the current environment according to the noise spectrum.

In one embodiment, the step of determining the intensity of the ultrasonic interference in the current environment according to the result of the spectrum analysis includes:

and determining the ultrasonic interference intensity in the frequency range of 22KHz-27KHz in the current environment according to the frequency spectrum analysis result.

In one embodiment, the step of determining, according to the ultrasonic interference intensity data in a preset time period, an interference intensity corresponding to an ultrasonic frequency band currently transmitted by the ultrasonic transmitter includes:

analyzing the ultrasonic interference intensity data in a preset time period to determine the comprehensive interference intensity of an ultrasonic frequency band;

and determining the interference intensity corresponding to the current ultrasonic frequency band transmitted by the ultrasonic transmitter according to the comprehensive interference intensity.

In one embodiment, the step of switching the currently transmitted ultrasonic frequency band when the interference intensity corresponding to the currently transmitted ultrasonic frequency band of the ultrasonic transmitter is greater than or equal to a preset threshold includes:

when the interference intensity corresponding to the currently transmitted ultrasonic frequency band of the ultrasonic transmitter is greater than or equal to a preset threshold, determining an available ultrasonic frequency band with the interference intensity smaller than the preset threshold according to the ultrasonic interference intensity data in a preset time period;

and switching the currently transmitted ultrasonic frequency band into an ultrasonic frequency band within the available ultrasonic frequency band.

In one embodiment, the step of acquiring the audio data of the current environment recorded by the microphone in real time includes:

the method comprises the steps of obtaining audio data of a current environment recorded in real time through a microphone on the back of the mobile terminal, wherein the back of the mobile terminal is a back-to-back surface of a display screen of the mobile terminal.

An ultrasonic proximity sensing device, the device comprising:

the data acquisition module is used for acquiring ultrasonic interference intensity data detected in a preset time period in real time;

the interference intensity determining module is used for determining the interference intensity corresponding to the ultrasonic frequency band currently transmitted by the ultrasonic transmitter according to the ultrasonic interference intensity data in a preset time period;

and the ultrasonic frequency band switching module is used for switching the currently transmitted ultrasonic frequency band when the interference intensity corresponding to the currently transmitted ultrasonic frequency band of the ultrasonic transmitter is greater than or equal to a preset threshold value.

A computer device comprising a memory storing a computer program and a processor implementing the steps of the method when executing the computer program.

A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method.

The ultrasonic proximity sensing method, the device, the computer equipment and the storage medium can determine the interference intensity corresponding to the currently transmitted ultrasonic frequency band of the ultrasonic transmitter by acquiring the ultrasonic interference intensity data detected in a preset time period in real time, and when the interference intensity corresponding to the currently transmitted ultrasonic frequency band of the proximity sensing is greater than or equal to a preset threshold value, the ultrasonic frequency band transmitted by other equipment in the current environment is indicated, and the ultrasonic frequency band transmitted by the ultrasonic transmitter can be avoided by switching the currently transmitted ultrasonic frequency band of the ultrasonic transmitter and is influenced by the ultrasonic waves transmitted by other equipment, so that the accuracy of ultrasonic proximity sensing identification is improved.

Drawings

FIG. 1 is a schematic flow diagram of an ultrasonic proximity sensing method in one embodiment;

FIG. 2 is a schematic flow chart of the method for detecting the intensity of ultrasonic interference in an embodiment of the ultrasonic proximity sensing method;

FIG. 3 is a block diagram of an exemplary ultrasonic proximity sensing apparatus;

FIG. 4 is a block diagram of an ultrasonic proximity sensing device in another embodiment;

FIG. 5 is a diagram illustrating an internal structure of a computer device according to an embodiment.

Detailed Description

In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.

In one embodiment, as shown in fig. 1, an ultrasonic proximity sensing method is provided, which is described by taking the method as an example applied to the mobile terminal in fig. 1, and includes the following steps:

step S220, acquiring the ultrasonic interference intensity data detected within a preset time period in real time.

The ultrasonic wave interference intensity data detected in the preset time period can be acquired in real time when the ultrasonic wave proximity sensing function is started. The ultrasonic proximity sensing function is a function for recognizing whether an object is approaching based on an ultrasonic proximity sensor, such as making a call, turning on the proximity sensing function when the call is connected, performing a corresponding operation when a change (approach/departure) of a proximity state is detected, turning off a screen when an object is approaching, turning on the screen when an object is departing, and the like. After the ultrasonic proximity sensing function of the mobile terminal is started, ultrasonic waves need to be sent to the outside to detect whether an object is close to the mobile terminal, and therefore the proximity sensing function is achieved. Ultrasound is a sound wave with a frequency higher than 20000 hertz.

The preset time period may be determined according to the amount of the required ultrasonic interference intensity data when determining the interference intensity corresponding to the ultrasonic frequency band currently transmitted by the ultrasonic transmitter, and the ultrasonic interference intensity data detected in the preset time period is the ultrasonic interference intensity data detected before the current time point, for example: the preset time period is 1 second, the current time point is 11 points, 30 minutes and 10 seconds, and the ultrasonic interference intensity data detected in the preset time period are all the ultrasonic interference intensity data detected in the time period from 11 points, 30 minutes and 9 seconds to 11 points, 30 minutes and 10 seconds. The ultrasonic transmitter is a device used for transmitting ultrasonic waves on the mobile terminal, and the ultrasonic transmitter can transmit ultrasonic waves in an ultrasonic frequency band according to needs.

The real-time acquisition of the ultrasonic interference intensity data detected in the preset time period means that the ultrasonic interference intensity data detected in the preset time period is continuously and uninterruptedly acquired after the ultrasonic approach induction function is started, and the interference intensity corresponding to the currently transmitted ultrasonic frequency band of the ultrasonic transmitter is determined to judge whether the currently transmitted ultrasonic frequency band needs to be switched.

In one embodiment, referring to fig. 2, the method for detecting the ultrasonic interference intensity includes steps S420 to S460:

step S420, acquiring the audio data of the current environment recorded by the microphone in real time.

The microphone can record all audio signals which can be recorded under the current environment, and the audio data comprises ultrasonic waves emitted by other equipment and ultrasonic waves emitted by the ultrasonic emitter of the microphone. All audio signals that can be recorded in the current environment. After the mobile terminal is awakened, for example, when the mobile terminal is turned on, a microphone of the mobile terminal is turned on, the microphone collects an audio signal in the current environment, and the audio signal of the microphone is converted into a digital PCM signal (pulse code modulation signal) of 96KHz or 48KHz, that is, audio data, after being subjected to AD conversion (analog-to-digital conversion). The microphone for recording the audio data of the current environment may be any one of the microphones of the mobile terminal capable of recording the audio signal, or may be a microphone arranged on the back of the mobile terminal, and the microphones for acquiring the ultrasonic waves emitted by the ultrasonic emitter may be the same when the ultrasonic wave is in proximity sensing, or the microphones for acquiring the ultrasonic waves emitted by the ultrasonic emitter may not be the same when the ultrasonic wave is in proximity sensing.

In one embodiment, the step of acquiring the audio data of the current environment recorded by the microphone in real time comprises the following steps: and acquiring audio data of the current environment recorded in real time by a microphone on the back of the mobile terminal, wherein the back of the mobile terminal is a surface opposite to a display screen of the mobile terminal.

The back of the mobile terminal is opposite to the display screen of the mobile terminal, the microphone on the back of the mobile terminal records audio data of the current environment in real time, the situation that the distance of ultrasonic waves transmitted by the ultrasonic transmitter is too short, signals of the ultrasonic waves transmitted by the ultrasonic transmitter are too strong and cannot record the ultrasonic waves transmitted by other equipment in the current environment can be avoided, and the accuracy of detecting the ultrasonic interference intensity of the current environment can be improved.

Step S440, performing spectrum analysis according to the environmental audio data of the current environment to obtain a spectrum analysis result.

Spectral analysis is a technique for decomposing a complex signal into simpler signals, and finds out information (such as amplitude, power, intensity, or phase) of a signal at different frequencies. And carrying out spectrum analysis on the environmental audio data of the current environment through a digital signal processor of the mobile terminal based on Fourier transform to obtain a spectrum analysis result, wherein the spectrum analysis result is represented as a frequency distribution curve.

Step S460, determining the ultrasonic interference intensity of the current environment according to the result of the spectrum analysis.

The intensity of the ultrasonic interference in the current environment refers to the intensity of the ultrasonic interference which is emitted by other devices when the ultrasonic emitter emits the ultrasonic wave in the current environment.

In one embodiment, the step of determining the ultrasonic interference intensity of the current environment according to the result of the spectrum analysis includes: acquiring an ultrasonic frequency band and coding information currently transmitted by an ultrasonic transmitter; filtering the frequency spectrum analysis result according to the current ultrasonic frequency band and the coding information transmitted by the ultrasonic transmitter to obtain a noise frequency spectrum; and determining the ultrasonic interference intensity of the current environment according to the noise spectrum.

The frequency range of the currently transmitted ultrasonic wave by the ultrasonic wave transmitter refers to the frequency range of the currently transmitted ultrasonic wave by the ultrasonic wave transmitter. The coded information is a characteristic for identifying the ultrasound currently transmitted by the ultrasound transmitter. According to the ultrasonic frequency band and the coding information which are currently transmitted by the ultrasonic transmitter, which spectrum is generated by the ultrasonic transmitted by the ultrasonic transmitter can be determined from the spectrum analysis result, so that the spectrum of the ultrasonic is excluded, and the rest spectrum is generated by the ultrasonic of other equipment, namely a noise spectrum. According to the noise spectrum, the ultrasonic interference intensity of the current environment can be determined, and the ultrasonic interference intensity of the current environment comprises the ultrasonic interference intensity in the frequency range of 22KHz-27KHz in the current environment.

Step S240, determining an interference intensity corresponding to the current ultrasonic frequency band transmitted by the ultrasonic transmitter according to the ultrasonic interference intensity data in the preset time period.

The ultrasonic interference intensity data in the preset time period may be ultrasonic interference intensities detected at a plurality of time points, or may be ultrasonic interference intensity detected at one time point, and is determined according to the number of times of detecting the ultrasonic interference intensity in the preset time period. The ultrasonic interference intensity data comprises the ultrasonic interference intensity with the frequency range of 22KHz-27 KHz. The interference intensity that the ultrasonic wave frequency channel that ultrasonic wave transmitter sent at present corresponds is, corresponds interference intensity with the ultrasonic wave frequency channel that ultrasonic wave transmitter sent at present in the ultrasonic wave interference intensity data, if: the current ultrasonic frequency band transmitted by the ultrasonic transmitter is between 23KHz and 24KHz, and the ultrasonic frequency band in the ultrasonic interference intensity data is the interference intensity corresponding to the current ultrasonic frequency band transmitted by the ultrasonic transmitter, namely the interference intensity of 23KHz to 24 KHz.

In one embodiment, the step of determining the interference strength corresponding to the current ultrasonic frequency band transmitted by the ultrasonic transmitter according to the ultrasonic interference strength data in the preset time period includes: analyzing the ultrasonic interference intensity data in a preset time period to determine the comprehensive interference intensity of the ultrasonic frequency band; and determining the interference intensity corresponding to the ultrasonic frequency band currently transmitted by the ultrasonic transmitter according to the comprehensive interference intensity of the ultrasonic frequency band.

When the number of times of detecting the ultrasonic interference intensity in the preset time period is greater than or equal to two times, the ultrasonic interference intensity detected at each time point in the ultrasonic interference intensity data is comprehensively analyzed to obtain the comprehensive interference intensity of the ultrasonic frequency band, namely, the ultrasonic interference intensities with a plurality of frequency ranges of 22KHz-27KHz are comprehensively integrated into the ultrasonic interference intensity with a frequency range of 22KHz-27 KHz. And judging the interference intensity corresponding to the ultrasonic frequency band currently transmitted by the ultrasonic transmitter in the comprehensive interference intensity of the ultrasonic frequency band.

Step S260, when the interference intensity corresponding to the currently transmitted ultrasonic frequency band of the ultrasonic transmitter is greater than or equal to the preset threshold, the currently transmitted ultrasonic frequency band is switched.

The preset threshold is used for defining the degree of interference resistance, the currently transmitted ultrasonic waves which are greater than or equal to the preset threshold are easily interfered to influence the judgment of ultrasonic wave proximity induction, and the currently transmitted ultrasonic waves cannot influence normal ultrasonic wave proximity induction if the preset threshold is smaller than the preset threshold, so that the preset threshold can be determined according to the judgment of the ultrasonic wave proximity induction. When the interference intensity corresponding to the currently transmitted ultrasonic frequency band of the ultrasonic transmitter is greater than or equal to the preset threshold value, the judgment of the ultrasonic proximity induction is influenced, the currently transmitted ultrasonic frequency band is switched to the ultrasonic frequency band which does not influence the judgment of the ultrasonic proximity induction to transmit ultrasonic waves.

In one embodiment, when the interference intensity corresponding to the currently transmitted ultrasonic frequency band of the ultrasonic transmitter is greater than or equal to a preset threshold, the step of switching the currently transmitted ultrasonic frequency band includes: when the interference intensity corresponding to the currently transmitted ultrasonic frequency band of the ultrasonic transmitter is greater than or equal to a preset threshold, determining an available ultrasonic frequency band with the interference intensity smaller than the preset threshold according to ultrasonic interference intensity data in a preset time period; and switching the currently transmitted ultrasonic frequency band into an ultrasonic frequency band within the available ultrasonic frequency band.

The usable ultrasonic frequency band is an ultrasonic frequency range with interference intensity smaller than a preset threshold value. And selecting an ultrasonic frequency band in the ultrasonic frequency range with the interference intensity smaller than the preset threshold value, and using the ultrasonic frequency band as the ultrasonic frequency band currently transmitted by the ultrasonic transmitter to transmit ultrasonic waves. The selection mode can select an ultrasonic frequency band with the minimum interference intensity, and can also further judge and select the ultrasonic frequency band currently transmitted by the ultrasonic transmitter according to the actual ultrasonic proximity induction effect.

According to the ultrasonic proximity sensing method, the interference intensity corresponding to the ultrasonic frequency band currently transmitted by the ultrasonic transmitter is determined by acquiring the ultrasonic interference intensity data detected within the preset time period in real time, when the interference intensity corresponding to the ultrasonic frequency band currently transmitted by the proximity sensing is greater than or equal to the preset threshold value, the fact that other equipment transmits the ultrasonic wave of the ultrasonic frequency band in the current environment is explained, the influence of the ultrasonic wave transmitted by other equipment can be avoided by switching the ultrasonic frequency band currently transmitted by the ultrasonic transmitter, and the accuracy of ultrasonic proximity sensing identification is improved.

It should be understood that although the various steps in the flow charts of fig. 1-2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-2 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least some of the other steps.

In one embodiment, as shown in FIG. 3, there is provided an ultrasonic proximity sensing device comprising: a data acquisition module 310, an interference strength determination module 320 and an ultrasonic frequency band switching module 330, wherein:

a data acquiring module 310, configured to acquire ultrasonic interference intensity data detected within a preset time period in real time;

the interference strength determining module 320 is configured to determine, according to the ultrasonic interference strength data in the preset time period, an interference strength corresponding to an ultrasonic frequency band currently transmitted by the ultrasonic transmitter;

the ultrasonic frequency band switching module 330 is configured to switch the currently transmitted ultrasonic frequency band when the interference intensity corresponding to the currently transmitted ultrasonic frequency band of the ultrasonic transmitter is greater than or equal to a preset threshold.

In one embodiment, as shown in fig. 4, the ultrasonic proximity sensing apparatus further comprises: the interference intensity detection module 340 is configured to acquire audio data of a current environment recorded by a microphone in real time; performing spectrum analysis according to the environmental audio data of the current environment to obtain a spectrum analysis result; and determining the ultrasonic interference intensity of the current environment according to the spectrum analysis result.

In one embodiment, the interference strength detection module 340 is further configured to obtain the current ultrasonic frequency band and the coding information transmitted by the ultrasonic transmitter; filtering the frequency spectrum analysis result according to the current ultrasonic frequency band and the coding information transmitted by the ultrasonic transmitter to obtain a noise frequency spectrum; and determining the ultrasonic interference intensity of the current environment according to the noise spectrum.

In one embodiment, the interference strength detection module 340 is further configured to determine the interference strength of the ultrasonic wave in the frequency range of 22KHz to 27KHz in the current environment according to the result of the spectrum analysis.

In one embodiment, the interference strength determination module 320 is further configured to: analyzing the ultrasonic interference intensity data in a preset time period to determine the comprehensive interference intensity of the ultrasonic frequency band; and determining the interference intensity corresponding to the ultrasonic frequency band currently transmitted by the ultrasonic transmitter according to the comprehensive interference intensity of the ultrasonic frequency band.

In one embodiment, the ultrasonic band switching module 330 is further configured to: when the interference intensity corresponding to the currently transmitted ultrasonic frequency band of the ultrasonic transmitter is greater than or equal to a preset threshold, determining an available ultrasonic frequency band with the interference intensity smaller than the preset threshold according to ultrasonic interference intensity data in a preset time period; and switching the currently transmitted ultrasonic frequency band into an ultrasonic frequency band within the available ultrasonic frequency band.

In one embodiment, the interference strength detection module 340 is further configured to obtain audio data of a current environment recorded in real time by a microphone on a back of the mobile terminal, where the back of the mobile terminal is a side opposite to a display screen of the mobile terminal.

For specific limitations of the ultrasonic proximity sensing apparatus, reference may be made to the above limitations of the ultrasonic proximity sensing method, which are not described herein again. The modules in the ultrasonic proximity sensing apparatus can be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.

In one embodiment, a computer device is provided, which may be a mobile terminal, and its internal structure diagram may be as shown in fig. 5. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless communication can be realized through WIFI, an operator network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement an ultrasonic proximity sensing method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.

Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.

In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:

acquiring ultrasonic interference intensity data detected in a preset time period in real time; determining the interference intensity corresponding to the current ultrasonic frequency band transmitted by the ultrasonic transmitter according to the ultrasonic interference intensity data in the preset time period; and when the interference intensity corresponding to the currently transmitted ultrasonic frequency band of the ultrasonic transmitter is greater than or equal to a preset threshold value, switching the currently transmitted ultrasonic frequency band.

In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring audio data of a microphone recording the current environment in real time; performing spectrum analysis according to the environmental audio data of the current environment to obtain a spectrum analysis result; and determining the ultrasonic interference intensity of the current environment according to the spectrum analysis result.

In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring an ultrasonic frequency band and coding information currently transmitted by an ultrasonic transmitter; filtering the frequency spectrum analysis result according to the current ultrasonic frequency band and the coding information transmitted by the ultrasonic transmitter to obtain a noise frequency spectrum; and determining the ultrasonic interference intensity of the current environment according to the noise spectrum.

In one embodiment, the processor, when executing the computer program, further performs the steps of: and according to the frequency spectrum analysis result, determining the ultrasonic interference intensity in the frequency range of 22KHz-27KHz in the current environment.

In one embodiment, the processor, when executing the computer program, further performs the steps of: analyzing the ultrasonic interference intensity data in a preset time period to determine the comprehensive interference intensity of the ultrasonic frequency band; and determining the interference intensity corresponding to the ultrasonic frequency band currently transmitted by the ultrasonic transmitter according to the comprehensive interference intensity of the ultrasonic frequency band.

In one embodiment, the processor, when executing the computer program, further performs the steps of: when the interference intensity corresponding to the currently transmitted ultrasonic frequency band of the ultrasonic transmitter is greater than or equal to a preset threshold, determining an available ultrasonic frequency band with the interference intensity smaller than the preset threshold according to ultrasonic interference intensity data in a preset time period; and switching the currently transmitted ultrasonic frequency band into an ultrasonic frequency band within the available ultrasonic frequency band.

In one embodiment, the processor, when executing the computer program, further performs the steps of: and acquiring audio data of the current environment recorded in real time by a microphone on the back of the mobile terminal, wherein the back of the mobile terminal is a surface opposite to a display screen of the mobile terminal.

In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:

acquiring ultrasonic interference intensity data detected in a preset time period in real time; determining the interference intensity corresponding to the current ultrasonic frequency band transmitted by the ultrasonic transmitter according to the ultrasonic interference intensity data in the preset time period; and when the interference intensity corresponding to the currently transmitted ultrasonic frequency band of the ultrasonic transmitter is greater than or equal to a preset threshold value, switching the currently transmitted ultrasonic frequency band.

In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring audio data of a microphone recording the current environment in real time; performing spectrum analysis according to the environmental audio data of the current environment to obtain a spectrum analysis result; and determining the ultrasonic interference intensity of the current environment according to the spectrum analysis result.

In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring an ultrasonic frequency band and coding information currently transmitted by an ultrasonic transmitter; filtering the frequency spectrum analysis result according to the current ultrasonic frequency band and the coding information transmitted by the ultrasonic transmitter to obtain a noise frequency spectrum; and determining the ultrasonic interference intensity of the current environment according to the noise spectrum.

In one embodiment, the computer program when executed by the processor further performs the steps of: and according to the frequency spectrum analysis result, determining the ultrasonic interference intensity in the frequency range of 22KHz-27KHz in the current environment.

In one embodiment, the computer program when executed by the processor further performs the steps of: analyzing the ultrasonic interference intensity data in a preset time period to determine the comprehensive interference intensity of the ultrasonic frequency band; and determining the interference intensity corresponding to the ultrasonic frequency band currently transmitted by the ultrasonic transmitter according to the comprehensive interference intensity of the ultrasonic frequency band.

In one embodiment, the computer program when executed by the processor further performs the steps of: when the interference intensity corresponding to the currently transmitted ultrasonic frequency band of the ultrasonic transmitter is greater than or equal to a preset threshold, determining an available ultrasonic frequency band with the interference intensity smaller than the preset threshold according to ultrasonic interference intensity data in a preset time period; and switching the currently transmitted ultrasonic frequency band into an ultrasonic frequency band within the available ultrasonic frequency band.

In one embodiment, the computer program when executed by the processor further performs the steps of: and acquiring audio data of the current environment recorded in real time by a microphone on the back of the mobile terminal, wherein the back of the mobile terminal is a surface opposite to a display screen of the mobile terminal.

It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.

The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.

The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

14页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于超声波的自动门控制方法及系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!