A sound detection method, device, equipment and storage medium

Through periodic wake-up and phased detection methods, the problem of power exhaustion and life reduction of sound detection equipment during long operation is solved, and the effect of reducing power consumption and operating load is achieved, and the life of the equipment is improved.

CN115376545BActive Publication Date: 2025-05-02ジャン州立達信光電子科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110558996.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-21
Publication Date
2025-05-02
Estimated Expiration
2041-05-21

AI Technical Summary

Technical Problem

Existing sound detection equipment can easily cause battery power to run out when it is turned on for a long time, and long-term operation and heating will reduce the life of the equipment.

Method used

The device is periodically awakened and determined whether to continue to collect the signal or enter the sleep state based on whether the collected sound signal characteristic parameters are greater than the corresponding threshold. Sound detection is performed in stages, and if it fails to pass the detection of a certain stage, it will enter a dormant state.

Benefits of technology

When the sound signal does not meet the detection conditions, it enters a dormant state to reduce power consumption, reduce operating load and heat generation, thereby improving the life of the equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115376545B_ABST
    Figure CN115376545B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of sound detection technology, and provides a sound detection method, device, equipment and storage medium, wherein the method includes: if the sleep duration reaches a first duration, enter a wake-up state and start collecting sound signals until the wake-up duration reaches a second duration, and the second duration is less than the first duration; determine whether the characteristic parameter of the sound signal is greater than the corresponding threshold; if so, continue to collect sound signals until a preset number of sound frames are reached; if not, enter a sleep state; perform sound detection on the sound signal in stages; if the sound detection of the kth stage is passed, perform the sound detection of the k+1th stage; if the sound detection of the kth or k+1th stage is not passed, enter a sleep state. The present application can enter a sleep state to reduce power consumption when the collected sound signal does not meet the corresponding detection conditions, and can also reduce the operating load and heat generation, thereby increasing the lifespan.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of sound detection technology, and in particular, relates to a sound detection method, device, equipment and storage medium. Background Art

[0002] Existing sound detection devices are usually powered by batteries for the sake of convenience of installation, aesthetics and cost. However, the capacity of the battery is limited. If the sound detection device is turned on for a long time, it is easy for the battery to run out and cause the sound detection device to shut down. The life of the sound detection device will also be reduced due to long-term full-load operation and heat generation. Summary of the invention

[0003] The embodiments of the present application provide a sound detection method, apparatus, device and storage medium to solve the problem that the existing sound detection equipment is turned on for a long time, which easily leads to battery exhaustion and shutdown of the sound detection equipment, and the life of the sound detection equipment is reduced due to long-term full-load operation and heat generation.

[0004] A first aspect of an embodiment of the present application provides a sound detection method, comprising:

[0005] If the sleep time reaches the first time, the device enters the wake-up state and starts collecting sound signals until the wake-up time reaches the second time, and the second time is less than the first time;

[0006] Determine whether the characteristic parameter of the sound signal is greater than a corresponding threshold; if so, continue to collect the sound signal until a preset number of sound frames are reached; if not, enter a dormant state; wherein the characteristic parameter includes amplitude or energy;

[0007] The sound signal is subjected to sound detection in stages; if the sound detection of the kth stage is passed, the sound detection of the k+1th stage is performed; if the sound detection of the kth or k+1th stage is not passed, a dormant state is entered; wherein k=1, 2, ..., K, and K is a positive integer.

[0008] A second aspect of an embodiment of the present application provides a sound detection device, comprising:

[0009] A wake-up unit, configured to enter a wake-up state and start collecting sound signals if the sleep time reaches a first time, until the wake-up time reaches a second time, wherein the second time is less than the first time;

[0010] A first detection unit is used to determine whether the characteristic parameter of the sound signal is greater than a corresponding threshold; if so, continue to collect the sound signal until a preset number of sound frames are reached; if not, enter a dormant state; wherein the characteristic parameter includes amplitude or energy;

[0011] The second detection unit is used to perform sound detection on the sound signal in stages; if the sound detection of the kth stage is passed, the sound detection of the k+1th stage is performed; if the sound detection of the kth or k+1th stage is not passed, the sound detection enters a dormant state; wherein k=1, 2, ..., K, and K is a positive integer.

[0012] A third aspect of an embodiment of the present application provides a sound detection device, comprising a sound collection module, a communication module, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the sound collection module, the communication module, and the memory are respectively connected to the processor, and when the processor executes the computer program, the steps of the sound detection method described in the first aspect of the embodiment of the present application are implemented.

[0013] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the sound detection method described in the first aspect of the embodiment of the present application are implemented.

[0014] The first aspect of the embodiment of the present application provides a sound detection method, which periodically wakes up the sound detection device, and then determines whether its characteristic parameter is greater than the corresponding threshold value based on the collected sound signal of the second time length. If not, it enters the sleep state again. If so, it continues to collect sound signals until a preset number of sound frames are reached and performs sound detection in stages. In each stage, if the sound detection of that stage is passed, the next stage of sound detection is performed, otherwise it enters the sleep state again. In this way, when the collected sound signal does not meet the corresponding detection conditions, it can enter the sleep state to reduce power consumption, and at the same time it can reduce the operating load and heat generation, thereby increasing the lifespan.

[0015] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0017] Figure 1 This is a first flow chart of the sound detection method provided in the embodiment of the present application;

[0018] Figure 2 This is a second flow chart of the sound detection method provided in the embodiment of the present application;

[0019] Figure 3 This is a third flow chart of the sound detection method provided in the embodiment of the present application;

[0020] Figure 4 This is a fourth flow chart of the sound detection method provided in the embodiment of the present application;

[0021] Figure 5 This is a fifth flow chart of the sound detection method provided in the embodiment of the present application;

[0022] Figure 6 This is a sixth flow chart of the sound detection method provided in the embodiment of the present application;

[0023] Figure 7 is a schematic diagram of the positive and negative cycle timing of the T3 alarm sound signal provided in an embodiment of the present application;

[0024] Figure 8 is a schematic diagram of the positive and negative cycle timing of the T4 alarm sound signal provided in an embodiment of the present application;

[0025] Fig. 9 This is a seventh flow chart of the sound detection method provided in the embodiment of the present application;

[0026] Fig.10 is a structural schematic diagram of a sound detection device provided in an embodiment of the present application;

[0027] Fig.11 This is a schematic diagram of the first structure of the sound detection device provided in the embodiment of the present application;

[0028] Fig.12 This is a second structural diagram of the sound detection device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0030] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0031] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0032] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0033] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0034] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0035] The embodiment of the present application provides a sound detection method, which can be executed by the processor of the sound detection device when running the corresponding computer program, and is used to detect the sound signal in the environment, and when the sound signal with the characteristics similar to or the same as the preset sound signal is detected, an alarm signal is sent to the client to promptly notify the user of the client. The preset sound signal can be an alarm sound signal emitted by the alarm, or it can be a sound signal emitted by a specific object that needs to be detected, for example, a whistle signal emitted by a vehicle, a call signal emitted by a rare animal, and an Earthquake Sound signal formed by an earthquake wave. The alarm can include but is not limited to various alarms that can emit alarm sound signals, such as smoke alarms, carbon monoxide alarms, and anti-theft alarms. The client can be a mobile phone, a smart ring (smart bracelet, smart neck ring, etc.), a tablet computer, a laptop, a netbook, a digital assistant (Digital Assistant, DA), an ultra-mobile personal computer (Ultra-Mobile Personal Computer, UMPC), a server, and other computing devices that can be used by individual users or relevant rescue units.

[0036] like Figure 1 As shown, the sound detection method provided in the embodiment of the present application includes the following steps S101 to S108:

[0037] Step S101, enter the dormant state and reset the characteristic parameters, then enter step S102;

[0038] Step S102: If the sleep time reaches the first time, the system enters the wake-up state and starts collecting sound signals until the wake-up time reaches the second time, and then enters step S103;

[0039] Step S103, determining whether the characteristic parameter of the sound signal is greater than a corresponding threshold; if so, proceeding to step S104; if not, proceeding to step S101;

[0040] Step S104, continue to collect sound signals until the preset number of sound frames is reached, and then proceed to step S105;

[0041] Step S105, performing the k-th stage sound detection on the sound signal; if the k-th stage sound detection is passed, proceed to step S106; if the k-th stage sound detection is not passed, proceed to step S101;

[0042] Step S106, performing the k+1th stage of sound detection on the sound signal; if the sound signal passes the k+1th stage of sound detection, proceed to step S107; if the sound signal fails the k+1th stage of sound detection, proceed to step S101;

[0043] Step S107, determining whether the sound signal is a preset sound signal; if so, proceeding to step S108; if not, proceeding to step S101;

[0044] Step S108, issue an alarm signal and proceed to step S101.

[0045] In the application, the sound detection device has a periodic wake-up function. After entering the sleep state each time, it starts to record the duration of entering the sleep state. When the sleep time reaches a first time, it enters the wake-up state, starts to record the duration of entering the wake-up state and starts to collect sound signals. When the wake-up time reaches a second time, it is determined whether the characteristic parameters such as the amplitude or energy of the sound signal (a small amount of sound signal) collected for the second time is greater than the corresponding threshold. If not, it enters the sleep state again. If so, it continues to collect sound signals until a preset number of sound frames (Frame) are reached and sound detection is performed in stages. For each stage (that is, the kth stage) of sound detection, if the sound detection of this stage is passed, the sound detection of the next stage (that is, the k+1th stage) is continued. If the sound of this stage is not passed, it enters the sleep state again. After passing the sound detection of all stages, it is determined whether the collected sound signal is the preset sound signal according to the sound detection results of each stage.

[0046] In the application, k=1, 2, ..., K, K is a positive integer, that is, K is an integer greater than or equal to 1, and all sound detection stages include at least two stages. The first duration, the second duration, the preset number and the value of K can be set according to actual needs. For example, the first duration is 50 milliseconds (ms), the second duration is 0.5 ms, the preset number is 1, and K is 3. The first duration should be greater than the second duration, so that the sleep time of the sound detection device is greater than the initial wake-up time (that is, the second duration), so that only a small amount of sound signals need to be collected during the initial wake-up time, and the characteristic parameters of the small amount of sound signals are used to preliminarily determine whether the collected sound signals are similar to or the same as the characteristics of the preset sound signals. If not (that is, the characteristic parameters of the sound signals of the second duration are less than or equal to the corresponding threshold), the sleep state is entered again. In this way, by waking up briefly and collecting a small amount of sound signals for preliminary judgment, power consumption can be effectively reduced, avoiding waking up for a long time at the beginning and collecting more sound signals that do not meet the characteristic parameter threshold, wasting energy. After the characteristic parameters of the sound signal collected during the initial wake-up time are greater than the corresponding threshold, continue to maintain the wake-up state and collect more sound signals (that is, sound signals of a preset number of sound frames). The preset number should be greater than or equal to 1, so that the sound signal used for staged detection contains at least one sound frame, so that the sound signal used for staged detection has a sufficient amount of data to improve the accuracy of the detection result. After passing the first stage of sound detection, continue to maintain the wake-up state and collect sound signals to perform the second stage of sound detection. After passing the second stage of sound detection, continue to maintain the wake-up state and collect sound signals to perform the third stage of sound detection, and so on, until all stages of sound detection are passed.

[0047] In application, under normal circumstances, if there is no preset sound signal that needs to be detected in the environment, the sound signal detected by the sound detection device will show a smooth change in the time domain or frequency domain characteristics, that is, the amplitude or energy in the time domain or frequency domain should be low. If there is a preset sound signal that needs to be detected in the environment, the sound signal detected by the sound detection device will show a large fluctuation in the time domain or frequency domain characteristics, that is, the amplitude or energy in the time domain or frequency domain should be high. Therefore, by preliminarily determining whether the amplitude or energy of the collected sound signal is greater than the corresponding threshold, it can be preliminarily determined whether the preset sound signal is detected.

[0048] In the application, the sound detection device can communicate with the client through any wired or wireless communication method to send an alarm signal to the client. The alarm signal can be notified to the user in a human-computer interaction method supported by the human-computer interaction device of the client. The human-computer interaction device of the client may include at least one of a display, a voice playback device (for example, a speaker), and an LED light, so that the client can notify the user of the alarm signal through a corresponding display method, voice broadcast method, sound prompt or light prompt method.

[0049] like Figure 2 As shown, in one embodiment, the characteristic parameter includes a time domain peak amplitude, and before step S103, the following steps S201 and S202 are included:

[0050] Step S201, performing time domain conversion on the digital signal of the sound signal to obtain a time domain waveform diagram of the sound signal;

[0051] Step S202: Obtain the time-domain peak amplitude of the sound signal according to the time-domain waveform diagram.

[0052] like Figure 2 As shown, in one embodiment, the characteristic parameter includes time domain energy, and before step S103, the following steps S201, S203 and S204 are included:

[0053] Step S201, performing time domain conversion on the digital signal of the sound signal to obtain a time domain waveform diagram of the sound signal;

[0054] Step S203: acquiring all time domain amplitudes of the sound signal according to the time domain waveform diagram;

[0055] Step S204: Obtain the time domain energy of the sound signal according to all the time domain amplitudes.

[0056] In one embodiment, the calculation formula of the time domain energy is:

[0057]

[0058] Wherein, E represents the time domain energy, A represents the number of all time domain amplitudes, S(a) represents the ath time domain amplitude of the time domain waveform, a=1, 2,…, A, A≥2 and A is an integer.

[0059] In applications, a time domain waveform is a graph that uses time as the horizontal axis and amplitude as the vertical axis to reflect the change of the amplitude of a digital signal over time. The characteristic parameters of a sound signal in the time domain can also be equivalently replaced by the characteristic parameters in the frequency domain. The methods of obtaining the two are similar. You only need to replace the time domain with the frequency domain. I will not go into details here.

[0060] In one embodiment, the operation of performing sound detection on the sound signal in stages includes:

[0061] In the first stage, the sound signal is continuously subjected to the same frequency detection;

[0062] In the subsequent stage, the sound signal is periodically detected.

[0063] In the application, the preset sound signal to be detected is a periodic continuous sound signal emitted in a fixed sounding manner. Therefore, detecting whether there are continuous identical frequencies among all peak amplitude frequencies is one of the conditions for determining whether the collected sound signal is the preset sound signal. Detecting the period of the sound signal is the second condition for determining whether the collected sound signal is the preset sound signal.

[0064] like Figure 3 As shown, in one embodiment, the operation of performing sound detection on the sound signal in stages specifically includes the following steps S301 to S307:

[0065] Step S301, capturing sound frames of a first preset time length on the digital signal of the sound signal to obtain each sound frame of the sound signal;

[0066] Step S302: Perform frequency domain conversion on each of the audio frames to obtain a frequency domain waveform diagram of each of the audio frames.

[0067] In the application, after obtaining the sound signal of the preset number of sound frames, first, the processor uses a window function to intercept the sound frame of the first preset time length on the digital signal, and the sound signal is captured as a number of sound frames of the first preset time length to reduce the distortion on the spectrum and obtain each sound frame of the sound signal; then, each sound frame is spectrally converted to obtain a frequency domain waveform map (Amplitude Frequency Spectrum Map) of each sound frame. The window function can be a Hamming window, a Fejer window, a Hanning window, a Gaussian window, etc. Fourier transform (Fourier Transformation, FT) can be used to perform spectrum conversion on the sound frame, and the Fourier transform can be a fast Fourier transform (Fast Fourier Transformation, FFT). The first preset time length can be set according to actual needs, for example, 32ms. The frequency domain waveform is a graph with frequency as the horizontal coordinate and amplitude as the vertical coordinate, which is used to reflect the amplitude of each sound frame as the frequency changes.

[0068] In one embodiment, before step S201 and step S301, the following steps are included:

[0069] converting the sound signal into a current signal;

[0070] amplifying the current signal;

[0071] Performing filtering processing on the amplified current signal to obtain an analog signal;

[0072] Performing analog-to-digital conversion on the analog signal to obtain a digital signal;

[0073] After step S301, the following steps are included:

[0074] Noise reduction processing is performed on each of the sound frames.

[0075] In the application, first, the collected sound signal is converted into a current signal through the sound receiving unit; then, the current signal is amplified by an amplifier with a preset sensitivity, and the preset sensitivity can be set in advance according to actual needs; then, the amplified current signal is filtered by a filter to obtain an analog signal (Analog Signal), and the filtering process includes adjusting the frequency spectrum response (Frequency Spectrum Response), sound enhancement, equalization (Equalization) processing, filtering out noise, etc.; then, the analog signal is digitally converted by an analog to digital converter (Analog to Digital Converter, ADC) with a preset sampling frequency and a preset number of bits to obtain a digital signal (Digital Signal), and the preset sampling frequency and the preset number of bits can be set according to actual needs; finally, each sound frame is subjected to noise reduction processing by a digital filter or processor to reduce the spectrum response of the frequency band that does not need to be detected or filter out noise.

[0076] Step S303: Obtain the frequency of the frequency domain peak amplitude of the frequency domain waveform of each of the audio frames.

[0077] In the application, the frequency of the peak amplitude of the sound frame is the frequency corresponding to the maximum amplitude in the frequency domain waveform of the sound frame. The resolution fr of the frequency domain waveform is determined by the preset sampling frequency FS and the length N of the Fourier transform, fr = Fs / N, the amplitude of each spectrum signal can be expressed as Xf(n), n = 0, 1, 2, ..., N-1, and the frequency position of each spectrum signal is fp = n*Fs / N = n*fr.

[0078] like Figure 4 As shown, in one embodiment, step S303 includes the following steps S401 to S403:

[0079] S401, obtaining all amplitudes of the frequency domain waveform of each of the audio frames;

[0080] S402, determining the peak amplitude of the frequency domain waveform graph of each of the audio frames according to all amplitudes of the frequency domain waveform graph of each of the audio frames;

[0081] S403. Obtain the frequency of the peak amplitude of the frequency domain waveform of each of the sound frames according to the peak amplitude of the frequency domain waveform of each of the sound frames.

[0082] In the application, for any sound frame, the method for obtaining the frequency of the peak amplitude of its frequency domain waveform is: first, obtain all amplitudes in the frequency domain waveform of the sound frame; then, determine the peak amplitude from all amplitudes; finally, obtain the frequency corresponding to the peak amplitude.

[0083] In one embodiment, step S402 includes:

[0084] Compare the nth amplitude of the frequency domain waveform of each of the audio frames with the n-1th amplitude, twice the n-2th amplitude, three times the n-3th amplitude, the n+1th amplitude, twice the n+2th amplitude, and three times the n+3th amplitude; wherein n=0, 1, 2, ..., N-1, and N is the number of all amplitudes of the frequency domain waveform of each of the audio frames;

[0085] The i-th amplitude in the frequency domain waveform of each sound frame, which is greater than the i-1th amplitude, twice the i-2th amplitude, three times the i-3th amplitude, the i+1th amplitude, twice the i+2th amplitude and three times the i+3th amplitude, is determined as the peak amplitude of the frequency domain waveform of each sound frame; wherein, i∈[0,N-1].

[0086] In the application, for any sound frame, if a certain amplitude in its frequency domain waveform is respectively greater than 3 times, 2 times and 1 times of the three amplitudes before the amplitude and greater than 1 times, 2 times and 3 times of the three amplitudes after the amplitude, then the amplitude is considered to be the peak amplitude. That is, for each amplitude Xf(n), compare Xf(n) with Xf(n-3)*3, Xf(n-2)*2, Xf(n-1) and Xf(n+1), Xf(n+2)*2, Xf(n+3)*3. When a certain amplitude Xf(i) is greater than Xf(i-3)*3, Xf(i-2)*2, Xf(i-1) and Xf(i+1), Xf(i+2)*2, Xf(i+3)*3, the amplitude Xf(i) is determined to be the peak amplitude. Then the frequency fp corresponding to the peak amplitude is calculated based on i and the resolution fr of the frequency domain waveform. max , fp max =i*fr.

[0087] Step S304: Detect whether there are consecutive identical frequencies among all the peak amplitude frequencies.

[0088] like Figure 5 As shown, in one embodiment, step S304 includes the following steps S501 to S503:

[0089] S501, comparing the frequencies of the peak amplitudes of the frequency domain waveforms of the mth sound frame and the m-1th and m-2th sound frames among all the sound frames; wherein m=1, 2, ..., M, and M is the number of all the sound frames;

[0090] S502, when the difference in frequency between the peak amplitude of the frequency domain waveform of the j-th sound frame and the j-1-th or j-2-th sound frame among all the sound frames is within a preset frequency difference range, determining that a continuous identical frequency is detected; wherein j∈[1,M];

[0091] S503: When the frequency difference between the peak amplitudes of the frequency domain waveforms of the j-th sound frame and the j-1-th and j-2-th sound frames among all the sound frames is not within a preset frequency difference range, it is determined that no continuous identical frequencies are detected.

[0092] In the application, the method for detecting whether there are continuous identical frequencies in the frequencies of all peak amplitudes is as follows: for any audio frame m, respectively compare the frequency of the peak amplitude of the frequency domain waveform of the audio frame m with the previous audio frame m-1 and audio frame m-2 (the interval between audio frame m and audio frame m-2 is audio frame m-1); when the frequency difference of the peak amplitude of the frequency domain waveform of a certain audio frame j with the previous audio frame j-1 or audio frame j-2 (the interval between audio frame j and audio frame j-2 is audio frame j-1) is within the preset frequency difference range, it is determined that continuous identical frequencies are detected; when the frequency difference of the peak amplitude of the frequency domain waveform of a certain audio frame j with the previous audio frame j-1 and audio frame j-2 is not within the preset frequency difference range, it is determined that continuous identical frequencies are not detected. The preset frequency difference range can be set according to actual needs, for example, the preset frequency difference range can be -fr to +fr, where fr is the resolution of the frequency domain waveform.

[0093] Step S305: if there are continuous identical frequencies among all the frequencies of the peak amplitudes, it is determined that the sound signal passes the continuous identical frequency detection of the first stage;

[0094] Step S306: if there are no consecutive identical frequencies among all the peak amplitude frequencies, it is determined that the sound signal has not passed the first stage of consecutive identical frequency detection;

[0095] Step S307: If the sound signal passes the continuous same frequency detection in the first stage, the subsequent stage of periodic detection is performed according to the frequency domain waveform diagrams of all the sound frames.

[0096] like Figure 6 As shown, in one embodiment, step S307 includes the following steps S601 to S603:

[0097] Step S601, when the first count value is equal to 1, if the number of phase change cycles is equal to 0 and the second count value is greater than or equal to the second preset time length, determine the start time of the first positive cycle of the sound signal detected; wherein the first count value is used to record the number of sound frames with the same frequency detected continuously, the second count value is used to record the number of sound frames with the same frequency not detected continuously, the phase change cycle number is used to record the number of times the positive cycle and negative cycle of the sound signal change, and the second preset time length is equal to the time length when the preset sound signal is not detected or the interval time length between two preset sound signals.

[0098] In the application, the first count value is used to record the number of sound frames with the same frequency detected continuously. The second count value is used to record the number of sound frames without the same frequency detected continuously. The number of phase change cycles is used to record the timing changes of the positive and negative cycles of the sound signal. The total duration of the positive and negative cycles is used to record the time when the positive and negative cycles change. The total duration of the positive and negative cycles is numerically expressed in the number of sound frames and the unit is the first preset time length.

[0099] Before step S601, the initial values ​​of the parameters to be detected, such as the first count value SameMaxPeakPosCnt, the second count value DiffMaxPeakPosCnt, the number of phase change cycles Alarm_Pattern_Phase, the total duration of positive and negative cycles Alarm_Pattern_Time[Alarm_Pattern_Phase], and the number of captured sound frames FrameCnt, are set to 0. That is,

[0100] SameMaxPeakPosCnt = 0;

[0101] DiffMaxPeakPosCn = 0;

[0102] Alarm_Pattern_Phase = 0;

[0103] Alarm_Pattern_Time[Alarm_Pattern_Phase]=0;

[0104] FrameCnt=0.

[0105] In an application, the specific timing of setting the initial value may be any time before step S304, for example, before step S101.

[0106] In the application, when the same frequency is detected continuously, the first count value is increased by 1 and the second count value is reset to 0.

[0107] SameMaxPeakPosCnt=SameMaxPeakPosCnt+1;

[0108] DiffMaxPeakPosCn = 0;

[0109] When the same frequency is not detected continuously, the second count value is increased by 1, that is,

[0110] DiffMaxPeakPosCn=DiffMaxPeakPosCn+1;

[0111] When the phase change cycle number is greater than 0 and the sound frame is captured, the number of captured sound frames is increased by 1, that is,

[0112] Alarm_Pattern_Time[Alarm_Pattern_Phase]=FrameCnt;

[0113] When the number of phase change cycles is greater than 0, the total time length of the positive and negative cycles is equal to the number of captured sound frames, that is,

[0114] FrameCnt=FrameCnt+1.

[0115] In the application, the first count value equal to 1 indicates that the number of sound frames with the same continuous frequency detected is equal to 1. At this time, if the number of phase change cycles is equal to 0, it indicates that the positive and negative cycles have not changed and are at the start time of the first cycle or before the start time of the first cycle. The second count value is greater than or equal to the second preset time length Td, indicating that the number of sound frames with the same continuous frequency that have not been detected is greater than or equal to the interval time length between two preset sound signals or the number of sound frames corresponding to the time length when the preset sound signal is not detected. When the three conditions of the first count value being equal to 1, the number of phase change cycles being equal to 0, and the second count value being greater than or equal to the second preset time length are met at the same time, the start time of the first positive cycle of the detected sound signal can be determined. That is, when SameMaxPeakPosCnt=1, Alarm_Pattern_Phase=1 and DiffMaxPeakPosCn≥Td, let

[0116] Alarm_Pattern_Time[0] = 0;

[0117] Alarm_Pattern_Phase = 1;

[0118] FrameCnt = 1;

[0119] Alarm_Pattern_Time[1]=1.

[0120] In the application, the second preset time length Td is numerically equal to the interval time length between two preset sound signals or the number of sound frames corresponding to the time length when the preset sound signal is not detected, and the unit is the first preset time length. The second preset time length Td can be determined according to the type of the preset sound signal, for example, Td=32 (Frames), the first preset time length is 30ms, Td=32*30ms≈1s (second).

[0121] Step S602, when the first count value is equal to 1, if the number of phase change cycles is greater than or equal to 1 and the second count value is greater than or equal to a third preset time length, determine the start time of the kth positive cycle of the sound signal detected; wherein the third preset time length is equal to the time length of the negative cycle of the preset sound signal or the interval time length between two positive cycles of the preset sound signal, and k is an integer greater than or equal to 2.

[0122] In the application, the first count value equal to 1 indicates that the number of sound frames with the same continuous frequency detected is equal to 1. At this time, if the number of phase change cycles is greater than or equal to 1, it indicates that the phase has changed at least once and is at the start time of the second cycle or after the start time of the second cycle. The second count value is greater than or equal to the third preset time length Tn, indicating that the number of sound frames with the same continuous frequency that have not been detected is greater than or equal to the time length of the negative cycle of the preset sound signal or the number of sound frames corresponding to the interval time length of the two positive cycles of the preset sound signal. When the three conditions that the first count value is equal to 1, the number of phase change cycles is greater than or equal to 1, and the second count value is greater than or equal to the third preset time length are met at the same time, the start time of the second or subsequent positive cycle of the sound signal can be determined. That is, when SameMaxPeakPosCnt=1, Alarm_Pattern_Phase≥1 and DiffMaxPeakPosCn≥Tn, let

[0123] Alarm_Pattern_Time[Alarm_Pattern_Phase]=FrameCnt-1;

[0124] Alarm_Pattern_Phase=Alarm_Pattern_Phase+1;

[0125] Alarm_Pattern_Time[Alarm_Pattern_Phase]=FrameCnt.

[0126] In the application, the third preset time length Tn is numerically equal to the time length of the negative cycle of the preset sound signal or the number of sound frames corresponding to the time length of the interval between two positive cycles of the preset sound signal, and the unit is the first preset time length. The third preset time length Tn can be determined according to the type of the preset sound signal. For example, when the time length of the negative cycle is 0.5s, Tn=15 (Frames), when the first preset time length is 30ms, Tn=15*30ms≈0.5s; in the actual sound detection environment, affected by the spatial echo, the time length of the detected negative cycle will be less than 0.5s, therefore, Tn=5 (Frames) can be set, when the first preset time length is 30ms, Tn=5*30ms=0.15s; when the time length of the negative cycle is 0.1s, Tn=1 (Frames) can also be set, when the first preset time length is 30ms, Tn=1*30ms=0.03s.

[0127] Step S603, when no continuous identical frequency is detected, if the number of phase change cycles is greater than 0, the first count value is greater than or equal to a fourth preset time length, and the second count value is greater than or equal to a third preset time length, determine the start time of a negative cycle of the sound signal detected; wherein the fourth preset time length is equal to the time length of a positive cycle of the preset sound signal.

[0128] In the application, if the same continuous frequency is not detected, it indicates that the positive cycle of the sound signal is not detected. At this time, if the number of phase change cycles is greater than 0, it indicates that the phase has changed, it is at the start time of the second cycle or after the start time of the second cycle, and the first count value is greater than or equal to the fourth preset time length Tp, it indicates that the number of sound frames with the same continuous frequency detected is greater than or equal to the number of sound frames corresponding to the time length of the positive cycle of the preset sound signal, and the second count value is greater than or equal to the third preset time length Tn, it indicates that the number of sound frames with the same continuous frequency detected is greater than or equal to the time length of the negative cycle of the preset sound signal or the number of sound frames corresponding to the interval time length of two positive cycles of the preset sound signal. When the three conditions of the first count value being equal to 1, the number of phase change cycles being greater than or equal to 1, and the second count value being greater than or equal to the third preset time length are met at the same time, the start time of a negative cycle of the sound signal can be determined. That is, when Alarm_Pattern_Phase>0, SameMaxPeakPosCnt≥Tp, and DiffMaxPeakPosCn≥Tn, let

[0129] Alarm_Pattern_Time[Alarm_Pattern_Phase]=FrameCnt-Tn;

[0130] Alarm_Pattern_Phase=Alarm_Pattern_Phase+1;

[0131] SameMaxPeakPosCnt=0.

[0132] In the application, the third preset time length Tn is numerically equal to the number of sound frames corresponding to the time length of the negative cycle of the preset sound signal or the time length between two positive cycles of the preset sound signal, and the unit is the first preset time length. The fourth preset time length Tp is numerically equal to the number of sound frames corresponding to the time length of the positive cycle of the preset sound signal, and the unit is the first preset time length. The third preset time length Tn and the fourth preset time length Tp can be determined according to the type of preset sound signal. For example, when the time lengths of the positive cycle and the negative cycle are both 0.5s, Tp=Tn=15 (Frames). When the first preset time length is 30ms, Tp=Tn=15*30ms≈0.5s. In the actual sound detection environment, affected by the spatial echo, the time lengths of the detected positive and negative cycles will be less than 0.5s. Therefore, Tp=Tn=5 (Frames) can be set. When the first preset time length is 30ms, TpTn=5*30ms=0.15s. When the time lengths of the positive and negative cycles are both 0.1s, Tp=3 (Frames) and Tn=1 (Frames) can also be set. When the first preset time length is 30ms, Tp=3*30ms≈0.1s and Tn=1*30ms=0.03s.

[0133] like Figure 7 As shown, a schematic diagram of the positive and negative cycle timing of the T3 alarm sound signal under the T3 smoke alarm standard is exemplarily shown; wherein the time length of the positive cycle and the time length of the negative cycle are both 0.5s, and the time interval between two T3 alarm sound signals is 1.5s.

[0134] like Figure 8 As shown, a schematic diagram of the positive and negative cycle timing of the T4 alarm sound signal under the T4 smoke alarm standard is exemplarily shown; wherein the time length of the positive cycle and the time length of the negative cycle are both 0.1s, and the time interval between two T4 alarm sound signals is 5.1s.

[0135] In one embodiment, step S107 includes:

[0136] According to the period of the sound signal, it is determined whether the sound signal is a preset sound signal.

[0137] In the application, after determining the period of the sound signal, the periodic characteristics of the sound signal can be compared with the periodic characteristics of the preset sound signal. If the periodic characteristics of the two match, the sound signal can be determined to be the preset sound signal. The periodic characteristics may include but are not limited to the total duration of positive and negative cycles, the number of phase change cycles, the timing of positive and negative cycles, the time length of the positive cycle, the time length of the negative cycle, etc.

[0138] like Fig. 9 As shown, in one embodiment, step S107 includes the following steps S901 to S905:

[0139] Step S901: When the number of phase change cycles is greater than 0 and the second count value is greater than or equal to a second preset time length, determine whether the total duration of positive and negative cycles is within a preset duration range.

[0140] In the application, if the number of phase change cycles is greater than 0 and the second count value is greater than or equal to the second preset time length, it indicates that at least one positive cycle is detected. At this time, it is possible to start judging whether the sound signal to be detected is a preset sound signal based on the number of phase change cycles and the total time length of the positive and negative cycles. First, it is judged whether the total time length of the positive and negative cycles is within the preset time length range. When the total time length of the positive and negative cycles is within the preset time length range, further judgment is made. Otherwise, the initial detection state is returned, the initial value of each parameter to be detected is set to 0, and detection is restarted. The preset duration range can be set according to the total duration of the positive and negative cycles of the preset sound signal. Specifically, it can be set to a duration range in which there is a certain tolerable error between the total duration of the positive and negative cycles of the preset sound signal. Taking the T3 alarm sound signal as an example, the total duration of the positive and negative cycles of the T3 alarm sound signal (the start time of the first positive cycle to the start time of the third negative cycle) is 2.5s, and the preset duration range can be set to 2s~3s; taking the T4 alarm sound signal as an example, the total duration of the positive and negative cycles of the T4 alarm sound signal (the start time of the first positive cycle to the start time of the fourth negative cycle) is 0.7s, and the preset duration range can be set to 0.6~1s.

[0141] Step S902: When the total duration of the positive and negative cycles is within a preset time range, determine whether the number of phase change cycles is within a preset cycle number range.

[0142] In the application, when the total duration of the positive and negative cycles is within the preset time range, it is further determined whether the number of phase change cycles is within the preset number of cycles. When the number of phase change cycles is within the preset number of cycles, the next step of determination is performed. Otherwise, the initial detection state is returned, the initial value of each parameter to be detected is set to 0, and the detection is restarted. The preset number of cycles range can be set according to the number of phase change cycles of the preset sound signal, and can be specifically set to a range of cycles with a certain tolerable error with the number of phase change cycles of the preset sound signal. Taking the T3 alarm sound signal as an example, the number of phase change cycles of the T3 alarm sound signal (from the beginning of the first positive cycle to the end of the third negative cycle) is 6, and the preset number of cycles range can be set to 6 to 10; taking the T4 alarm sound signal as an example, the number of phase change cycles of the T4 alarm sound signal (from the beginning of the first positive cycle to the end of the fourth negative cycle) is 8, and the preset number of cycles range can be set to 6 to 12.

[0143] Step S903: When the phase change cycle number is within a preset cycle number range, determine whether the positive and negative cycle timing of the sound signal is within a preset timing range; wherein the positive and negative cycle timing includes a positive cycle timing and a negative cycle timing.

[0144] In the application, when the number of phase change cycles is within the preset cycle number range, it is further determined whether the positive and negative cycle timing of the sound signal is within the preset timing range. When the positive and negative cycle timing is within the preset timing range, the next step of determination is performed. Otherwise, the initial detection state is returned, the initial value of each parameter to be detected is set to 0, and the detection is restarted. The preset timing range can be set according to the positive and negative cycle timing of the preset sound signal, and can be specifically set to a timing range with a certain tolerable error between the positive and negative cycle timing of the preset sound signal. Taking the T3 alarm sound signal as an example, the interval time length between the start time or end time of the two positive cycles of the T3 alarm sound signal is 1s, and the preset timing range can be set to 0.75s~1.25s; taking the T4 alarm sound signal as an example, the interval time length between the start time or end time of the two positive cycles of the T4 alarm sound signal is 0.2s, and the preset timing range can be set to 0.1s~0.3s.

[0145] Step S904: when the positive and negative cycle timing is within a preset timing range, determining whether the number of positive and negative cycle matches between the sound signal and the preset sound signal is greater than or equal to a preset matching number;

[0146] Step S905: When the difference between the positive and negative cycle matching number and the preset matching number is within a preset matching number difference range, determining that the sound signal is the preset sound signal.

[0147] In the application, when the positive and negative cycle timing is within the preset timing range, it is further determined whether the number of positive and negative cycle matches between the sound signal and the preset sound signal is greater than or equal to the preset matching number. When the number of positive and negative cycle matches is greater than or equal to the preset matching number, the sound signal is determined to be the preset sound signal. Otherwise, the initial detection state is returned, the initial value of each parameter to be detected is set to 0, and the detection is restarted. The preset matching number range can be set to 2, that is, as long as the sound signal matches the preset sound signal with at least two groups of cycles, the sound signal can be determined to be the preset sound signal, and each group of cycles includes a positive cycle and a negative cycle adjacent in timing. Taking the T3 alarm sound signal as an example, the T3 alarm sound signal includes three groups of periods P1, P2 and P3. As long as the sound signal to be tested and at least two groups of P1, P2 and P3 meet the requirements of the above-mentioned preset timing range, it can be determined that the sound signal to be tested is the T3 alarm sound signal; taking the T4 alarm sound signal as an example, the T4 alarm sound signal includes four groups of periods Q1, Q2, Q3 and Q4. As long as the sound signal to be tested and at least two groups of Q1, Q2, Q3 and Q4 meet the requirements of the above-mentioned preset timing range, it can be determined that the sound signal to be tested is the T4 alarm sound signal.

[0148] In the application, parameters such as preset sensitivity, preset sampling frequency, preset number of bits, preset frequency difference range, first preset time length to fourth preset time length, preset time length range, preset cycle number range, preset timing range, preset number of matches, preset sound signal, etc. can be set by the user through the sound detection device or the human-computer interaction device of the client according to actual needs. The human-computer interaction device may include at least one of a physical button, a touch sensor, a gesture recognition sensor, and a voice recognition device (for example, a microphone and a voice processing chip), so that the user can set each parameter through a corresponding touch method, gesture control method, or voice control method.

[0149] In the application, the characteristic parameters include various parameters related to the characteristics of the sound signal obtained by analyzing and processing the sound signal, such as amplitude, energy, frequency, period and other related parameters. After entering the sleep state each time, the initial state is restored, and these characteristic parameters are reset to 0 or the initial value, and the sleep time reaches the first duration before re-entering the next cycle of wake-up and sound detection.

[0150] The sound detection method provided in the embodiment of the present application can enter a sleep state to reduce power consumption when the collected sound signal does not meet the corresponding detection conditions. At the same time, it can reduce the operating load and heat generation, thereby increasing the service life. It can also communicate and interact with the alarm. When the alarm sound signal is detected, it can promptly notify the user or relevant rescue unit at a long distance to carry out emergency rescue processing, which can effectively prevent disasters or reduce the loss of life and property caused by disasters; it can also be used to detect the horn signals issued by vehicles, the call signals issued by rare animals, the ground sound signals formed by seismic waves, etc., so that it can be used to detect whether the vehicle is honking illegally or whether there is a vehicle approaching, to detect whether there are rare animals, to detect whether an earthquake has occurred, etc.

[0151] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0152] The present application also provides a sound detection device, which is applied to a sound detection device, and the sound detection device is used to execute the method steps in the above-mentioned sound detection method embodiment. The sound detection device can be a virtual appliance in the sound detection device, which is run by a processor of the sound detection device, or it can be the sound detection device itself.

[0153] like Fig.10 As shown, the sound detection device 100 provided in the embodiment of the present application includes:

[0154] A wake-up unit 101 is configured to enter a wake-up state and start collecting sound signals if the sleep time reaches a first time, until the wake-up time reaches a second time, where the second time is less than the first time;

[0155] The first detection unit 102 is used to determine whether the characteristic parameter of the sound signal is greater than a corresponding threshold; if so, continue to collect the sound signal until a preset number of sound frames are reached; if not, enter a dormant state; wherein the characteristic parameter includes amplitude or energy;

[0156] The second detection unit 103 is used to perform sound detection on the sound signal in stages; if the sound detection of the kth stage is passed, the sound detection of the k+1th stage is performed; if the sound detection of the kth or k+1th stage is not passed, the sound detection enters a dormant state; wherein k=1, 2, ..., K, and K is a positive integer.

[0157] The alarm unit 104 is used to determine whether the sound signal is a preset sound signal according to the sound detection result after passing all stages of sound detection; if so, an alarm signal is issued; if not, a dormant state is entered.

[0158] In one embodiment, the sound detection device further comprises a data processing unit for:

[0159] Performing time domain conversion on the digital signal of the sound signal to obtain a time domain waveform diagram of the sound signal;

[0160] According to the time domain waveform diagram, the time domain peak amplitude of the sound signal is obtained.

[0161] According to the time domain waveform diagram, obtaining all time domain amplitudes of the sound signal;

[0162] The time domain energy of the sound signal is obtained according to all the time domain amplitudes.

[0163] In one embodiment, the sound detection device further comprises:

[0164] A sound collection unit, used for converting the sound signal into a current signal;

[0165] an amplifying unit, used for amplifying the current signal;

[0166] A filtering unit, used for filtering the amplified current signal to obtain an analog signal;

[0167] an analog-to-digital conversion unit, used for performing analog-to-digital conversion on the analog signal to obtain a digital signal;

[0168] A noise reduction unit is used to perform noise reduction processing on each of the sound frames.

[0169] In the application, each unit in the sound detection device can be a software program unit, or can be implemented by different logic circuits integrated in the processor, or can be implemented by multiple distributed processors. For example, the wake-up unit can be implemented by a timer (crystal oscillator), the first detection unit, the second detection unit and the data processing unit sound frame capture unit can be implemented by a processor, the sound collection unit can be implemented by a microphone, the amplification unit can be implemented by an amplifier, the filtering unit and the noise reduction unit can be implemented by a filter, and the analog-to-digital conversion unit can be implemented by an analog-to-digital converter.

[0170] like Fig.11 As shown, the embodiment of the present application also provides a sound detection device 200, including: at least one processor 201 ( Fig.11Only one processor is shown in the figure), memory 202, a computer program 203 stored in the memory 202 and executable on at least one processor 201, a sound collection module 204, and a communication module 205. The memory 202, the sound collection module 204, and the communication module 205 are respectively connected to communicate with at least one processor 201. When the processor 201 executes the computer program 203, the steps in the above-mentioned various sound detection method embodiments are implemented.

[0171] In application, the sound detection device may include, but is not limited to, a processor, a memory, a sound collection module, and a communication module. Those skilled in the art will appreciate that Fig.11 It is only an example of a sound detection device and does not constitute a limitation of the sound detection device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include human-computer interaction devices, power supply devices, input and output devices, network access devices, etc.

[0172] In applications, the processor may be a central processing unit (CPU), which may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0173] In application, the memory may be an internal storage unit of the sound detection device in some embodiments, such as a hard disk or memory of the sound detection device. The memory may also be an external storage device of the sound detection device in other embodiments, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the sound detection device. The memory may also include both an internal storage unit and an external storage device of the sound detection device. The memory is used to store an operating system, an application program, a boot loader (Boot Loader), data, and other programs, such as program codes of a computer program, etc. The memory may also be used to temporarily store data that has been output or is to be output.

[0174] like Fig.12As shown, in one embodiment, the sound collection module 204 includes a sound receiving unit 2041, an amplifier 2042, a filter 2043 and an analog-to-digital converter 2044 connected in sequence, and the amplifier 2042, the filter 2043 and the analog-to-digital converter 2044 are respectively connected to the processor 201.

[0175] In applications, the sound receiving unit may include a microphone, and the amplifier, filter and analog-to-digital converter may be integrated into a voice processing chip or integrated with a processor.

[0176] In the application, the communication module can be set to any device that can directly or indirectly communicate with the client over a long distance by wire or wireless communication according to actual needs. For example, the communication module can provide communication solutions including wireless local area networks (WLAN) (such as Wi-Fi networks), Bluetooth, Zigbee, mobile communication networks, global navigation satellite systems (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc., which are applied to network devices. The communication module can be one or more devices integrating at least one communication processing module. The communication module can include an antenna, which can have only one array element or an antenna array including multiple array elements. The communication module can receive electromagnetic waves through the antenna, frequency modulate and filter the electromagnetic wave signals, and send the processed signals to the processor. The communication module can also receive the signal to be sent from the processor, frequency modulate and amplify it, and convert it into electromagnetic waves for radiation through the antenna.

[0177] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0178] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units is used as an example for illustration. In practical applications, the above-mentioned functions can be assigned to different functional units as needed, that is, the internal structure of the device can be divided into different functional units to complete all or part of the functions described above. The functional units in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0179] The embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned various sound detection method embodiments can be implemented.

[0180] An embodiment of the present application provides a computer program product. When the computer program product runs on a sound detection device, the sound detection device can implement the steps in the above-mentioned various sound detection method embodiments.

[0181] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the process in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the sound detection device, a recording medium, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.

[0182] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0183] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0184] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0185] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0186] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A sound detection method, characterized in that: include: If the sleep time reaches the first time, the device enters the wake-up state and starts to continuously collect sound signals until the wake-up time reaches the second time, and obtains a sound signal of the second time, where the second time is less than the first time; Determine whether the characteristic parameter of the sound signal is greater than the corresponding threshold; if so, continue to collect the sound signal until the preset number of sound frames is reached, and obtain the sound signal of the preset number of sound frames; if not, enter a dormant state; wherein the characteristic parameter includes amplitude or energy; Performing sound detection on the sound signal in stages; if the sound detection of the kth stage is passed, then continuing to stay awake and continuously collecting sound signals to perform sound detection of the k+1th stage; if the sound detection of the kth or k+1th stage is not passed, then entering a dormant state; wherein k=1, 2, ..., K, K is a positive integer, and the kth stage is to perform sound detection on the sound signals of the preset number of sound frames; After passing all stages of sound detection, determine whether the sound signal is a preset sound signal according to the sound detection result, wherein the preset sound signal is a periodic continuous sound signal emitted in a fixed sounding manner; if so, issue an alarm signal; if not, enter a dormant state; The step of performing sound detection on the sound signal in stages includes: In the first stage, continuously detecting the same frequency of the sound signal is used as one of the conditions for determining whether the sound signal is the preset sound signal; In the subsequent stage, the sound signal is periodically detected as the second condition for determining whether the sound signal is the preset sound signal.

2. The sound detection method according to claim 1, characterized in that: Before determining whether the characteristic parameter of the sound signal is greater than a corresponding threshold, the method includes: Performing time domain conversion on the digital signal of the sound signal to obtain a time domain waveform diagram of the sound signal; According to the time domain waveform diagram, obtaining the time domain peak amplitude of the sound signal; Alternatively, all time domain amplitudes of the sound signal are obtained according to the time domain waveform diagram; The time domain energy of the sound signal is obtained according to all the time domain amplitudes.

3. The sound detection method according to claim 2, characterized in that: The calculation formula of the time domain energy is: Wherein, E represents the time domain energy, A represents the number of all time domain amplitudes, S(a) represents the ath time domain amplitude of the time domain waveform, a=1, 2,…, A, A≥2 and A is an integer.

4. The sound detection method according to claim 1, characterized in that: The step of performing sound detection on the sound signal in stages includes: Capturing a sound frame of a first preset time length on the digital signal of the sound signal to obtain each sound frame of the sound signal; Performing frequency domain conversion on each of the audio frames to obtain a frequency domain waveform diagram of each of the audio frames; Obtaining the frequency of the frequency domain peak amplitude of the frequency domain waveform diagram of each of the sound frames; Detecting whether there are consecutive identical frequencies among all the peak amplitude frequencies; If there are continuous identical frequencies among all the frequencies of the peak amplitudes, determining that the sound signal passes the continuous identical frequency detection of the first stage; If there are no consecutive identical frequencies among all the peak amplitude frequencies, determining that the sound signal has not passed the first stage of consecutive identical frequency detection; If the sound signal passes the continuous same frequency detection in the first stage, the periodic detection in the subsequent stage is performed according to the frequency domain waveform diagrams of all the sound frames.

5. The sound detection method according to claim 4, characterized in that: The step of determining whether the sound signal is a preset sound signal according to the sound detection result includes: According to the period of the sound signal, it is determined whether the sound signal is a preset sound signal.

6. The sound detection method according to claim 2 or 4, characterized in that: Before performing time domain conversion on the digital signal of the sound signal to obtain the time domain waveform of the sound signal, or before performing sound frame capture of a first preset time length on the digital signal of the sound signal to obtain each sound frame of the sound signal, the method comprises: converting the sound signal into a current signal; amplifying the current signal; Performing filtering processing on the amplified current signal to obtain an analog signal; Perform analog-to-digital conversion on the analog signal to obtain a digital signal.

7. A sound detection device, characterized in that: include: A wake-up unit, configured to enter a wake-up state and start to continuously collect sound signals until the wake-up time reaches a second time, if the sleep time reaches a first time, to obtain a sound signal of the second time, wherein the second time is less than the first time; A first detection unit is used to determine whether the characteristic parameter of the sound signal is greater than a corresponding threshold value; if so, continue to collect the sound signal until a preset number of sound frames are reached to obtain a sound signal of the preset number of sound frames; if not, enter a dormant state; wherein the characteristic parameter includes amplitude or energy; The second detection unit is used to perform sound detection on the sound signal in stages; if the sound detection of the kth stage is passed, the sound signal is continuously collected to perform the sound detection of the k+1th stage; if the sound detection of the kth or k+1th stage is not passed, the sound signal enters the dormant state; wherein k=1, 2, ..., K, K is a positive integer, and the kth stage is to perform sound detection on the sound signals of the preset number of sound frames; An alarm unit is used to determine whether the sound signal is a preset sound signal according to the sound detection result after passing all stages of sound detection, wherein the preset sound signal is a periodic continuous sound signal emitted in a fixed sounding mode; if so, an alarm signal is emitted; if not, a dormant state is entered; The step of performing sound detection on the sound signal in stages includes: In the first stage, continuously detecting the same frequency of the sound signal is used as one of the conditions for determining whether the sound signal is the preset sound signal; In the subsequent stage, the sound signal is periodically detected as the second condition for determining whether the sound signal is the preset sound signal.

8. A sound detection device, characterized in that: The invention comprises a sound collection module, a communication module, a memory, a processor and a computer program stored in the memory and executable on the processor. The sound collection module, the communication module and the memory are respectively connected to the processor. When the processor executes the computer program, the steps of the sound detection method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the sound detection method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Electronic device with speech wake-up function and operation method thereof

    CN108877788A

  • Method and device for triggering voice transmission

    CN109243447A