CN108736982A - Acoustic communication processing method, device and electronic equipment - Google Patents

Acoustic communication processing method, device and electronic equipment Download PDF

Info

Publication number
CN108736982A
CN108736982A CN201710271863.6A CN201710271863A CN108736982A CN 108736982 A CN108736982 A CN 108736982A CN 201710271863 A CN201710271863 A CN 201710271863A CN 108736982 A CN108736982 A CN 108736982A
Authority
CN
China
Prior art keywords
sound
energy
frequency point
signal
value corresponding
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.)
Granted
Application number
CN201710271863.6A
Other languages
Chinese (zh)
Other versions
CN108736982B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710271863.6A priority Critical patent/CN108736982B/en
Publication of CN108736982A publication Critical patent/CN108736982A/en
Application granted granted Critical
Publication of CN108736982B publication Critical patent/CN108736982B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B11/00Transmission systems employing sonic, ultrasonic or infrasonic waves
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/02Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using spectral analysis, e.g. transform vocoders or subband vocoders
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/48Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0033Systems modifying transmission characteristics according to link quality, e.g. power backoff arrangements specific to the transmitter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L27/00Modulated-carrier systems
    • H04L27/02Amplitude-modulated carrier systems, e.g. using on-off keying; Single sideband or vestigial sideband modulation
    • H04L27/04Modulator circuits; Transmitter circuits
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L27/00Modulated-carrier systems
    • H04L27/02Amplitude-modulated carrier systems, e.g. using on-off keying; Single sideband or vestigial sideband modulation
    • H04L27/08Amplitude regulation arrangements
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Quality & Reliability (AREA)
  • Telephone Function (AREA)

Abstract

This application provides a kind of acoustic communication processing methods,Device and electronic equipment,After the effective voice signal for obtaining current scene,Since effective voice signal includes the environmental sound signal of current scene and the acoustic signals that electronic equipment plays,The application is by obtaining corresponding ambient sound energy value and acoustic wave energy value at least one of effective voice signal Frequency point,To which the signal-to-noise ratio of acoustic communication under current scene be calculated,And then it is based on the signal-to-noise ratio,The sound wave for adjusting Audio Players configures parameter,Ensure that the amplitude for the acoustic signals that the Audio Players reconfigured according to the sound wave configuration parameter after adjustment play adapts to current scene,The acoustic signals for avoiding broadcasting are sheltered by ambient noise,Ensure that recipient can effectively detect the acoustic signals,Improve the correctness and reliability of gained transmission data.

Description

Sound wave communication processing method and device and electronic equipment
Technical Field
The present application relates generally to the field of acoustic communications technologies, and in particular, to a method and an apparatus for processing acoustic communications, and an electronic device.
Background
The sound wave communication is that single frequency sound signals or multi-frequency mixed sound signals are utilized to encode and modulate data and then play the data, and a receiver identifies corresponding frequency after collecting the sound wave signals, so that the sound wave signals are demodulated by utilizing modulation rules to obtain corresponding data.
In the prior art, a fixed frequency point group communication mode is usually adopted to realize dual-transmission communication, that is, a data sender and a data receiver agree in advance to establish a mapping table of correspondence between original data and a frequency point group, so that the sender performs acoustic wave coding on the data according to the mapping table of correspondence and sends the data out in an acoustic wave mode, the receiver performs energy detection according to the agreed frequency domain of the frequency point group, and decodes detected acoustic wave signals according to the mapping table of correspondence to obtain transmitted data.
However, since the sound wave belongs to a mechanical wave, the sound wave is easily interfered by other sounds of the external environment, and the sound wave signal is even masked by the environmental noise, so that the receiver may erroneously determine the noise frequency point as the sound wave signal, which results in that the receiver cannot decode the transmission data or decode the error data, thereby reducing the accuracy and reliability of data transmission.
Disclosure of Invention
In view of this, the present application provides a sound wave communication processing method and apparatus, and an electronic device, which implement adjustment of sound wave configuration parameters of the electronic device by tracking an environmental sound energy value and a sound wave energy value and using an obtained signal-to-noise ratio of sound wave communication in a current scene, and increase an amplitude of a sound wave signal played by the electronic device in a scene with large environmental noise, thereby ensuring that the sound wave signal can be effectively detected by reception, and improving accuracy and reliability of transmission data.
In order to achieve the above object, the present application provides the following technical solutions:
the embodiment of the application provides an acoustic wave communication processing method, which comprises the following steps:
obtaining an effective sound signal of a current scene, wherein the effective sound signal comprises an environmental sound signal of the current scene and a sound wave signal played by electronic equipment;
acquiring an environment sound energy value and a sound wave energy value corresponding to at least one frequency point in the effective sound signal;
calculating the signal-to-noise ratio of sound wave communication under the current scene by using the environmental sound energy value and the sound wave energy value;
and adjusting sound wave configuration parameters of the electronic equipment based on the signal-to-noise ratio, wherein the sound wave configuration parameters comprise the amplitude of the sound wave signal played by the electronic equipment.
An embodiment of the present application further provides an acoustic wave communication processing apparatus, the apparatus includes:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring effective sound signals of a current scene, and the effective sound signals comprise environmental sound signals of the current scene and sound wave signals played by electronic equipment;
the energy acquisition module is used for acquiring an environment sound energy value and an acoustic wave energy value corresponding to at least one frequency point in the effective sound signal;
the signal-to-noise ratio calculation module is used for calculating the signal-to-noise ratio of sound wave communication under the current scene by utilizing the environment sound energy value and the sound wave energy value;
and the configuration parameter adjusting module is used for adjusting the sound wave configuration parameters of the electronic equipment based on the signal-to-noise ratio, wherein the sound wave configuration parameters comprise the amplitude of the sound wave signal played by the electronic equipment.
An embodiment of the present application further provides an electronic device, where the electronic device includes:
the sound collector is used for collecting effective sound signals of a current scene, and the effective sound signals comprise environmental sound signals of the current scene and sound wave signals played by the electronic equipment;
a memory for storing an acoustic wave communication processing program;
a sound player for outputting a sound wave signal;
a processor for executing the acoustic wave communication processing program, comprising:
acquiring an environment sound energy value and a sound wave energy value corresponding to at least one frequency point in the effective sound signal;
calculating the signal-to-noise ratio of sound wave communication under the current scene by using the environmental sound energy value and the sound wave energy value;
and adjusting sound wave configuration parameters of the electronic equipment based on the signal-to-noise ratio, wherein the sound wave configuration parameters comprise the amplitude of the sound wave signal played by the electronic equipment.
Based on the above technical solution, in the embodiment of the present application, after obtaining the valid audio signal of the current scene, because the effective sound signal comprises the environment sound and the sound wave signal played by the electronic equipment, the signal-to-noise ratio of sound wave communication under the current scene is calculated by acquiring the environment sound energy value and the sound wave energy value corresponding to at least one frequency point in the effective sound signal, therefore, based on the signal-to-noise ratio, the sound wave configuration parameters of the electronic equipment, such as the amplitude of the sound wave signal played by the sound player, are adjusted, especially under the condition that the environmental noise of the current scene is relatively large, by increasing the amplitude of the sound wave signal played by the electronic equipment, the sound wave signal played by the electronic equipment is prevented from being masked by environmental noise, the sound wave signal can be effectively detected by a receiving party, and the correctness and the reliability of the obtained transmission data are improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a hardware structure diagram of an electronic device according to an embodiment of the present disclosure;
fig. 2 is a payment application interface for acoustic communication according to an embodiment of the present application;
fig. 3 is a timing diagram of an acoustic wave communication processing method according to an embodiment of the present application;
fig. 4 is a timing diagram of another acoustic communication processing method according to an embodiment of the present application;
fig. 5 is a flowchart illustrating a closed-loop control of a method for processing acoustic wave communication according to an embodiment of the present application;
fig. 6 is a structural diagram of an acoustic wave communication processing apparatus according to an embodiment of the present application;
fig. 7 is a block diagram of another acoustic wave communication processing apparatus according to an embodiment of the present application;
fig. 8 is a block diagram of another acoustic wave communication processing apparatus according to an embodiment of the present application;
fig. 9 is a structural diagram of another acoustic wave communication processing apparatus according to an embodiment of the present application.
Detailed Description
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, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, a hardware structure diagram of an electronic device provided in the embodiment of the present application is shown, where the electronic device may be used to implement the acoustic wave communication processing method provided in the embodiment of the present application, and in practical applications, the electronic device may be a mobile phone, a tablet computer, a multifunctional POS machine, and the application does not limit a product type of the electronic device. In this embodiment, the electronic device may include: a sound collector 11, a memory 12, a processor 13 and a sound player 14.
The sound collector 11 may be configured to collect effective sound signals in a current scene where the electronic device is located, such as an environmental sound signal and a sound wave signal played by the electronic device.
In this embodiment, the sound collector 11 may be a microphone, and the present application does not limit the composition structure of the sound collector 11.
The memory 12 can be used for storing the effective sound signals acquired by the sound collector 11, and also can be used for storing a program used for the processor to realize sound wave communication, intermediate data generated in the process of executing the program, and the like.
Optionally, the memory 12 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk memory, or the like.
The processor 13 may be configured to execute the program stored in the memory to implement the acoustic wave communication method, and the specific implementation process may refer to the following description of the method embodiment, which is not described in detail herein.
In this Application, the processor 13 may be a central processing unit CPU, or an Application Specific Integrated Circuit ASIC (Application Specific Integrated Circuit), or one or more Integrated circuits configured to implement the embodiments of the present Application, and the present Application does not limit the composition structure of the processor 13.
The sound player 14 may be a speaker, and in practical application of the present embodiment, after the processor 13 completes edge modulation on the transmission data, the sound player 14 may output a sound wave signal carrying the transmission data.
In practical application, when a user needs to use the electronic device for transaction payment, in order to ensure that a counterpart can detect an effective sound wave signal, the electronic device dynamically adjusts the amplitude of the sound wave signal played by the sound player through an ambient noise self-checking mode of a current scene, and particularly increases the signal amplitude of a sound wave signal modulation frequency point played by the sound player when a noise ratio of the current scene is detected to be larger, so as to increase the signal-to-noise ratio and prevent the sound wave signal played by the electronic device from being masked by ambient noise.
Therefore, according to the sound wave communication scheme provided by the application, before sound wave communication is carried out, the electronic equipment can utilize effective sound signals of the current scene, such as environmental sound and sound wave signals, to automatically adjust the sound wave configuration parameters of the electronic equipment, and correspondingly increase the amplitude of the played sound wave signals, so that the volume of the output sound wave signals is increased, a sound wave signal receiver can reliably detect the sound wave signals, and the reliability of the sound wave communication is improved.
In addition, in the process of sound wave communication, the dynamic adjustment of the amplitude of the sound wave signal played by the sound player can be realized by utilizing the detected environmental sound signal and the energy value of the sound wave signal played by the environmental sound signal, so that the application of sound wave communication is ensured to be reliably completed.
For the dynamic adjustment process of the amplitude of the sound wave signal played by the sound player, reference may be made to the following description of method embodiments, which are not described in detail herein.
Optionally, the hardware structure of the electronic device of the present application is not limited to the above-described components, and may further include a communication interface 15, a communication bus, and the like, so that the sound collector 11, the memory 12, the processor 13, the sound player 14, and the communication interface 15 of the electronic device communicate with each other through the communication bus.
The communication interface 15 may be an interface of a wireless communication module, or an interface of a wired communication module, such as a USB interface, an interface of a GSM module, an interface of a WIFI module, or the like.
In the practical application of the electronic device, the electronic device is used for transaction payment as an example for explanation, after a user triggers a payment application program of the electronic device, the electronic device is controlled to establish communication connection with a service server of the payment application, so that the service server provides payment service for the electronic device, and a specific implementation process is not described in detail. When the payment is completed in the transaction, as shown in fig. 2, a "sound wave payment" mode may be triggered, so as to control the sound player to emit sound waves, establish sound wave communication with the receiving party, and complete the payment in the transaction.
It should be noted that, in practical applications, the sound wave communication related to the electronic device is not limited to the above listed transaction payment application scenarios, but may also be used in application scenarios such as file transmission, WIFI hotspot pairing, business card identification, and the like, and the application processes are similar, and the details of the application are not described herein.
Based on the hardware structure diagram of the electronic device shown in fig. 1, as shown in fig. 3, a timing chart of an acoustic wave communication processing method provided in an embodiment of the present application may be applied to the electronic device, a composition structure of the electronic device may be described with reference to the above embodiment, which is not described in detail herein, and in practical applications, the acoustic wave communication processing method provided in the embodiment may include the following steps:
step S31, the sound collector obtains the effective sound signal of the current scene;
in the application, the electronic device utilizes the signal-to-noise ratio to dynamically adjust the energy value of the sound wave signal played by the sound player of the electronic device, so that the sound wave signal played by the electronic device can be effectively detected by a receiving party, and reliable data transmission is completed. In order to obtain the signal-to-noise ratio in the current scene, the effective sound signal of the current scene can be collected by the sound collector of the electronic device.
According to different current scenes and different working conditions of the electronic device, the effective sound signal may include an environmental sound signal (such as human voice, music, mechanical sound, and the like) and a sound wave signal carrying transmission data played by the electronic device, and of course, in a scene in which the sound wave signal is not played by the electronic device, the obtained effective sound signal may include the environmental sound signal.
Therefore, in different scenes or different communication stages, the effective sound signals collected by the sound collector include different contents, and in a general case, the effective sound signals include the environmental sound signals of the current scene and the sound wave signals played by the electronic device.
Step S32, the sound collector sends the effective sound signal to the processor;
step S33, the processor carries out spectrum analysis on the effective sound signal to obtain at least one frequency point in the effective sound signal and an effective sound energy value corresponding to the frequency point;
the spectrum analysis is a method for transforming a time domain signal into a frequency domain for analysis, and in general, the spectrum analysis can decompose a complex time history waveform into a plurality of single harmonic components through fourier transform for research so as to obtain a frequency structure of the signal and information of each harmonic and phase.
In this embodiment, by performing spectrum analysis on the effective sound signal, the amplitude, phase, or energy transformation of the effective sound signal can be represented by a frequency coordinate axis, so as to analyze the frequency characteristics of the effective sound signal. Specifically, in this embodiment, through spectrum analysis of the effective sound signal, each frequency component and frequency distribution range in the effective sound signal, and amplitude distribution and energy distribution of each frequency component can be known, so as to obtain frequency values of the main amplitude and energy distribution, and further determine at least one frequency point in the effective sound signal and a first energy value corresponding to each frequency point.
Optionally, the spectrum analysis of the effective sound signal may be directly implemented by using a conventional Fast Fourier Transform (FFT) spectrum analysis method, but is not limited thereto; of course, on the basis, the band-pass filtering analysis method can be used for smoothing the obtained effective sound signal, so that the reliability of the frequency spectrum analysis result of the effective sound signal is improved.
The present application does not describe the band-pass filtering process of the effective sound signal and the analysis process of the spectrum analysis method in detail.
Step S34, the processor calculates the environmental sound energy value and the sound wave energy value corresponding to at least one frequency point by using the obtained effective sound energy value corresponding to the at least one frequency point and the first energy calculation rule;
the energy value corresponding to the frequency point of the sound signal may refer to a power value corresponding to the frequency point, which is usually positively correlated with the amplitude of the sound signal, i.e. with the volume of the sound signal.
In this embodiment, an energy calculation rule for each frequency point of the environmental sound signal and an energy calculation rule for each frequency point of the sound wave signal may be preset, where the content of the energy calculation rule is related to whether the frequency point of the corresponding signal is a historical frame modulation frequency point of the sound wave signal played by the sound player, and the content of the energy calculation rule may be described in detail with reference to the following embodiments, but is not limited to the calculation manner described in this application.
In practical applications, an electronic device records a sound wave signal output by its sound player, and the sound wave signal is obtained by modulating certain frequency points in a frequency domain. Therefore, the modulation frequency point at each time can be known by querying the history playing record, that is, the history frame modulation frequency point is obtained.
Optionally, since the ambient sound signal is a sound signal other than the non-sound wave signal, and generally includes background ambient noise, human voice, and the like, from the sound characteristic analysis, the application may divide the ambient sound signal into the steady-state sound signal xstableAnd an unsteady sound signal xunstableWherein, the fluctuation of the steady state sound energy value with time is small, and the fluctuation of the unsteady state sound energy value with time change is usually large, which will cause that the error of the unsteady state sound energy value obtained by calculation is large under the condition that the time difference between the playing time and the collecting time is large, under the condition, the steady state sound signal x is used for calculating the unsteady state sound energy value, and under the condition, the method and the device have the advantages that the steady state sound signal x is used for generating the unsteady statestableAnd an unsteady state sound signal xunstableWhen the superposition is performed, the proportion of the unsteady sound signal can be adjusted accordingly.
Based on this, in order to track the ambient sound energy value more accurately, the present application may track and estimate the steady-state sound energy value and the unsteady-state sound energy value respectively, and then obtain the ambient sound energy value by calculating the linear weighting value of the two tracking values, but the present application is not limited to the calculation method of the ambient sound signal energy value described in this embodiment.
Step S35, the processor calculates the signal-to-noise ratio of the sound wave communication under the current scene by using the environmental sound energy value and the sound wave energy value;
the SIGNAL-to-NOISE RATIO (SNR) refers to a RATIO of a SIGNAL to a NOISE in an electronic device or an electronic system, and the embodiment may refer to a RATIO of an acoustic energy value to an ambient acoustic energy value.
Optionally, in this embodiment, in order to ensure that the receiving party can effectively detect the acoustic wave signal, the signal-to-noise ratio calculation formula may be defined as: the SNR is equal to, but not limited to, a ratio of a minimum sound energy value to a maximum ambient sound energy value corresponding to the plurality of frequency points.
Step S36, the processor adjusts the sound wave configuration parameters of the sound player by using the signal-to-noise ratio, and performs sound wave configuration on the sound player by using the adjusted sound wave configuration parameters;
in combination with the above description, the present application may utilize the signal-to-noise ratio of the current scene of the electronic device to achieve dynamic adjustment of sound wave configuration parameters such as the amplitude of the sound wave signal played by the sound player, based on which, after the processor calculates the signal-to-noise ratio of the current scene, a corresponding adjustment instruction may be generated and sent to the sound player according to a preset rule to adjust the original sound wave configuration parameters of the sound player, and the sound player may be reconfigured according to the adjusted sound wave configuration parameters, so as to change the amplitude of the sound wave signal played by the sound player, and ensure that the receiver can detect an effective sound wave signal.
It should be noted that, after the signal-to-noise ratio is calculated, the process of adjusting the amplitude of the sound wave signal played by the sound player is not limited to the above-described manner of generating the adjustment instruction; in other words, the content indicated by the adjustment command is not limited in the present application, and may be a control command, a signal obtained by calculation, or the like.
The preset rule can indicate that when the signal-to-noise ratio is small, an adjusting instruction for increasing the amplitude of the sound wave signal is generated; on the contrary, the amplitude of the sound wave signal may be kept unchanged or the adjustment instruction of the amplitude of the sound wave signal may be properly reduced, and the content included in the preset rule is not limited, and the output form of the preset rule is not limited, and may be a mapping table of the correspondence between the preset signal-to-noise ratio and each adjustment instruction (or the adjustment manner, such as amplification or reduction, of the amplitude of the sound wave signal output by the sound player), or may be a preset mapping function, and the like.
Optionally, in the present application, dynamic control on the amplitude of the acoustic wave signal may be implemented by using a closed-loop control principle, and after a ratio of the acoustic wave energy value to the environmental sound energy value is obtained through calculation, and a signal-to-noise ratio of the acoustic wave communication is obtained, the present embodiment may further calculate a closed-loop gain for adjusting the amplitude of the acoustic wave signal, where the closed-loop gain G may be equal to a ratio of a preset threshold value to a signal-to-noise ratio, where the preset threshold value may be set according to factors such as a product type of the electronic device and an application scenario, and the present application does not limit specific values thereof.
In practical applications, the processor may superimpose the closed loop gain on a signal obtained by code modulating the transmission data, so as to generate an adjustment instruction corresponding to the superimposed signal, but is not limited thereto.
And step S37, the sound player detects the trigger instruction and plays the sound wave signal according to the adjusted sound wave configuration parameters.
In this embodiment, when the electronic device needs to perform sound wave communication, the sound wave communication button of the corresponding application program of the electronic device may be triggered to generate a corresponding trigger instruction, and the trigger instruction is sent to the sound player.
Optionally, the adjustment of the amplitude of the sound wave signal played by the sound player may be implemented by adjusting an output volume or an input power of the sound player. Taking the volume adjustment as an example, when the calculated signal-to-noise ratio is smaller than a certain threshold, it indicates that the noise of the scene where the electronic device is located is large at this time, the processor may generate an adjustment instruction for increasing the volume and send the adjustment instruction to the sound player, so that the sound player responds to the adjustment instruction, the volume of the sound wave output by the sound player is increased, the signal-to-noise ratio is increased, the output sound wave signal is prevented from being masked by the environmental noise signal, and the receiver is ensured to be able to effectively detect the sound wave signal.
Therefore, the energy value or the speaking amplitude corresponding to each frequency point of the played sound wave signal is dynamically adjusted by tracking the energy value of the environment sound signal and the energy value of the sound wave signal in real time and utilizing the obtained signal to noise ratio, so that the technical problem that in sound wave communication in the prior art, the sound wave signal played by a sound player is masked by the environment sound signal and a receiving party detects errors or cannot detect transmitted data because the amplitude of the sent sound wave signal is fixed and cannot adapt to different environment sound scenes is solved.
Referring to fig. 4, which is a flowchart of another acoustic wave communication processing method provided in this embodiment of the present application, this embodiment mainly describes a process of calculating an environmental sound signal energy value and an acoustic wave signal energy value by a processor, and for the explanation of other steps of this embodiment, reference may be made to the description of corresponding parts in the above embodiment, which is not described herein again, and this embodiment may include the following steps:
step S41, carrying out spectrum analysis on the effective sound signal obtained by the sound collector to obtain at least one frequency point in the effective sound signal and an effective sound energy value corresponding to the frequency point;
in the present embodiment, the valid sound signal obtained for t consecutive times may be taken as one frame, for example, every 20ms may be taken as one frame sound signal. For each frame of continuously obtained audio signals, at least one frequency point corresponding to the sound wave modulation is usually selected from the frequency spectrum through spectrum analysis, and herein, the value of the frequency point number may be denoted as k, and the frame number of each obtained frame of audio signals may be denoted as i.
For example, the sound wave communication selects four frequency points 20, 21, 22, and 23 as modulation frequency points, and when the present embodiment estimates the tracking of the environmental sound energy, only the four frequency points may be tracked, where k is 20, 21, 22, and 23, but is not limited to the frequency points listed in the present embodiment.
Step S42, judging whether the current frame frequency point k is the historical frame modulation frequency point, if yes, entering step S43; if not, go to step S45;
in this embodiment, when calculating the environmental sound energy estimated value and the acoustic wave energy estimated value corresponding to each frequency point, in order to avoid mistakenly considering the acoustic wave signal as the environmental sound for energy tracking estimation, it may be determined whether each frequency point of the current frame is an acoustic wave modulation frequency point, that is, a historical frame modulation frequency point of the electronic device.
In practical applications, a certain time difference usually exists between two operations of outputting a sound wave signal by a sound player of an electronic device and obtaining an effective sound signal by a sound collector, and this time difference can be used in this embodiment to realize a corresponding relationship between a played sound wave signal and an effective sound signal, so as to determine whether a current frame frequency point of the effective sound signal is a corresponding historical frame modulation frequency point.
For example, the sound signal acquired by the sound acquisition device may be the result of playing the nth frame before the sound signal is acquired, where n represents the time difference between the playing time of the sound signal and the acquisition time, and the modulation frequency point of the nth frame may be determined by querying the recorded historical frame sound wave modulation frequency point, and if the modulation frequency point is the same as the current frame frequency point, the environmental sound energy value may not be updated, and the environmental sound energy value corresponding to the frequency point k calculated in the previous frame is directly maintained; otherwise, the ambient sound energy value in the effective sound energy value corresponding to the current frame frequency point k needs to be recalculated according to a preset updated calculation formula, that is, a first calculation rule.
Optionally, the time difference may be obtained by a time delay estimation algorithm or a preset signal actual measurement, and the obtaining mode of the time difference is not limited in the present application.
The delay estimation algorithm may estimate the delay time difference between signals through the peak value of the autocorrelation function lag of the signals, and generally includes a weighted correlation delay estimation algorithm, a phase spectrum delay estimation calculation method, a self-adaptive delay estimation algorithm, and the like.
In addition, the actual measurement mode of the preset signal is an experimental mode of the electronic device, that is, the electronic device is controlled to perform multiple times of sound wave communication, so that the playing time and the collecting time of the sound wave signal recorded by the electronic device are utilized to obtain the time difference of the corresponding sound wave signal and the like.
Step S43, taking the environmental sound energy estimation value corresponding to the previous frame frequency point k as the environmental energy estimation value corresponding to the current frame frequency point k;
step S44, obtaining the acoustic energy estimation value corresponding to the previous frame frequency point k, and calculating the difference value between the effective sound energy value corresponding to the current frame frequency point k and the environmental sound energy estimation value;
in this embodiment, if it is determined that the current frame frequency point k is the historical frame modulation frequency point, it can be considered that the acoustic wave signal is not affected by the environmental sound at this time, and the acoustic wave signal receiving side can detect an effective acoustic wave signal, in this case, the estimated value of the environmental sound energy may not be determinedUpdating, and keeping the calculated estimated value of the environmental sound energy of the previous frame frequency pointThat is, when it is determined that the current frame frequency point is the historical frame modulation frequency point,
wherein, since the ambient sound signal is divided into a steady state sound signal and a non-steady state sound signal, the ambient sound energy estimation value may be a steady state sound energy estimation valueAnd unsteady state sound energy estimationThe sum of (a) and (b).
In conjunction with the above analysis, in the case where it is determined that the frequency point k of the current frame i is the modulation frequency point of the corresponding history frame,the estimated value of the environmental sound energy corresponding to the frequency point k of the current frame i
wherein, β and φ are two parameters for adjusting the steady state sound energy estimation value and the unsteady state sound energy estimation value, the application does not limit the specific values thereof, and the values of the two parameters can be adjusted according to the actual needs.
In addition, since various types of sound signals in the valid sound signals obtained by the sound collector are mixed, which often results in that the recognized ambient sound signals and the sound wave sound signals are not completely consistent with the actual signals, the ambient sound energy value and the sound wave energy value obtained by calculation in the present application are usually an estimated value.
Step S45, according to the first proportional relation, the difference value and the acoustic wave energy estimated value corresponding to the previous frame frequency point k are subjected to superposition operation to obtain the acoustic wave energy estimated value corresponding to the current frame frequency point k;
based on the above analysis, it can be known that the effective sound energy value is obtained by superimposing the estimated environmental sound energy value and the estimated sound energy value according to a certain weight relationship, so that the effective sound energy corresponding to the current frame rate point k is obtained in this embodimentValue X (i, k) and an estimate of ambient sound energyThen, the acoustic energy estimated value corresponding to the current frame frequency point k can be obtained by calculation according to the formula (1)But is not limited to such a calculation formula as defined herein.
The first proportional relationship may be determined based on the value of phi.
Step S46, determining the acoustic wave energy estimated value corresponding to the previous frame frequency point k as the acoustic wave energy estimated value corresponding to the current frame frequency point k;
in this embodiment, when it is determined that the current frame frequency point k is not the historical frame modulation frequency point, it can be considered that the acoustic energy estimation value is present at this timeAcoustic energy estimate corresponding to corresponding frequency point of previous frameAre identical, i.e. thatIn this case, the receiving side cannot detect a valid sound wave signal, so that it cannot obtain correct transmission data, and the volume of the sound wave signal output by the sound player needs to be adjusted.
Step S47, according to a third proportional relation, performing superposition operation on the effective sound energy value corresponding to the current frame frequency point k and the steady state energy estimation value corresponding to the previous frame frequency point k to obtain a steady state sound energy estimation value corresponding to the current frame frequency point k;
optionally, when it is determined that the current frame frequency point k is not the historical frame modulation frequency point, this embodiment may use the effective sound energy X (i, k) corresponding to the current frame frequency point k and the steady-state sound energy estimated value corresponding to the previous frame frequency point kAccording to the formula (2), calculating the steady state sound energy estimated value corresponding to the current frame frequency pointBut is not limited to the calculation of equation (2).
Wherein,based on this, the third proportional relationship can be determined according to a.
Step S48, according to a fourth proportional relation, performing superposition operation on the effective sound energy value corresponding to the current frame frequency point k and the unsteady state sound energy estimation value corresponding to the previous 2 frame frequency point k to obtain the unsteady state sound energy estimation value corresponding to the current frame frequency point k;
optionally, when it is determined that the current frame frequency point k is not the historical frame frequency point, the present embodiment may perform the superposition operation by using the unsteady state sound energy estimation value corresponding to the effective sound energy X (i, k) corresponding to the current frame frequency point k and the previous m frame frequency point, where m is 2 as an example, but the present embodiment is not limited thereto.
Therefore, in this embodiment, the unsteady state sound energy corresponding to the current frame frequency point k is calculated according to the formula (3) by using the effective sound energy value X (i, k) corresponding to the current frame frequency point k and the estimated unsteady state sound energy values corresponding to the i-1 th frame and the i-2 th frame frequency point kQuantity estimationBut is not limited to this calculation of equation (3).
In the above formula (3), the parameter relationship before each energy or energy estimation value may be a fourth proportional relationship, and is not limited to 1.75, 1.5, and 0.25 described in the formula, and may be adjusted according to actual needs, and the present application is not listed here.
In addition, in the present application, the order of step S47 and step S48 is not limited, and both steps may be performed simultaneously, and the present embodiment is only for convenience of description of the technical solutions and commands the step numbers, but does not indicate the actual calculation order of the steady state sound energy estimation value and the unsteady state sound energy estimation value.
Step S49, according to a second proportional relation, performing superposition operation on the steady state sound energy estimation value and the unsteady state sound energy estimation value corresponding to the current frame frequency point k to obtain an environment sound energy estimation value corresponding to the current frame frequency point k;
in conjunction with the above analysis, the ambient sound signal is divided into a steady-state sound signal and a non-steady-state sound signal, and the present embodiment may calculate the ambient sound energy estimation value according to equation (4), but is not limited to this calculation method.
Optionally, in practical application of this embodiment, if the time difference n between the playing time and the collecting time of the calculated sound wave signal is large, for example, greater than a certain threshold, due to the time-varying characteristic of the energy of the unsteady state sound signal, an error of the energy estimation value of the unsteady state sound signal obtained by calculation is large, so that the accuracy of the energy estimation value of the environment sound signal is reduced. At this time, the present embodiment may adopt ways of reducing the signal acquisition amount, reducing the play buffer, and the like, to reduce the time difference, and improve the accuracy of the estimated value of the environmental sound energy.
however, after the adjustment, if the time difference is still larger, for example, still larger than a certain threshold, the parameters β and φ may be adjusted to reduce the proportion of the unsteady state sound signal energy estimation value in the entire ambient sound energy estimation value, so as to reduce the error of the ambient sound signal energy estimation value.
In addition, it should be noted that, when it is determined that the current frame frequency point k is not the historical frame modulation frequency point, the present application does not limit the calculation order of the acoustic energy estimation value and the environmental acoustic energy estimation value, and the step numbers are added only for convenience of description in this embodiment, and are not limited to the order described in this embodiment.
Step S410, calculating the signal-to-noise ratio of sound wave communication in the current scene by utilizing the environment sound energy estimated value and the sound wave energy estimated value which correspond to different frequency points of the multi-frame effective sound signals obtained through calculation;
optionally, in order to ensure that the receiving party can effectively detect the acoustic wave signal, the signal-to-noise ratio SNR (i) of the acoustic wave communication may be calculated by using formula (5), but is not limited to the calculation formula of formula (4).
Wherein,min represents the minimum and max represents the maximum.
Therefore, after the acoustic wave energy estimated values and the environmental sound energy estimated values corresponding to different frequency points of the multi-frame effective sound signals are obtained through calculation according to the method, the minimum acoustic wave energy estimated value and the maximum environmental energy estimated value can be selected and subjected to ratio operation, and the signal-to-noise ratio of the acoustic wave communication under the current scene is obtained.
Step S411, calculating the ratio of the preset threshold value to the signal-to-noise ratio, and performing closed-loop control on the amplitude of the sound wave signal played by the sound player by using the obtained closed-loop gain.
The closed-loop gain G (i) ═ T/SNR (i), where T is a preset threshold value, and a specific value of T may be determined according to an actual situation.
It should be noted that, regarding the manner of dynamically adjusting the amplitude of the sound wave signal by using the signal-to-noise ratio, the method is not limited to the closed-loop gain control manner described in this embodiment, and may also be implemented by using a mapping function manner, for example, a mapping table of correspondence between different signal-to-noise ratios and the amplitudes of the sound wave signals is pre-established, after the signal-to-noise ratio is obtained by calculation, the mapping table of correspondence may be directly queried to obtain the amplitude of the sound wave signal corresponding to the signal-to-noise ratio, and thus, the sound wave parameter configuration of the sound player is implemented, so that the sound player outputs the sound wave signal with. Of course, dynamic adjustment of the amplitude of the sound wave signal may also be implemented in other manners, and details of this application are not described herein.
In summary, the present application respectively calculates the energy estimation values of the steady-state sound and the unsteady-state sound in the environmental sound, and tracks and calculates the energy estimation value of the environmental sound in a linear weighting manner, so as to improve the accuracy of the energy estimation value of the environmental sound signal.
As shown in fig. 6, a block diagram of an acoustic wave communication apparatus provided in an embodiment of the present application may include:
an obtaining module 61, configured to obtain an effective sound signal of a current scene;
the effective sound signal may include an ambient sound signal of the current scene and a sound wave signal played by the electronic device.
An energy obtaining module 62, configured to obtain an ambient sound energy value and an acoustic wave energy value corresponding to at least one frequency point in the valid sound signal;
optionally, in practical applications, the present application may obtain at least one frequency point of the valid sound signal and a corresponding valid sound energy value thereof through a spectrum analysis method, and therefore, referring to fig. 6, the sound wave communication device provided by the present application may further include:
the spectrum analysis module 65 is configured to perform spectrum analysis on the valid sound signal to obtain at least one frequency point in the valid sound signal and a corresponding valid sound energy value.
Based on this, the energy obtaining module 62 may be specifically configured to calculate the estimated ambient sound energy value and the estimated sound energy value corresponding to the corresponding frequency point by using the obtained effective sound energy value corresponding to the at least one frequency point and the first energy calculation rule.
As shown in fig. 6, the energy obtaining module 62 may specifically include:
a judging unit 621, configured to judge whether the current frame frequency point is a historical frame modulation frequency point;
a first energy determining unit 622, configured to obtain an environmental sound energy estimated value and a sound wave energy estimated value corresponding to a previous frame corresponding to a frequency point if a determination result of the determining unit is yes, use the environmental sound energy estimated value corresponding to the previous frame corresponding to the frequency point as an environmental energy estimated value corresponding to a current frame frequency point, and perform a superposition operation on the effective sound energy corresponding to the current frame frequency point and the environmental sound energy estimated value, and the sound wave energy estimated value corresponding to the previous frame corresponding to the frequency point according to a first proportional relationship, to obtain a sound wave energy estimated value corresponding to the current frame frequency point;
and a second energy determining unit 623, configured to determine, if the determination result of the determining unit is negative, the acoustic energy estimated value corresponding to the corresponding frequency point of the previous frame as the acoustic energy estimated value corresponding to the frequency point of the current frame, calculate, using a second energy calculation rule, the steady-state acoustic energy estimated value corresponding to the frequency point of the current frame, calculate, using a third energy calculation rule, the unsteady-state acoustic energy estimated value corresponding to the frequency point of the current frame, and perform a superposition operation on the steady-state acoustic energy estimated value corresponding to the frequency point of the current frame and the unsteady-state acoustic energy estimated value according to a second proportional relationship to obtain an environmental acoustic energy estimated value corresponding to the frequency point of the current frame.
As another embodiment of the present application, as shown in fig. 7, the first energy determination unit 622 may include:
a first obtaining unit 6221, configured to obtain a steady-state energy estimation value corresponding to a corresponding frequency point in a previous frame;
the first calculating unit 6222 is configured to perform an overlap operation on the effective sound energy value corresponding to the current frame frequency point and the steady-state energy estimation value corresponding to the previous frame frequency point according to a third proportional relationship, so as to obtain the steady-state sound energy estimation value corresponding to the current frame frequency point.
The second energy determination unit 623 may include:
a second obtaining unit 6231, configured to obtain an unsteady state sound energy estimation value corresponding to a corresponding frequency point of the previous m frames;
where m is not less than 2, in conjunction with the description of the corresponding portion of the above method embodiment, this embodiment only takes m-2 as an example to obtain unsteady state sound energy estimation values of corresponding frequency points of the i-1 th frame and the i-2 th frame.
A second calculating unit 6232, configured to perform a superposition operation on the effective sound energy value corresponding to the current frame frequency point and the unsteady state sound energy estimated value corresponding to the previous m frames corresponding frequency points according to a fourth proportional relationship, so as to obtain an unsteady state sound energy estimated value corresponding to the current frame frequency point.
It should be noted that, regarding the process of calculating the ambient sound energy value and the sound wave energy value in the valid sound energy value, reference may be made to the description of the corresponding parts of the above method embodiments, and this embodiment is not described herein again.
The signal-to-noise ratio calculation module 63 is configured to calculate a signal-to-noise ratio of sound wave communication in the current scene by using the environmental sound energy value and the sound wave energy value;
optionally, referring to fig. 8, the signal-to-noise ratio calculating module 63 may include:
a first selecting unit 631, configured to select a minimum acoustic energy value from acoustic energy values corresponding to different frequency points in the obtained multi-frame effective acoustic signal;
wherein, each frame of effective sound signal is subjected to spectrum analysis to obtain a plurality of frequency points.
A second selecting unit 632, configured to select a maximum ambient sound energy value from the ambient sound energy values corresponding to different frequency points in the obtained multi-frame effective sound signal;
the signal-to-noise ratio calculating unit 633 is configured to calculate a ratio of the minimum sound wave energy value to the maximum ambient sound energy value, so as to obtain a signal-to-noise ratio of sound wave communication in the current scene.
It should be noted that the calculation process of the signal-to-noise ratio related to the acoustic wave communication is not limited to the manner described in the present embodiment.
And a configuration parameter adjusting module 64, configured to adjust a sound wave configuration parameter of the electronic device based on the signal-to-noise ratio, where the sound wave configuration parameter includes an amplitude of a sound wave signal played by the electronic device.
In this application, the configuration parameter adjusting module 64 may be specifically configured to calculate a corresponding closed-loop gain by using the signal-to-noise ratio and a preset threshold value, so as to perform closed-loop control on the amplitude of the acoustic wave signal by using the closed-loop gain.
Certainly, the configuration parameter adjusting module 64 may also query a mapping table of a preset corresponding relationship between a signal-to-noise ratio and an amplitude of the sound wave signal, and determine an amplitude of the target sound wave signal corresponding to the calculated signal-to-noise ratio, thereby implementing sound wave parameter configuration for the electronic device, ensuring that the sound player plays the sound wave signal with the amplitude of the target sound wave signal, and avoiding that the sound wave signal is masked by the environmental noise.
In conjunction with fig. 1 above, an embodiment of the present application further provides an electronic device, as shown in fig. 1, the electronic device may include: a sound collector 11, a memory 12, a processor 13 and a sound player 14.
The sound collector 11 is configured to collect effective sound signals of a current scene, where the effective sound signals include an environmental sound signal of the current scene and a sound wave signal played by the electronic device;
a memory for storing an acoustic wave communication processing program;
a sound player for outputting a sound wave signal;
a processor for executing an acoustic communications processing program, comprising:
the method comprises the steps of obtaining an environment sound energy value and a sound wave energy value corresponding to at least one frequency point in an effective sound signal, calculating the signal-to-noise ratio of sound wave communication under a current scene by using the environment sound energy value and the sound wave energy value, adjusting sound wave configuration parameters of a sound player based on the signal-to-noise ratio, updating the parameter guarantee of the sound player in time by using the adjusted sound wave configuration parameters, ensuring that the amplitude of the sound wave signal played by the sound player is matched with the current scene, and enabling a receiving party to reliably and effectively detect the sound wave signal played by the sound player.
Optionally, the acoustic wave communication processing program is specifically configured to perform spectrum analysis on each frame of effective sound signal, obtain at least one frequency point in the effective sound signal and a corresponding effective sound energy value, and calculate an environmental sound energy estimation value and an acoustic wave energy estimation value corresponding to the corresponding frequency point by using the obtained effective sound energy value corresponding to the at least one frequency point and a first energy calculation rule.
For the above description, reference may be made to the corresponding parts of the above method embodiments for specific calculation processes of the estimated ambient sound energy value and the estimated sound energy value, and the detailed description of the embodiment is omitted here.
In the use process of the sound wave communication, if the surrounding environment sound is overlapped with the sound frequency band used by the sound wave communication, the sound wave communication is interfered, so that a receiving party cannot receive correct transmission data, and the accuracy of the transmission data is reduced. Therefore, the electronic equipment provided by the application carries out closed-loop control on the amplitude of the sent sound wave signal in a self-detection mode of environmental noise, thereby realizing dynamic adjustment on the amplitude of the sound wave signal according to the signal-to-noise ratio, and is suitable for various field sound environments.
In addition, it should be noted that, in the embodiments described above, relational terms such as first, second and the like are only used for distinguishing one operation, unit or module from another operation, unit or module, and do not necessarily require or imply any actual relation or order between the units, the operations or modules. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method or system that comprises the element.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the device and the electronic equipment disclosed by the embodiment, the description is relatively simple because the device and the electronic equipment correspond to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the elements and algorithm steps of the various embodiments described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various example components and steps have been described above generally in terms of their functionality in order to clearly illustrate their interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (14)

1. A method of acoustic communications processing, the method comprising:
obtaining an effective sound signal of a current scene, wherein the effective sound signal comprises an environmental sound signal of the current scene and a sound wave signal played by electronic equipment;
acquiring an environment sound energy value and an acoustic wave energy value corresponding to at least one frequency point in the effective sound signal;
calculating the signal-to-noise ratio of sound wave communication under the current scene by using the environmental sound energy value and the sound wave energy value;
and adjusting sound wave configuration parameters of the electronic equipment based on the signal-to-noise ratio, wherein the sound wave configuration parameters comprise the amplitude of the sound wave signal played by the electronic equipment.
2. The method of claim 1, further comprising:
carrying out spectrum analysis on the effective sound signal to obtain at least one frequency point in the effective sound signal and a corresponding effective sound energy value;
the acquiring an ambient sound energy value and an acoustic wave energy value corresponding to at least one frequency point in the effective sound signal includes:
and calculating the corresponding environmental sound energy estimated value and the corresponding sound energy estimated value on the corresponding frequency point by using the obtained effective sound energy value corresponding to the at least one frequency point and the first energy calculation rule.
3. The method according to claim 2, wherein the calculating the corresponding ambient sound energy estimate and acoustic energy estimate at the corresponding frequency point using the obtained valid sound energy value corresponding to the at least one frequency point and the first energy calculation rule comprises:
determining that a current frame frequency point is a historical frame modulation frequency point, acquiring an environmental sound energy estimation value and a sound wave energy estimation value corresponding to a corresponding frequency point of a previous frame, taking the environmental sound energy estimation value corresponding to the corresponding frequency point of the previous frame as the environmental energy estimation value corresponding to the current frame frequency point, and performing superposition operation on an effective sound energy value and an environmental sound energy estimation value corresponding to the current frame frequency point and the sound wave energy estimation value corresponding to the corresponding frequency point of the previous frame according to a first proportional relation to obtain the sound wave energy estimation value corresponding to the current frame frequency point;
determining that the current frame frequency point is not the historical frame modulation frequency point, determining the sound wave energy estimation value corresponding to the corresponding frequency point of the previous frame as the sound wave energy estimation value corresponding to the current frame frequency point, calculating the steady state sound energy estimation value corresponding to the current frame frequency point by using a second energy calculation rule, calculating the unsteady state sound energy estimation value corresponding to the current frame frequency point by using a third energy calculation rule, and performing superposition operation on the steady state sound energy estimation value corresponding to the current frame frequency point and the unsteady state sound energy estimation value according to a second proportional relation to obtain the environment sound energy estimation value corresponding to the current frame frequency point.
4. The method according to claim 3, wherein said calculating the steady state sound energy estimate corresponding to the current frame frequency point using the second energy calculation rule comprises:
acquiring a steady state energy estimation value corresponding to a corresponding frequency point of a previous frame;
and according to a third proportional relation, performing superposition operation on the effective sound energy value corresponding to the current frame frequency point and the steady-state energy estimation value corresponding to the corresponding frequency point of the previous frame to obtain the steady-state sound energy estimation value corresponding to the current frame frequency point.
5. The method of claim 3, wherein calculating the unsteady state sound energy estimation value corresponding to the current frame frequency point by using a third energy calculation rule comprises:
acquiring an unsteady state sound energy estimation value corresponding to the corresponding frequency point of the previous m frames, wherein m is not less than 2;
and according to a fourth proportional relation, performing superposition operation on the effective sound energy value corresponding to the current frame frequency point and the unsteady state sound energy estimated value corresponding to the previous m frames of corresponding frequency points to obtain the unsteady state sound energy estimated value corresponding to the current frame frequency point.
6. The method of claim 1, wherein said calculating a signal-to-noise ratio of the acoustic communication at the current scene using the ambient acoustic energy value and the acoustic energy comprises:
selecting a minimum sound wave energy value from sound wave energy values corresponding to different frequency points in the obtained multi-frame effective sound signals;
selecting a maximum environment sound energy value from environment sound energy values corresponding to different frequency points in the obtained multi-frame effective sound signals;
and calculating the ratio of the minimum sound wave energy value to the maximum environment sound energy value to obtain the signal-to-noise ratio of sound wave communication under the current scene.
7. The method of claim 1, wherein said adjusting the acoustic configuration parameters of the electronic device based on the signal-to-noise ratio comprises:
calculating to obtain corresponding closed loop gain by using the signal to noise ratio and a preset threshold value;
and performing closed-loop control on the amplitude of the sound wave signal configured by the electronic equipment by using the closed-loop gain.
8. The method of claim 1, wherein said adjusting the acoustic configuration parameters of the electronic device based on the signal-to-noise ratio comprises:
inquiring a mapping table of the corresponding relation between a preset signal-to-noise ratio and the sound wave signal amplitude, and determining a target sound wave signal amplitude corresponding to the calculated signal-to-noise ratio;
and configuring the electronic equipment according to the target sound wave signal amplitude value, and controlling a sound player to output a sound wave signal with the target sound wave signal amplitude value.
9. An acoustic wave communication apparatus, the apparatus comprising:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring effective sound signals of a current scene, and the effective sound signals comprise environmental sound signals of the current scene and sound wave signals played by electronic equipment;
the energy acquisition module is used for acquiring an environment sound energy value and an acoustic wave energy value corresponding to at least one frequency point in the effective sound signal;
the signal-to-noise ratio calculation module is used for calculating the signal-to-noise ratio of sound wave communication under the current scene by utilizing the environment sound energy value and the sound wave energy value;
and the configuration parameter adjusting module is used for adjusting the sound wave configuration parameters of the electronic equipment based on the signal-to-noise ratio, wherein the sound wave configuration parameters comprise the amplitude of the sound wave signal played by the electronic equipment.
10. The apparatus of claim 9, further comprising:
the spectrum analysis module is used for carrying out spectrum analysis on the effective sound signal to obtain at least one frequency point in the effective sound signal and a corresponding effective sound energy value;
the energy calculation module includes:
a first energy determining unit, configured to determine that a current frame frequency point is a historical frame modulation frequency point, obtain an environmental sound energy estimated value and an acoustic wave energy estimated value corresponding to a corresponding frequency point of a previous frame, use the environmental sound energy estimated value corresponding to the corresponding frequency point of the previous frame as the environmental energy estimated value corresponding to the current frame frequency point, and perform a superposition operation on an effective sound energy value and an environmental sound energy estimated value corresponding to the current frame frequency point and the acoustic wave energy estimated value corresponding to the corresponding frequency point of the previous frame according to a first proportional relationship, so as to obtain an acoustic wave energy estimated value corresponding to the current frame frequency point;
and the second energy determining unit is used for determining that the current frame frequency point is not the historical frame modulation frequency point, determining the sound wave energy estimated value corresponding to the corresponding frequency point of the previous frame as the sound wave energy estimated value corresponding to the current frame frequency point, calculating the steady state sound energy estimated value corresponding to the current frame frequency point by using a second energy calculation rule, calculating the unsteady state sound energy estimated value corresponding to the current frame frequency point by using a third energy calculation rule, and performing superposition operation on the steady state sound energy estimated value corresponding to the current frame frequency point and the unsteady state sound energy estimated value according to a second proportional relation to obtain the environment sound energy estimated value corresponding to the current frame frequency point.
11. The apparatus of claim 10, wherein the first energy determination unit comprises:
the first acquisition unit is used for acquiring a steady-state energy estimation value corresponding to a corresponding frequency point of a previous frame;
and the first calculating unit is used for performing superposition operation on the effective sound energy value corresponding to the current frame frequency point and the steady-state energy estimated value corresponding to the corresponding frequency point of the previous frame according to a third proportional relation to obtain the steady-state sound energy estimated value corresponding to the current frame frequency point.
12. The apparatus of claim 10, wherein the second energy determination unit comprises:
the second acquisition unit is used for acquiring an unsteady state sound energy estimation value corresponding to the corresponding frequency point of the previous m frames, wherein m is not less than 2;
and the second calculating unit is used for performing superposition operation on the effective sound energy value corresponding to the current frame frequency point and the unsteady state sound energy estimated value corresponding to the previous m frames of corresponding frequency points according to a fourth proportional relation to obtain the unsteady state sound energy estimated value corresponding to the current frame frequency point.
13. The apparatus of claim 9, wherein the signal-to-noise ratio calculation module comprises:
the first selection unit is used for selecting the minimum sound wave energy value from the sound wave energy values corresponding to different frequency points in the obtained multi-frame effective sound signals;
the second selection unit is used for selecting the maximum environmental sound energy value from the environmental sound energy values corresponding to different frequency points in the obtained multi-frame effective sound signals;
and the signal-to-noise ratio calculation unit is used for calculating the ratio of the minimum sound wave energy finger to the maximum environment sound energy finger to obtain the signal-to-noise ratio of sound wave communication under the current scene.
14. An electronic device, characterized in that the electronic device comprises:
the sound collector is used for collecting effective sound signals of a current scene, and the effective sound signals comprise environmental sound signals of the current scene and sound wave signals played by the electronic equipment;
a memory for storing an acoustic wave communication processing program;
a sound player for outputting a sound wave signal;
a processor for executing the acoustic wave communication processing program, comprising:
acquiring an environment sound energy value and an acoustic wave energy value corresponding to at least one frequency point in the effective sound signal;
calculating the signal-to-noise ratio of sound wave communication under the current scene by using the environmental sound energy value and the sound wave energy value;
and adjusting sound wave configuration parameters of the electronic equipment based on the signal-to-noise ratio, wherein the sound wave configuration parameters comprise the amplitude of the sound wave signal played by the electronic equipment.
CN201710271863.6A 2017-04-24 2017-04-24 Sound wave communication processing method and device, electronic equipment and storage medium Active CN108736982B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710271863.6A CN108736982B (en) 2017-04-24 2017-04-24 Sound wave communication processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710271863.6A CN108736982B (en) 2017-04-24 2017-04-24 Sound wave communication processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108736982A true CN108736982A (en) 2018-11-02
CN108736982B CN108736982B (en) 2020-08-21

Family

ID=63934128

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710271863.6A Active CN108736982B (en) 2017-04-24 2017-04-24 Sound wave communication processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108736982B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110265046A (en) * 2019-07-25 2019-09-20 腾讯科技(深圳)有限公司 A kind of coding parameter regulation method, apparatus, equipment and storage medium
CN110880957A (en) * 2019-11-01 2020-03-13 腾讯科技(深圳)有限公司 Sound wave communication method and device and electronic equipment
CN114531611A (en) * 2020-11-23 2022-05-24 深圳Tcl数字技术有限公司 Volume adjusting method, storage medium and terminal equipment

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040110510A1 (en) * 2002-12-09 2004-06-10 Taehyun Jeon Apparatus and method for channel quality estimation and link adaptation in orthogonal frequency division multiplexing (OFDM) wireless communication system
CN1522519A (en) * 2001-06-29 2004-08-18 皇家菲利浦电子有限公司 Signal to noise margin information for power control and bit rate adaptation in IEEE 802.11H wlan
CN1864424A (en) * 2003-10-07 2006-11-15 罗克马诺尔研究有限公司 Controlling interference from a transmitter in one communication system to a receiver in another communication system
US8027437B2 (en) * 2006-12-18 2011-09-27 Nuance Communications, Inc. System and method for improving message delivery in voice systems utilizing microphone and target signal-to-noise ratio
CN102790995A (en) * 2012-08-16 2012-11-21 电子科技大学 Information channel gain estimation method based on cognitive radio
CN103312419A (en) * 2012-03-07 2013-09-18 苏州汉朗光电有限公司 Method and system for data communication based on audio or ultrasonic
CN103647609A (en) * 2013-12-09 2014-03-19 中国联合网络通信集团有限公司 Method of restraining base station bottom noise and equipment thereof
CN203522901U (en) * 2013-07-04 2014-04-02 深圳Tcl新技术有限公司 Sound automatic regulating device and television set
CN103903135A (en) * 2014-04-10 2014-07-02 福建联迪商用设备有限公司 Sound wave safety payment method and system
CN103984911A (en) * 2014-05-05 2014-08-13 福建联迪商用设备有限公司 Password keyboard, payment system and payment method thereof
US20140269201A1 (en) * 2013-03-12 2014-09-18 Zhiqiang Liu Method for mobile underwater acoustic communications
CN104333900A (en) * 2007-02-02 2015-02-04 Ubiquisys有限公司 Method and base station for controlling access point power transmission

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1522519A (en) * 2001-06-29 2004-08-18 皇家菲利浦电子有限公司 Signal to noise margin information for power control and bit rate adaptation in IEEE 802.11H wlan
US20040110510A1 (en) * 2002-12-09 2004-06-10 Taehyun Jeon Apparatus and method for channel quality estimation and link adaptation in orthogonal frequency division multiplexing (OFDM) wireless communication system
CN1864424A (en) * 2003-10-07 2006-11-15 罗克马诺尔研究有限公司 Controlling interference from a transmitter in one communication system to a receiver in another communication system
US8027437B2 (en) * 2006-12-18 2011-09-27 Nuance Communications, Inc. System and method for improving message delivery in voice systems utilizing microphone and target signal-to-noise ratio
CN104333900A (en) * 2007-02-02 2015-02-04 Ubiquisys有限公司 Method and base station for controlling access point power transmission
CN103312419A (en) * 2012-03-07 2013-09-18 苏州汉朗光电有限公司 Method and system for data communication based on audio or ultrasonic
CN102790995A (en) * 2012-08-16 2012-11-21 电子科技大学 Information channel gain estimation method based on cognitive radio
US20140269201A1 (en) * 2013-03-12 2014-09-18 Zhiqiang Liu Method for mobile underwater acoustic communications
CN203522901U (en) * 2013-07-04 2014-04-02 深圳Tcl新技术有限公司 Sound automatic regulating device and television set
CN103647609A (en) * 2013-12-09 2014-03-19 中国联合网络通信集团有限公司 Method of restraining base station bottom noise and equipment thereof
CN103903135A (en) * 2014-04-10 2014-07-02 福建联迪商用设备有限公司 Sound wave safety payment method and system
CN103984911A (en) * 2014-05-05 2014-08-13 福建联迪商用设备有限公司 Password keyboard, payment system and payment method thereof

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110265046A (en) * 2019-07-25 2019-09-20 腾讯科技(深圳)有限公司 A kind of coding parameter regulation method, apparatus, equipment and storage medium
CN110265046B (en) * 2019-07-25 2024-05-17 腾讯科技(深圳)有限公司 Encoding parameter regulation and control method, device, equipment and storage medium
CN110880957A (en) * 2019-11-01 2020-03-13 腾讯科技(深圳)有限公司 Sound wave communication method and device and electronic equipment
CN114531611A (en) * 2020-11-23 2022-05-24 深圳Tcl数字技术有限公司 Volume adjusting method, storage medium and terminal equipment
CN114531611B (en) * 2020-11-23 2024-04-02 深圳Tcl数字技术有限公司 Volume adjusting method, storage medium and terminal equipment

Also Published As

Publication number Publication date
CN108736982B (en) 2020-08-21

Similar Documents

Publication Publication Date Title
US10839808B2 (en) Detection of replay attack
EP1913708B1 (en) Determination of audio device quality
US8238569B2 (en) Method, medium, and apparatus for extracting target sound from mixed sound
US9947338B1 (en) Echo latency estimation
CN101378607B (en) Sound processing apparatus and method for correcting phase difference
CN110785809A (en) Magnetic detection of replay attacks
JP5493611B2 (en) Information processing apparatus, information processing method, and program
TWI543149B (en) Noise cancellation method
CN109845288A (en) Method and apparatus for the output signal equilibrium between microphone
CN108736982B (en) Sound wave communication processing method and device, electronic equipment and storage medium
US9538288B2 (en) Sound field correction apparatus, control method thereof, and computer-readable storage medium
JP5838861B2 (en) Audio signal processing apparatus, method and program
CN104991755B (en) A kind of information processing method and electronic equipment
EP3437334A1 (en) Audio system equalizing
CN102164203A (en) Information processing device and method and program
US10932079B2 (en) Acoustical listening area mapping and frequency correction
CN110931007A (en) Voice recognition method and system
WO2018179506A1 (en) Audio device and computer readable program
US10356518B2 (en) First recording device, second recording device, recording system, first recording method, second recording method, first computer program product, and second computer program product
CN115412803A (en) Audio signal compensation method and device, earphone and storage medium
US9294848B2 (en) Adaptation of a classification of an audio signal in a hearing aid
KR102532584B1 (en) Detection of replay attacks
KR101722686B1 (en) Method and Apparatus for outputting bell sound
CN113409800A (en) Processing method and device for monitoring audio, storage medium and electronic equipment
CN107197403A (en) A kind of terminal audio frequency parameter management method, apparatus and system

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