Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The abnormal sound detection and analysis method provided by the embodiment of the application can be applied to terminal equipment such as a Bluetooth headset, a Bluetooth sound box, wearable equipment and a notebook computer, and the embodiment of the application does not limit the specific type of the terminal equipment.
Fig. 1 shows a schematic flow chart of the abnormal sound detection and analysis method provided in the present application, which can be applied to the above-mentioned bluetooth headset by way of example and not limitation.
S101, playing a preset signal through a playing end to obtain a played signal.
In specific application, a preset signal is played through a playing end of a current player, sound generated by playing the preset signal stored in advance through the playing end is acquired through monitoring equipment, the sound is converted into an electric signal and processed, and the processed electric signal is used as the played signal.
The preset signal can be specifically set according to actual requirements. In the present embodiment, the preset signal is a 20-20000HZ sinusoidal audio signal audible to human ears, and the frequencies between the frequency points are preset.
In one embodiment, a communication connection between a terminal device storing a preset signal and a player is established in advance through a connection device, and the terminal device sends the preset signal through the connection device, so that a playing end of the player plays the preset signal. For example, the player is a bluetooth headset, the connection device is a bluetooth adapter, the terminal device is a notebook computer, and the communication connection between the notebook computer stored with the preset signal and the bluetooth headset is established in advance through the bluetooth adapter, so that the left loudspeaker and/or the right loudspeaker of the bluetooth headset play the preset signal.
In an embodiment, the preset signal may be stored in a player in advance, and when the player receives a play instruction, the player plays the preset signal stored in advance according to the play instruction.
The monitoring device may be a free field microphone disposed at the port of the playing end, and is configured to acquire sound generated by playing a preset signal through the playing end and convert the sound into an electrical signal. And then the electric signal processed by the power amplifier is sent to the sound card, so that the electric signal processed by the power amplifier can be further processed conveniently.
It is understood that, in order to ensure the stability of the signal during the signal processing and avoid noise interference, the steps of the abnormal sound detection and analysis method should be performed in an environment with a noise shielding box or in a mute environment.
And S102, processing the played signal to obtain a processed signal.
In specific application, the obtained played signal is correspondingly processed through a preset algorithm to obtain a processed signal, so that whether abnormal sound exists at the playing end can be conveniently judged according to the processed signal. Wherein the predetermined algorithm includes, but is not limited to, a fourier transform algorithm.
S103, comparing the processed signal with a pre-stored standard signal, and judging whether the processed signal has abnormal sound.
In a specific application, the processed signal is compared with a standard signal stored in a player in advance, and whether abnormal sound exists in the processed signal is judged according to the difference between the processed signal and the standard signal.
And S104, if the processed signal has abnormal sound, judging that the player has abnormal sound.
In a specific application, if it is detected that the processed signal has an abnormal sound, it is determined that the player has the abnormal sound, that is, it is determined that the playing quality and performance of the player are poor.
In one embodiment, step S102 includes:
and performing segmentation processing on the played signal to obtain a plurality of processed time domain signals and a processed frequency domain signal associated with each time domain signal.
In a specific application, the acquired electrical signal is divided into a plurality of time domain signals and a frequency domain signal associated with each time domain signal by a preset algorithm. The predetermined algorithm includes, but is not limited to, a fourier transform algorithm.
The dividing of the acquired electrical signal into a plurality of time domain signals and a frequency domain signal associated with each time domain signal by a fourier transform algorithm comprises: a window function with a certain width is preset, and the acquired electric signals are divided into a plurality of small segments according to time to obtain a plurality of time domain signals. And according to a Fourier transform algorithm, dividing each segment of time domain signal according to the frequency to obtain a frequency domain signal which is associated with each segment of time domain signal and has local spectral characteristics. Because the frequency domain signal synthesis can form a short-time Fourier transform spectrum, the played signal is processed based on a short-time Fourier transform algorithm, and the rule that frequency components change along with time can be reflected.
In one embodiment, the pre-stored standard signal comprises a plurality of pre-stored time domain signals and a pre-stored frequency domain signal associated with each pre-stored time domain signal; and the pre-stored time domain signals correspond to the processed time domain signals one to one.
In a specific application, the pre-stored standard signals are a plurality of pre-stored time domain signals corresponding to the vicinity of a resonance frequency (including 20-20000HZ) set by a factory manufacturer of the player and a pre-stored frequency domain signal associated with each pre-stored time domain signal; the pre-stored time domain signals and the processed time domain signals are in one-to-one correspondence.
As shown in fig. 2, the step S103 includes:
s1031, determining a processed time domain signal corresponding to each pre-stored time domain signal;
s1032, comparing the pre-stored frequency domain signal associated with each pre-stored time domain signal with the processed frequency domain signal associated with the corresponding processed time domain signal;
s1033, if a difference between the pre-stored frequency domain signal associated with any one of the pre-stored time domain signals and the processed frequency domain signal associated with the corresponding processed time domain signal satisfies a preset condition, determining that the processed signal has an abnormal sound.
In a specific application, determining a processed time domain signal corresponding to each pre-stored time domain signal according to a one-to-one correspondence relationship between pre-stored time domain signals and processed time domain signals, and comparing a pre-stored frequency domain signal associated with any one of the pre-stored time domain signals with a processed frequency domain signal associated with the processed time domain signal corresponding to the pre-stored time domain signal to obtain a corresponding comparison result; and traversing all the pre-stored frequency domain signals associated with the pre-stored time domain signals, and acquiring a comparison result of the pre-stored frequency domain signal associated with each stored time domain signal and the processed frequency domain signal associated with the processed time domain signal corresponding to each pre-stored time domain signal. And if the difference between the pre-stored frequency domain signal associated with any one of the pre-stored time domain signals and the processed frequency domain signal associated with the processed time domain signal corresponding to the pre-stored time domain signal is detected to meet a preset condition, judging that the processed signal has abnormal sound. The difference is an abnormal frequency domain component between a pre-stored frequency domain signal associated with a pre-stored time domain signal and a processed frequency domain signal associated with a processed time domain signal corresponding to the pre-stored time domain signal; the preset condition is a criterion for determining the magnitude of the difference, and can be specifically set according to actual conditions. In this embodiment, the preset condition is set that an abnormal frequency domain component exists between a pre-stored frequency domain signal associated with a pre-stored time domain signal and a processed frequency domain signal associated with a processed time domain signal corresponding to the pre-stored time domain signal, and the abnormal frequency domain component is greater than or equal to a preset threshold.
For example, taking the a pre-stored time domain signal as an example, the a processed time domain signal corresponding to the a pre-stored time domain signal is determined, the a pre-stored frequency domain signal associated with the a pre-stored time domain signal is compared with the a processed frequency domain signal associated with the a processed time domain signal, when a difference between the a pre-stored frequency domain signal associated with the a pre-stored time domain signal and the processed frequency domain signal associated with the a processed time domain signal is detected, whether the difference meets a preset condition is detected, and if the difference meets the preset condition, it is determined that an abnormal sound exists in the processed signal.
As shown in fig. 3, in one embodiment, the step S1033 includes:
s10331, detecting whether an abnormal frequency domain component exists between a pre-stored frequency domain signal associated with a pre-stored time domain signal and a processed frequency domain signal associated with a corresponding processed time domain signal;
s10332, if an abnormal frequency domain component exists between the pre-stored frequency domain signal associated with any one of the pre-stored time domain signals and the processed frequency domain signal associated with the corresponding processed time domain signal, and the abnormal frequency domain component is greater than or equal to a preset threshold, determining that the processed signal has abnormal noise.
In a specific application, whether an abnormal frequency domain component exists between a pre-stored frequency domain signal associated with any one of the pre-stored time domain signals and a processed frequency domain signal associated with a processed time domain signal corresponding to the pre-stored time domain signal is detected. If abnormal frequency domain components exist between the pre-stored frequency domain signals related to the pre-stored time domain signals and the processed frequency domain signals related to the corresponding processed time domain signals, comparing the abnormal frequency domain components with a preset threshold value, and if the abnormal frequency domain components are larger than or equal to the preset threshold value, judging that abnormal sound exists in the processed signals. Where spectral components refer to the amplitude of the frequency in the frequency domain after transformation. The abnormal frequency domain component refers to a time length of occurrence of a frequency which is different between the pre-stored frequency domain signal (i.e. a pre-stored frequency domain signal associated with a pre-stored time domain signal) and the processed frequency domain signal (i.e. a processed frequency domain signal associated with a processed time domain signal corresponding to the pre-stored time domain signal). The preset threshold can be specifically set according to actual conditions, and is used for judging the size of the abnormal frequency domain component, and further detecting whether abnormal sound exists in the processed signal. For example, the preset threshold is set as an average value of all frequency point abnormal frequency domain components. For example, if the average value of the abnormal frequency domain components of all frequency points is 0.01s, and an abnormal frequency exists between the frequency domain signal pre-stored in a, which is associated with the time domain signal pre-stored in a, and the processed frequency domain signal associated with the time domain signal processed in a, and the abnormal frequency domain component corresponding to the abnormal frequency is 0.2s, it is determined that abnormal noise exists in the processed signal.
In a specific application, the abnormal sound emitted by the loudspeaker of the player generally occurs when the loudspeaker has the maximum vibration displacement (in practical application, the vibration displacement around the resonance frequency of the loudspeaker is the maximum), and the abnormal sound in the situation has high stability. Therefore, the collected played signals are segmented to obtain corresponding time-frequency signals, the time-frequency graph characteristics of each time-frequency signal corresponding to the vicinity of the resonance frequency set by a loudspeaker manufacturer are analyzed according to the frequency-domain signals, and whether abnormal sound audio frequency components exist in the time-frequency signals of the loudspeaker or not is calculated according to the time-frequency graph characteristics of other frequency bands, so that whether abnormal sound exists in the loudspeaker or not is judged.
In one embodiment, the playing end comprises a first playing end and a second playing end;
the step S104 includes:
and if the first processed signal corresponding to the first playing end and the second processed signal corresponding to the second playing end have abnormal sound, judging that the player has the abnormal sound.
In a specific application, the player generally has more than one playing end (e.g., the bluetooth headset has two playing ends on the left). When detecting whether the player with more than one playing end has noise, the abnormal sound detection analysis is carried out on each playing end, and when detecting that the processed signals corresponding to each playing end have abnormal sound, the abnormal sound of the player is judged.
In specific application, firstly, comparing a first processed signal corresponding to a first playing end with a pre-stored standard signal, judging whether the first processed signal has abnormal sound, and obtaining an abnormal sound detection analysis result of the first playing end; and then comparing the second processed signal corresponding to the second playing end with a pre-stored standard signal, judging whether the second processed signal has abnormal sound, and obtaining an abnormal sound detection and analysis result of the second playing end. And carrying out AND operation on the abnormal sound detection and analysis result of the first playing end and the abnormal sound detection and analysis result of the second playing end to obtain a detection and analysis result of whether the player has abnormal sound.
The method comprises the steps of obtaining a signal played by a player through a playing end, processing the signal to obtain a processed signal, comparing the processed signal with a pre-stored standard signal, judging whether the processed signal has abnormal sound, detecting and judging whether the player has the abnormal sound, reducing the time consumption of the abnormal sound detection process, improving the abnormal sound detection efficiency and improving the stability of a detection result.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 4 shows a block diagram of the abnormal sound detection and analysis device provided in the embodiment of the present application, corresponding to the abnormal sound detection and analysis method described in the above embodiment, and only the parts related to the embodiment of the present application are shown for convenience of description.
Referring to fig. 4, the abnormal noise detection/analysis device 100 includes:
an obtaining module 101, configured to play a preset signal through a playing end, and obtain a played signal;
a processing module 102, configured to process the played signal to obtain a processed signal;
a comparing module 103, configured to compare the processed signal with a pre-stored standard signal, and determine whether the processed signal has abnormal sound;
a determining module 104, configured to determine that the player has an abnormal sound if the processed signal has the abnormal sound.
In one embodiment, the processing module 102 includes:
and the processing unit is used for carrying out segmentation processing on the played signal to obtain a plurality of processed time domain signals and processed frequency domain signals related to each time domain signal.
In one embodiment, the pre-stored standard signal comprises a plurality of pre-stored time domain signals and a pre-stored frequency domain signal associated with each pre-stored time domain signal; the pre-stored time domain signals and the processed time domain signals are in one-to-one correspondence;
as shown in fig. 5, the comparing module 103 includes:
a determining unit 1031, configured to determine a processed time domain signal corresponding to each pre-stored time domain signal;
a comparing unit 1032 for comparing the pre-stored frequency domain signal associated with each pre-stored time domain signal with the processed frequency domain signal associated with the corresponding processed time domain signal;
a first determining unit 1033, configured to determine that there is an abnormal sound in the processed signal if a difference between a pre-stored frequency domain signal associated with any one of the pre-stored time domain signals and a processed frequency domain signal associated with the corresponding processed time domain signal satisfies a preset condition.
In one embodiment, the first determining unit 1033 includes:
a calculation subunit, configured to detect whether an abnormal frequency domain component exists between a pre-stored frequency domain signal associated with a pre-stored time domain signal and a processed frequency domain signal associated with a corresponding processed time domain signal;
and the judging subunit is configured to, if an abnormal frequency domain component exists between a pre-stored frequency domain signal associated with any one of the pre-stored time domain signals and a processed frequency domain signal associated with the corresponding processed time domain signal, and the abnormal frequency domain component is greater than or equal to a preset threshold, judge that the processed signal has abnormal noise.
In one embodiment, the playing end comprises a first playing end and a second playing end;
the determining module 104 includes:
and the second judging unit is used for judging that the abnormal sound exists in the player if the first processed signal corresponding to the first playing end and the second processed signal corresponding to the second playing end both have abnormal sound.
The method comprises the steps of obtaining a signal played by a player through a playing end, processing the signal to obtain a processed signal, comparing the processed signal with a pre-stored standard signal, judging whether the processed signal has abnormal sound, detecting and judging whether the player has the abnormal sound, reducing the time consumption of the abnormal sound detection process, improving the abnormal sound detection efficiency and improving the stability of a detection result.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
Fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 6, the terminal device 6 of this embodiment includes: at least one processor 60 (only one shown in fig. 6), a memory 61, and a computer program 62 stored in the memory 61 and executable on the at least one processor 60, the processor 60 implementing the steps in any of the above-described embodiments of the abnormal sound detection analysis method when executing the computer program 62.
The terminal device 6 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 60, a memory 61. Those skilled in the art will appreciate that fig. 6 is only an example of the terminal device 6, and does not constitute a limitation to the terminal device 6, and may include more or less components than those shown, or combine some components, or different components, such as an input/output device, a network access device, and the like.
The Processor 60 may be a Central Processing Unit (CPU), and the Processor 60 may be other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 61 may in some embodiments be an internal storage unit of the terminal device 6, such as a hard disk or a memory of the terminal device 6. In other embodiments, the memory 61 may also be an external storage device of the terminal device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital Card (SD), a Flash memory Card (Flash Card), and the like, which are equipped on the terminal device 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the terminal device 6. The memory 61 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer program. The memory 61 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal apparatus, a recording medium, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. 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.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.