A sound detection method, device and equipment

By conducting spectrum analysis and cycle judgment on the sound signal of the siren, the problem of traditional sirens being unable to notify remote users in time is solved, the linkage between the siren and the client is realized, and the efficiency of disaster response is improved.

CN114765032BActive Publication Date: 2024-10-29ジャン州立達信光電子科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110049515.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-14
Publication Date
2024-10-29
Estimated Expiration
2041-01-14

AI Technical Summary

Technical Problem

Traditional sirens lack communication and linkage functions and cannot promptly notify remote users or relevant rescue units, making it difficult to prevent losses caused by disasters.

Method used

By performing spectrum conversion on the sound signal to be detected, it is detected whether the frequency of the peak amplitude is continuously the same, the period of the sound signal is determined, and whether it is a preset sound signal is determined. If it matches, an alarm signal is sent.

Benefits of technology

The communication linkage between the alarm and the client is realized to promptly notify remote users or rescue units, effectively preventing or reducing losses caused by disasters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114765032B_ABST
    Figure CN114765032B_ABST
Patent Text Reader

Abstract

The present application is applicable to the technical field of alarms, and provides a sound detection method, device and equipment, which obtains an amplitude spectrum diagram of each sound frame by performing spectrum conversion on each sound frame of a sound signal to be detected; obtains the frequency of the peak amplitude of the amplitude spectrum diagram of each sound frame; detects whether there are continuous identical frequencies among the frequencies of all peak amplitudes; when there are continuous identical frequencies among the frequencies of all peak amplitudes, detects the period of the sound signal to be detected according to the amplitude spectrum diagrams of all sound frames; determines whether the sound signal to be detected is a preset sound signal according to the period of the sound signal to be detected; and sends an alarm signal to a client when the sound signal to be detected is a preset sound signal, so as to communicate and interact with the alarm, and promptly notify a user or relevant rescue unit at a long distance to carry out emergency rescue when the alarm sound signal is detected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Traditional alarms, such as smoke alarms or carbon monoxide alarms, sound special alarms. These alarms usually lack communication and linkage functions. When the alarm sound signal is issued, it can only notify users or relevant rescue units within a short range. It is difficult to notify users or relevant rescue units at a long distance in time for emergency rescue, and it is impossible to effectively prevent disasters or reduce the loss of life and property caused by disasters. Summary of the invention

[0003] The embodiments of the present application provide a sound detection method, device and equipment to solve the problem that traditional alarms lack communication and linkage functions. When an alarm sound signal is issued, it can only notify users or relevant rescue units within a short range, and it is difficult to promptly notify users or relevant rescue units at a long distance for emergency rescue. It is impossible to effectively prevent disasters or reduce the loss of life and property caused by disasters.

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

[0005] Perform spectrum conversion on each sound frame of the sound signal to be detected to obtain an amplitude spectrum diagram of each sound frame;

[0006] Obtaining the frequency of the peak amplitude of the amplitude spectrum diagram of each of the sound frames;

[0007] Detecting whether there are consecutive identical frequencies among all the peak amplitude frequencies;

[0008] When there are continuous identical frequencies among all the frequencies of the peak amplitudes, detecting the period of the sound signal to be detected according to the amplitude spectrum diagrams of all the sound frames;

[0009] Determining whether the sound signal to be detected is a preset sound signal according to the period of the sound signal to be detected;

[0010] When the sound signal to be detected is a preset sound signal, an alarm signal is sent to the client.

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

[0012] A spectrum conversion unit, used for performing spectrum conversion on each sound frame of the sound signal to be detected, and obtaining an amplitude spectrum diagram of each sound frame;

[0013] A frequency acquisition unit, used to acquire the frequency of the peak amplitude of the amplitude spectrum diagram of each of the sound frames;

[0014] A frequency detection unit, used for detecting whether the frequencies of the peak amplitudes of the amplitude spectrum diagrams in all the sound frames are continuously the same;

[0015] A period detection unit, configured to detect the period of the sound signal to be detected according to the amplitude spectrum diagrams of all the sound frames when there are continuous identical frequencies in the frequencies of the peak amplitudes of the amplitude spectrum diagrams of all the sound frames;

[0016] a sound determination unit, configured to determine whether the sound signal to be detected is a preset sound signal according to a period of the sound signal to be detected;

[0017] The alarm unit is used to send an alarm signal to the client when the sound signal to be detected is a preset sound signal.

[0018] A third aspect of an embodiment of the present application provides a sound detection device, including 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.

[0019] 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.

[0020] The first aspect of the embodiment of the present application provides a sound detection method, which performs spectrum conversion on each sound frame of the sound signal to be detected to obtain an amplitude spectrum diagram of each sound frame; obtains the frequency of the peak amplitude of the amplitude spectrum diagram of each sound frame; detects whether there are continuous identical frequencies in the frequencies of all peak amplitudes; when there are continuous identical frequencies in the frequencies of all peak amplitudes, detects the period of the sound signal to be detected according to the amplitude spectrum diagrams of all sound frames; determines whether the sound signal to be detected is a preset sound signal according to the period of the sound signal to be detected; when the sound signal to be detected is a preset sound signal, sends an alarm signal to the client, can communicate and interact with the alarm, and can promptly notify users or relevant rescue units at a long distance to carry out emergency rescue when the alarm sound signal is detected, which can effectively prevent disasters or reduce the loss of life and property caused by disasters.

[0021] 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

[0022] 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.

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

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

[0025] Figure 3 is an amplitude spectrum diagram of a sound frame provided in an embodiment of the present application;

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

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

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

[0029] 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;

[0030] 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;

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

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

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

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

[0035] 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.

[0036] 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.

[0037] 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.

[0038] 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.

[0039] 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.

[0040] 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.

[0041] 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 to be detected in the environment, and when the sound signal to be detected with 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 an alarm, or it can be a sound signal to be detected emitted by a specific object to be detected, for example, a whistle signal emitted by a vehicle, a call signal emitted by a rare animal, an Earthquake Sound signal formed by an earthquake wave, etc. 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.

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

[0043] Step S101: Perform spectrum conversion on each sound frame of the sound signal to be detected to obtain an amplitude spectrum diagram of each sound frame.

[0044] In the application, after obtaining the sound signal to be detected, the sound signal to be detected is framed, so as to capture the sound signal to be detected into several sound frames of a first preset time length, and then each sound frame is spectrally converted to obtain an amplitude frequency spectrum map (Amplitude Frequency Spectrum Map) of each sound frame. A window function can be used to capture the alarm sound signal, and the window function can be a Hamming Window, a Fejer Window, a Hanning Window, a Gaussian Window, etc. A Fourier Transformation (FT) can be used to perform spectrum conversion on the sound frame, and the Fourier Transformation can be a Fast Fourier Transformation (FFT). The first preset time length can be set according to actual needs, for example, 30ms (milliseconds).

[0045] like Figure 2As shown, in one embodiment, before step S101, the following steps S201 to S206 are included:

[0046] Step S201, collecting a sound signal to be detected and converting the sound signal to be detected into a current signal;

[0047] Step S202, amplifying the current signal;

[0048] Step S203, filtering the amplified current signal to obtain an analog signal;

[0049] Step S204, performing analog-to-digital conversion on the analog signal to obtain a digital signal;

[0050] Step S205, capturing sound frames of a first preset time length on the digital signal to obtain each sound frame of the sound signal to be detected;

[0051] Step S206: performing noise reduction processing on each of the sound frames.

[0052] In the application, first, the sound signal to be detected 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 (AnalogSignal), 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), the preset sampling frequency and the preset number of bits can be set according to actual needs; then, the processor samples the digital signal using a window function to intercept a sound frame of a first preset time length to reduce the distortion on the spectrum and obtain each sound frame of the sound signal to be detected; finally, the processor performs noise reduction processing on each sound frame to reduce the spectrum response of the frequency band that does not need to be detected or filter out clutter, and a digital filter can be used to perform noise reduction processing.

[0053] Step S102: Obtain the frequency of the peak amplitude of the amplitude spectrum diagram of each of the sound frames.

[0054] In the application, the frequency of the amplitude of the sound frame is the frequency corresponding to the maximum amplitude in the amplitude spectrum of the sound frame. The resolution fr of the amplitude spectrum 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.

[0055] In the application, the amplitude spectrum diagram is a graph with frequency as the horizontal axis and amplitude as the vertical axis, which is used to reflect the change of the amplitude of each sound frame with frequency.

[0056] like Figure 3 As shown, an amplitude spectrum diagram of a sound frame is shown as an example; wherein the horizontal axis is frequency (unit Hz), the vertical axis is amplitude, the preset sampling frequency is 160 Hz, the length of the Fourier transform is 8, and the resolution is 20 Hz.

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

[0058] S401, obtaining all amplitudes of the amplitude spectrum diagram of each of the sound frames;

[0059] S402, determining the peak amplitude of the amplitude spectrum graph of each of the audio frames according to all amplitudes of the amplitude spectrum graph of each of the audio frames;

[0060] S403. Acquire the frequency of the peak amplitude of the amplitude spectrum diagram of each of the audio frames according to the peak amplitude of the amplitude spectrum diagram of each of the audio frames.

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

[0062] In one embodiment, step S402 includes:

[0063] Compare the nth amplitude of the amplitude spectrum graph of each of the sound 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 amplitude spectrum graph of each of the sound frames;

[0064] The i-th amplitude in the amplitude spectrum graph 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 amplitude spectrum graph of each sound frame; wherein, i∈[0,N-1].

[0065] In the application, for any sound frame, if a certain amplitude in its amplitude spectrum 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 amplitude spectrum. max , fp max =i*fr.

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

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

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

[0069] S501, comparing the frequencies of the peak amplitudes of the amplitude spectrograms of the mth audio frame and the m-1th and m-2th audio frames among all the audio frames; wherein m=1, 2, ..., M, and M is the number of all the audio frames;

[0070] S502, when the frequency difference between the peak amplitude of the amplitude spectrum diagram of the j-th sound frame and the j-1-th or j-2-th sound frame of all the sound frames is within a preset frequency difference range, it is determined that the same continuous frequency is detected; wherein j∈[1,M];

[0071] S503: When the frequency difference between the peak amplitudes of the amplitude spectrum diagrams 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.

[0072] In the application, the method for detecting whether there are continuous identical frequencies in the frequencies of all the peak amplitudes is as follows: for any audio frame m, respectively compare the frequency of the peak amplitude of the amplitude spectrum graph of the audio frame m-1 and the 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 amplitude spectrum graph of a certain audio frame j and the 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) before it is within the preset frequency difference range, it is determined that the continuous identical frequencies are detected; when the frequency difference of the peak amplitude of the amplitude spectrum graph of a certain audio frame j and the audio frame j-1 and audio frame j-2 before it is not within the preset frequency difference range, it is determined that the 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 amplitude spectrum graph.

[0073] Step S104: When there are continuous identical frequencies among all the frequencies of the peak amplitudes, the period of the sound signal to be detected is detected according to the amplitude spectrum diagram of all the sound frames.

[0074] In the application, the preset sound signal to be detected is a periodic and continuous sound signal to be detected that is emitted in a fixed sounding manner. Therefore, detecting the period of the sound signal to be detected based on the amplitude spectrum diagram of all sound frames is one of the conditions for determining whether the collected sound signal to be detected is the preset sound signal.

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

[0076] Step S601, when the first count value is equal to 1, if the phase change cycle number 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 to be 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 to be detected change, and the second preset time length is equal to the time length during which the preset sound signal is not detected or the interval time length between two preset sound signals.

[0077] In the application, the first count value is used to record the number of sound frames with the same continuous frequency detected. The second count value is used to record the number of sound frames without the same continuous frequency detected. The number of phase change cycles is used to record the timing changes of the positive and negative cycles of the sound signal to be detected. 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.

[0078] 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,

[0079] SameMaxPeakPosCnt = 0;

[0080] DiffMaxPeakPosCn = 0;

[0081] Alarm_Pattern_Phase = 0;

[0082] Alarm_Pattern_Time[Alarm_Pattern_Phase]=0;

[0083] FrameCnt=0.

[0084] In an application, the specific timing of setting the initial value may be any time before step S103 , for example, before step S101 or step S201 .

[0085] 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.

[0086] SameMaxPeakPosCnt=SameMaxPeakPosCnt+1;

[0087] DiffMaxPeakPosCn = 0;

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

[0089] DiffMaxPeakPosCn=DiffMaxPeakPosCn+1;

[0090] 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,

[0091] Alarm_Pattern_Time[Alarm_Pattern_Phase]=FrameCnt;

[0092] 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,

[0093] FrameCnt=FrameCnt+1.

[0094] 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 that the first count value is equal to 1, 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 are met at the same time, the start time of the first positive cycle of the sound signal to be detected can be determined. That is, when SameMaxPeakPosCnt=1, Alarm_Pattern_Phase=1 and DiffMaxPeakPosCn≥Td, let

[0095] Alarm_Pattern_Time[0] = 0;

[0096] Alarm_Pattern_Phase = 1;

[0097] FrameCnt = 1;

[0098] Alarm_Pattern_Time[1]=1.

[0099] 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).

[0100] 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 to be 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.

[0101] In the application, if the first count value is equal to 1, it 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 to be detected can be determined. That is, when SameMaxPeakPosCnt=1, Alarm_Pattern_Phase≥1 and DiffMaxPeakPosCn≥Tn, let

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

[0103] Alarm_Pattern_Phase=Alarm_Pattern_Phase+1;

[0104] Alarm_Pattern_Time[Alarm_Pattern_Phase]=FrameCnt.

[0105] 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.

[0106] 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 to be detected; wherein the fourth preset time length is equal to the time length of a positive cycle of the preset sound signal.

[0107] In the application, if the same continuous frequency is not detected, it indicates that the positive cycle of the sound signal to be detected is not detected. At this time, if the number of phase change cycles is greater than 0, it indicates that the phase has changed and is at the start time of the second cycle or after the start time of the second cycle. The first count value is greater than or equal to the fourth preset time length Tp, indicating 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. 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 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 to be detected can be determined. That is, when Alarm_Pattern_Phase>0, SameMaxPeakPosCnt≥Tp, and DiffMaxPeakPosCn≥Tn, let

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

[0109] Alarm_Pattern_Phase=Alarm_Pattern_Phase+1;

[0110] SameMaxPeakPosCnt=0.

[0111] 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.

[0112] 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.

[0113] 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.

[0114] Step S105: Determine whether the sound signal to be detected is a preset sound signal according to the period of the sound signal to be detected.

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

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

[0117] 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.

[0118] 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.

[0119] 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.

[0120] 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.

[0121] 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 to be detected is within a preset timing range; wherein the positive and negative cycle timing includes a positive cycle timing and a negative cycle timing.

[0122] In the application, when the number of phase change cycles is within the preset number of cycles, it is further determined whether the positive and negative cycle timing of the sound signal to be detected 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.

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

[0124] 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 to be detected is the preset sound signal.

[0125] 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 to be detected 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 to be detected is determined to be the preset sound signal. Otherwise, it returns to the initial detection state, sets the initial value of each parameter to be detected to 0, and restarts the detection. The preset matching number range can be set to 2, that is, as long as the sound signal to be detected matches the preset sound signal with at least two groups of cycles, it can be determined that the sound signal to be detected is 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.

[0126] Step S106: When the sound signal to be detected is a preset sound signal, an alarm signal is sent to the client.

[0127] 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.

[0128] 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.

[0129] The sound detection method provided in the embodiment of the present application can communicate and interact with the alarm, and 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, 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 emitted by vehicles, the call signals emitted 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.

[0130] 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.

[0131] 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.

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

[0133] The spectrum conversion unit 101 is used to perform spectrum conversion on each sound frame of the sound signal to be detected to obtain an amplitude spectrum diagram of each sound frame;

[0134] A frequency acquisition unit 102, used to acquire the frequency of the peak amplitude of the amplitude spectrum diagram of each of the audio frames;

[0135] A frequency detection unit 103 is used to detect whether the frequencies of the peak amplitudes of the amplitude spectrograms in all the sound frames are continuously the same;

[0136] The period detection unit 104 is used to detect the period of the sound signal to be detected according to the amplitude spectrum diagrams of all the sound frames when there are continuous identical frequencies in the frequencies of the peak amplitudes of the amplitude spectrum diagrams of all the sound frames;

[0137] The sound determination unit 105 is used to determine whether the sound signal to be detected is a preset sound signal according to the period of the sound signal to be detected;

[0138] The alarm unit 106 is configured to send an alarm signal to the client when the sound signal to be detected is a preset sound signal.

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

[0140] A sound collection unit, used for collecting the sound signal to be detected and converting the sound signal to be detected into a current signal;

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

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

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

[0144] A sound frame capturing unit, configured to capture sound frames of a first preset time length on the digital signal to obtain each sound frame of the sound signal to be detected;

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

[0146] 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 a processor, or can be implemented by multiple distributed processors. For example, the sound collection unit can include a microphone or other sound receiving unit, the amplification unit can include an amplifier, the filtering unit and the noise reduction unit can include a filter, the analog-to-digital conversion unit can include an analog-to-digital converter, and the sound frame capture unit can include a processor.

[0147] 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.12 Only 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.

[0148] 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.

[0149] 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.

[0150] 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.

[0151] like Fig.12 As 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.

[0152] 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.

[0153] 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.

[0154] 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.

[0155] 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.

[0156] 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.

[0157] 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.

[0158] 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.

[0159] 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.

[0160] 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.

[0161] 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.

[0162] 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.

[0163] 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: Perform spectrum conversion on each sound frame of the sound signal to be detected to obtain an amplitude spectrum diagram of each sound frame; Obtaining the frequency of the peak amplitude of the amplitude spectrum diagram of each of the sound frames; Detecting whether there are consecutive identical frequencies among all the peak amplitude frequencies; When there are continuous identical frequencies among all the frequencies of the peak amplitudes, detecting the period of the sound signal to be detected according to the amplitude spectrum diagrams of all the sound frames; Determining whether the sound signal to be detected is a preset sound signal according to the period of the sound signal to be detected; When the sound signal to be detected is a preset sound signal, sending an alarm signal to the client; The detecting the period of the sound signal to be detected according to the amplitude spectrum diagram of all the sound frames comprises: 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 to be 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 the negative cycle of the sound signal to be detected change, and the second preset time length is equal to the time length during which the preset sound signal is not detected or the interval time length between two preset sound signals; 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 to be 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; 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, the start time of a negative cycle of the sound signal to be detected is determined; wherein the fourth preset time length is equal to the time length of a positive cycle of the preset sound signal.

2. The sound detection method according to claim 1, characterized in that: Before performing spectrum conversion on each sound frame of the sound signal to be detected and obtaining the amplitude spectrum diagram of each sound frame, the method includes: Collecting a sound signal to be detected and converting the sound signal to be detected into a current signal; amplifying the current signal; Performing filtering processing on the amplified current signal to obtain an analog signal; Performing analog-to-digital conversion on the analog signal to obtain a digital signal; Capturing sound frames of a first preset time length on the digital signal to obtain each sound frame of the sound signal to be detected; Noise reduction processing is performed on each of the sound frames.

3. The sound detection method according to claim 1, characterized in that: The obtaining of the frequency of the peak amplitude of the amplitude spectrum diagram of each of the sound frames comprises: Obtain all amplitudes of the amplitude spectrum diagram of each of the sound frames; Determine the peak amplitude of the amplitude spectrum graph of each of the audio frames according to all amplitudes of the amplitude spectrum graph of each of the audio frames; According to the peak amplitude of the amplitude spectrum diagram of each of the sound frames, the frequency of the peak amplitude of the amplitude spectrum diagram of each of the sound frames is obtained.

4. The sound detection method according to claim 3, characterized in that: Determining the peak amplitude of the amplitude spectrum graph of each of the audio frames according to all amplitudes of the amplitude spectrum graph of each of the audio frames comprises: Compare the nth amplitude of the amplitude spectrum graph 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 amplitude spectrum graph of each of the audio frames; The i-th amplitude in the amplitude spectrum graph 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 amplitude spectrum graph of each sound frame; wherein, i∈[0,N-1].

5. The sound detection method according to claim 1, characterized in that: The detecting whether there are continuous identical frequencies among all the peak amplitude frequencies comprises: Compare the frequencies of the peak amplitudes of the amplitude spectrograms 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; When the frequency difference between the peak amplitude of the amplitude spectrum diagram of the j-th sound frame and the j-1-th or j-2-th sound frame in all the sound frames is within a preset frequency difference range, it is determined that the continuous same frequency is detected; wherein j∈[1,M]; When the frequency difference between the peak amplitudes of the amplitude spectrum diagrams of the jth sound frame and the j-1th and j-2th sound frames among all the sound frames is not within the preset frequency difference range, it is determined that no continuous identical frequencies are detected.

6. The sound detection method according to claim 1, characterized in that: The determining, according to the period of the sound signal to be detected, whether the sound signal to be detected is a preset sound signal comprises: 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, determining whether the total duration of positive and negative cycles is within a preset duration range; When the total duration of the positive and negative cycles is within a preset time range, determining whether the number of phase change cycles is within a preset number of cycles; When the number of phase change cycles is within a preset range of cycles, determining whether the positive and negative cycle timings of the sound signal to be detected are within a preset range of timings; wherein the positive and negative cycle timings include positive cycle timings and negative cycle timings; 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 to be detected and the preset sound signal is greater than or equal to a preset matching number; When the positive and negative period matching number is greater than or equal to a preset matching number, the sound signal to be detected is determined to be the preset sound signal.

7. A sound detection device, characterized in that: include: A spectrum conversion unit, used for performing spectrum conversion on each sound frame of the sound signal to be detected, and obtaining an amplitude spectrum diagram of each sound frame; A frequency acquisition unit, used to acquire the frequency of the peak amplitude of the amplitude spectrum diagram of each of the sound frames; A frequency detection unit, used for detecting whether the frequencies of the peak amplitudes of the amplitude spectrum diagrams in all the sound frames are continuously the same; A period detection unit, configured to detect the period of the sound signal to be detected according to the amplitude spectrum diagrams of all the sound frames when there are continuous identical frequencies in the frequencies of the peak amplitudes of the amplitude spectrum diagrams of all the sound frames; a sound determination unit, configured to determine whether the sound signal to be detected is a preset sound signal according to a period of the sound signal to be detected; An alarm unit, configured to send an alarm signal to a client when the sound signal to be detected is a preset sound signal; The detecting the period of the sound signal to be detected according to the amplitude spectrum diagram of all the sound frames comprises: 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 to be 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 the negative cycle of the sound signal to be detected change, and the second preset time length is equal to the time length during which the preset sound signal is not detected or the interval time length between two preset sound signals; 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 to be 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; 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, the start time of a negative cycle of the sound signal to be detected is determined; wherein the fourth preset time length is equal to the time length of a positive cycle of 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. The sound detection device as claimed in claim 8, characterized in that: The sound collection module includes a sound receiving unit, an amplifier, a filter and an analog-to-digital converter which are connected in sequence. The amplifier, the filter and the analog-to-digital converter are respectively connected to the processor.

Citation Information

Patent Citations

  • Computation method and system for frame basic period of sound signal

    CN101504833A

  • System and method for screening acoustic signals

    CN102411928A