A signal detection method and apparatus
By calculating the energy of the target frequency signal by dividing the signal into frames and using the adaptive sliding energy mean for judgment, combined with the distribution characteristics of multi-frame signals, the problem of insufficient detection accuracy in the existing technology is solved, and stable detection is achieved when the signal energy changes drastically, thereby improving detection accuracy and application scenarios.
Patent Information
- Application Number
- CN202310030937.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-10
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2043-01-10
AI Technical Summary
Existing signal detection methods, when lacking sufficient detection accuracy, produce numerous glitches in the output, affecting the accuracy of the output and making it difficult to stably detect target signals when the sound signal energy changes drastically.
The signal to be detected is divided into frames, the energy of the target frequency signal in each frame is calculated, and the adaptive sliding energy mean is used as the judgment threshold. The distribution characteristics of multiple frames are combined to determine whether the target signal exists. The Goertzel algorithm and the Kaufman adaptive moving average algorithm are used to calculate the energy mean.
It improves the accuracy of signal detection, avoids missed detections, expands the application scenarios of detection, and ensures stable detection of target signals even when signal energy changes drastically.
Smart Images

Figure CN116092526B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of audio processing, in particular to a signal detection method and device. BACKGROUND
[0002] In the field of intelligent security, it is often necessary to detect specific signals so as to timely inform the manager to make correct response measures as soon as possible, and prevent the loss of safety or property due to failure to hear the signal. Such signals are generally single-frequency signals or superposition of multiple single-frequency signals with regular distribution, and thus the prior information of frequency can be used to detect such signals. The commonly used detection method is coherent detection, which detects each time domain sample, and if the detection accuracy is insufficient, there will be more glitches in the output, affecting the accuracy of the output. SUMMARY
[0003] The embodiments of the present application provide a signal detection method and device to improve the detection accuracy of target signals.
[0004] The signal detection method provided by the embodiments of the present application comprises:
[0005] obtaining a to-be-detected signal, framing the to-be-detected signal, and calculating the energy of a target frequency signal in each frame signal;
[0006] for each frame signal, determining the energy mean value corresponding to the frame signal by using the energy of the target frequency signal in the frame signal; and judging whether the target signal exists in the frame signal by using the energy of the target frequency signal in the frame signal and the energy mean value corresponding to the frame signal, to obtain the judgment result corresponding to the frame signal;
[0007] using the judgment results corresponding to the multiple frame signals to finally determine whether the target signal exists in the to-be-detected signal.
[0008] By the method, the to-be-detected signal is obtained, the to-be-detected signal is framed, and the energy of the target frequency signal in each frame signal is calculated. For each frame signal, the energy mean value corresponding to the frame signal is determined by using the energy of the target frequency signal in the frame signal. The target signal is judged to exist in the frame signal by using the energy of the target frequency signal in the frame signal and the energy mean value corresponding to the frame signal, to obtain the judgment result corresponding to the frame signal. The judgment results corresponding to the multiple frame signals are used to finally determine whether the target signal exists in the to-be-detected signal, the energy mean value is used as the threshold for judging whether the target signal exists, so that the target signal can be stably detected even in the case of drastic change of the energy of the to-be-detected signal, the occurrence of missed detection is avoided, the detection accuracy is improved, and the application scenarios of detection are increased.
[0009] In some embodiments, for each frame signal, the energy mean value corresponding to the frame signal is determined by using the energy of the target frequency signal in the frame signal, comprising:
[0010] For each frame signal:
[0011] The direction coefficient and fluctuation coefficient of the energy change of the target frequency signal in a preset time length are determined by using the energy of the target frequency signal in the frame signal;
[0012] The smoothing coefficient for controlling the update speed of the energy mean value is determined by using the direction coefficient and the fluctuation coefficient;
[0013] The energy mean value corresponding to the frame signal is determined by using the energy of the target frequency signal in the frame signal, the smoothing coefficient and the energy mean value corresponding to the last frame signal.
[0014] By the method, the energy mean value corresponding to each frame signal is determined according to the energy of the target frequency signal in each frame signal.
[0015] In some embodiments, the direction coefficient and fluctuation coefficient of the energy change of the target frequency signal in a preset time length are determined by using the energy of the target frequency signal in the frame signal, comprising:
[0016] The direction coefficient of the energy change of the target frequency signal in the preset time length is determined by using the energy change value of the target frequency signal in the preset time length in the to-be-detected signal;
[0017] The fluctuation coefficient of the energy change of the target frequency signal in the preset time length is determined by using the sum of the energy change values of the target frequency signal in each preset time interval in the preset time length in the to-be-detected signal.
[0018] By the method, the direction coefficient and fluctuation coefficient of the energy change are determined according to the energy of the target frequency signal in each frame signal.
[0019] In some embodiments, the smoothing coefficient for controlling the update speed of the energy mean value is determined by using the direction coefficient and the fluctuation coefficient, comprising:
[0020] The ratio of the direction coefficient to the fluctuation coefficient is determined;
[0021] The smoothing coefficient for controlling the update speed of the energy mean value is determined by using the ratio, and a preset first coefficient and a preset second coefficient.
[0022] By the method, the smoothing coefficient for controlling the update speed of the energy mean value is obtained by using the direction coefficient and the fluctuation coefficient.
[0023] In some embodiments, the determination of the energy average of the frame signal based on the energy of the target frequency signal in the frame signal, the smoothing coefficient and the energy average corresponding to the previous frame signal comprises:
[0024] determining a first product of the smoothing coefficient and the energy of the target frequency signal in the frame signal; and subtracting the difference between the smoothing coefficient and a preset value from the energy average corresponding to the previous frame signal to obtain a second product;
[0025] determining the energy average of the frame signal based on the sum of the first product and the second product.
[0026] By the method, the energy average of the current frame signal is obtained based on the smoothing coefficient, the energy of the target frequency signal and the energy average corresponding to the previous frame signal.
[0027] In some embodiments, for each frame signal, the determination of the judgment result corresponding to the frame signal based on the energy of the target frequency signal in the frame signal and the energy average corresponding to the frame signal comprises:
[0028] for each frame signal, determining whether the energy of the target frequency signal in the frame signal is greater than or equal to the energy average corresponding to the frame signal, and if so, determining that the target signal exists in the frame signal; otherwise, determining that the target signal does not exist in the frame signal.
[0029] By the method, the determination of whether the target signal exists in each frame signal is realized.
[0030] In some embodiments, the final determination of whether the target signal exists in the to-be-detected signal based on the judgment results corresponding to multiple frame signals comprises:
[0031] determining the distribution characteristics of the target frequency signal in a period based on the judgment results corresponding to the to-be-detected signal in the period, wherein the judgment results corresponding to the to-be-detected signal in the period comprise the judgment results corresponding to multiple frame signals.
[0032] comparing the distribution characteristics with the known distribution characteristics of the target frequency signal in the period, and if consistent, finally determining that the target signal exists in the to-be-detected signal, otherwise, finally determining that the target signal does not exist in the to-be-detected signal.
[0033] By the method, the determination of whether the target signal exists in the to-be-detected signal based on the judgment results corresponding to multiple frame signals is realized.
[0034] Another embodiment of the present application provides a signal detection device, comprising a memory and a processor, wherein the memory is configured to store program instructions, and the processor is configured to invoke the program instructions stored in the memory to execute any of the above methods.
[0035] Furthermore, according to embodiments, for example, a computer program product for a computer is provided, which comprises software code portions for performing the steps of the above defined method when the product is run on the computer. The computer program product can comprise a computer-readable medium on which the software code portions are stored. Further, the computer program product can be directly loadable into the internal memory of the computer and / or transmittable via a network by means of at least one of a upload process, a download process and a push process.
[0036] Another embodiment of the present application provides a computer readable storage medium, which stores computer executable instructions, and the computer executable instructions are used to make the computer execute any of the above methods. BRIEF DESCRIPTION OF DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiment description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings.
[0038] Figure 1 A specific flowchart of a signal detection method provided by an embodiment of the present application is shown in the figure.
[0039] Figure 2 A specific flowchart of a signal detection method provided by an embodiment of the present application is shown in the figure.
[0040] Figure 3 A structure diagram of a signal detection device provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0041] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, and not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort fall within the scope of protection of the present application.
[0042] The embodiments of the present application provide a signal detection method and device to improve the detection accuracy of a target signal.
[0043] The method and the device are based on the same application concept, and the implementation of the device and the method can be referred to each other because the principles of the method and the device for solving problems are similar, and the repeated parts will not be described again.
[0044] The terms "first", "second", and the like (if any) in the description and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or device including a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
[0045] The following examples and embodiments will only be understood as illustrative examples. Although the present specification can refer to "a", "one", or "some" examples or embodiments at several places, this does not mean that each such reference relates to the same example or embodiment, nor does it mean that the feature only applies to a single example or embodiment. Individual features of different embodiments can also be combined to provide other embodiments. In addition, the terms "include" and "contain" should be understood as not limiting the described embodiments to only those features mentioned; such examples and embodiments can also include features, structures, units, modules, etc. that are not specifically mentioned.
[0046] The various embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that the order of presentation of the embodiments of the present application only represents the order of the embodiments and does not represent the advantages and disadvantages of the technical solutions provided by the embodiments.
[0047] It should be noted that the technical solutions provided by the embodiments of the present application are described by taking single-frequency target frequency signal detection of a to-be-detected signal as an example, but are not limited thereto.
[0048] Some terms appearing in the text will be explained below:
[0049] 1. In the embodiments of the present application, the term "to-be-detected signal" can be, for example, a signal of the type of sound signal, light signal, electrical signal, etc. In the embodiments of the present application, through detection of the to-be-detected signal, it is determined whether a target signal exists therein, i.e., whether one or more signals with known frequency and without change exist in the to-be-detected signal.
[0050] In addition, the to-be-detected signal can simultaneously include a target signal and an interference signal of the same frequency, and therefore, not only whether the target signal exists in the to-be-detected signal is detected, but also whether the signal meets a regularity characteristic of distribution is further combined to determine whether the detected target signal is the target signal; wherein the regularity characteristic is, for example, periodicity, and a signal that has a target signal from 0 to 1 s, has no target signal from 1 to 2 s, has a target signal from 2 to 3 s, has no target signal from 3 to 4 s, and so on, meets the regularity characteristic of distribution.
[0051] 2. In the embodiments of the present application, the term "framing" refers to dividing an original sound signal into several equal-length speech signals, and each speech signal is referred to as a frame, and the frame length is, for example, 10 ms to 30 ms.
[0052] 3. In the embodiments of the present application, the term "target frequency" refers to a specific frequency value that needs to be detected.
[0053] 4. In the embodiments of the present application, the term "amplitude" refers to a parameter of a signal, that is, an amplitude, and refers to a maximum amplitude in a period, which is a sine wave, and is half of the distance from a peak to a trough, and reflects the magnitude of a certain frequency in a certain period.
[0054] 5. In the embodiments of the present application, the term "sampling rate" refers to how many samples of data per second need to be analyzed.
[0055] 6. In the embodiments of the present application, the term "sliding window" refers to setting a value (that is, a window length) as an interval in an array, and finding the required value in the interval each time, and the interval continuously slides until it cannot slide, that is, the interval reaches the end of the array.
[0056] When detecting a specific sound signal, the existing detection method does not fully utilize the characteristics of the to-be-detected target sound signal, and the threshold used when determining whether the target sound signal exists is a fixed value. However, it is difficult to determine a unified fixed threshold for different input sound signals, and it is not suitable for scenes where the energy of the sound signal is unknown, which leads to insufficient detection accuracy in some scenes and limits the application scenarios of signal detection.
[0057] To solve the above problems, the embodiment of the present application provides a signal detection method, first, the acquired signal to be detected is framed, the energy of the target frequency signal in each frame signal is calculated by using a Goertzel algorithm, according to the change of the energy, the adaptive sliding energy mean of each frame signal is updated based on a sliding window, and the adaptive sliding energy mean is used as a threshold to judge whether the target signal exists in each frame signal, and the determination result is output, according to the output determination result, whether the target signal exists in the signal to be detected in a certain time range is judged, the accuracy of detection is improved, and the application scene is increased.
[0058] Referring to Figure 1 The embodiment of the present application provides a signal detection method, and the specific steps include:
[0059] Step S101, acquiring an original signal to be detected, and framing the original signal to be detected;
[0060] In this step, the original signal to be detected is framed, that is, the acquired original voice signal is divided into I equal-length voice signals according to a certain length, for example, N, each voice signal is a frame of signal to be detected, that is, the original signal to be detected is divided into I frames;
[0061] Wherein, the signal to be detected includes a target signal and an interference signal, the target signal refers to a signal with a known frequency;
[0062] Step S102, calculating the energy of the target frequency signal contained in each frame signal;
[0063] In this step, the energy of the target frequency signal contained in each frame signal is calculated by using a Goertzel algorithm;
[0064] Firstly, it is assumed that each frame signal is sampled at N time points, the mathematical expression in formula one is used to represent the signal to be detected at a certain time, that is, the single-frequency target frequency signal s(n, i) and the noise signal d(n, i) are superimposed, for example, the nth time sampling point y(n, i) is the superposition of the single-frequency target frequency signal s(n, i) and the noise signal d(n, i), that is:
[0065] y(n,i)=Asin(2πf0 n+θ)+d(n,i) Formula one
[0066] Wherein, n represents the serial number of the time sampling point of each frame signal; A represents the signal amplitude; θ represents the phase; f0 represents the frequency of the single-frequency target frequency signal with a known frequency;
[0067] Secondly, the number of complete periods K of the target frequency signal contained in each frame signal and the corresponding coefficient ε are calculated by using formula two.
[0068]
[0069]
[0070] wherein f s represents the sampling rate; Z represents an integer data set;
[0071] Three intermediate variables are needed in each sampling process, which are set as Q0, Q1 and Q2, Q1 is the Q0 value of the previous sampling process, and Q2 is the Q0 value before the two samplings or the Q1 value sampled before the current sampling. At the beginning of each sampling, Q0, Q1 and Q2 are initially set as 0, i.e. Q0 = Q1 = Q2 = 0. N time sampling points are set for each frame of signal. Starting from the first time sampling point and ending at the Nth time sampling point, the values of Q0, Q1 and Q2 are updated by using Formula Four, so as to obtain Q1(N, i) and Q2(N, i) of the Nth time sampling point of each frame of signal.
[0072]
[0073] Finally, Q1(N, i), Q2(N, i) and the coefficient ε are used to calculate the energy P(i) of the target frequency signal in each frame of signal by using Formula Five.
[0074]
[0075] In step S103, the adaptive sliding energy mean of each frame of signal is calculated based on a preset window length sliding window, for example, by using the Kaufman adaptive moving average algorithm.
[0076] In this step, the energy of the target frequency signal in each frame of signal calculated in step S102 is used to calculate the direction coefficient D(i) and the fluctuation coefficient V(i) of the energy change in the preset fixed window length sliding window. The direction coefficient D(i) and the fluctuation coefficient V(i) can be expressed as:
[0077] D(i) = P(i) - P(i - M) Formula Six
[0078]
[0079] wherein M represents the window length of the sliding window, and the unit is time; m represents the frame number in the sliding window.
[0080] The direction coefficient represents the net change of the energy of the target frequency signal in the time interval with the length of M, which is a basic energy momentum. The fluctuation coefficient represents the sum of the energy changes [P(m) - P(m - 1)] in each preset time interval in the M time interval.
[0081] Based on the stated direction coefficient and fluctuation coefficient, calculate the energy efficiency ratio of the target frequency signal. The efficiency ratio represents the directionality of energy change, i.e., the trend of energy change within the M-time interval, and its value range is [-1, 1]. Then, a smoothing coefficient is introduced to control the update rate of the adaptive sliding energy mean. Two coefficients, F and S, are set, and the smoothing coefficient is determined using these two coefficients and the efficiency ratio. In some embodiments, the values of F and S can be set or adjusted according to actual needs. That is, when it is necessary to change the update rate of the energy mean, i.e., to change the smoothing coefficient, this can be achieved by adjusting the values of F and S. The smoothing coefficient S(i) is calculated using Formula 8.
[0082]
[0083] Where F represents the preset first coefficient, which can be a fast coefficient, such as a decimal within (0, 1), and the value is selected according to the actual situation; S represents the preset second coefficient, which can be a slow coefficient, such as a decimal within (0, 1), and the value is selected according to the actual situation;
[0084] S(i) is the weighted sum of F and S. When the efficiency ratio is close to 1, that is, the energy change trend of the target frequency signal is obvious, it can be seen that S(i) is close to F, and the value of S(i) depends on F. When the efficiency ratio is close to 0, that is, the energy change trend of the target frequency signal is not obvious, it can be seen that S(i) is close to S, and the value of S(i) depends on S. Thus, F and S are weighted according to the energy change trend of the target frequency signal to avoid the situation where S(i) is too large or too small.
[0085] Based on S(i), the adaptive sliding energy mean of each frame signal is calculated using Formula 9 to achieve adaptive energy mean.
[0086] α(i) = S(i)P(i) + [preset value - S(i)]α(i-1) (Formula 9)
[0087] The preset value can be, for example, 1;
[0088] Step S104: Based on the adaptive sliding energy mean of each frame signal and the energy of the target frequency signal, determine whether the target signal exists in each frame signal;
[0089] Wherein, the target signal refers to the target frequency signal whose energy is greater than or equal to the corresponding adaptive sliding energy mean; that is, the target signal is the target frequency signal, but the target frequency signal is not necessarily the target signal, and may also be an interference signal; the target frequency signal refers to the signal that has a target frequency; the target frequency refers to the frequency of a specific value.
[0090] For each frame signal, when the energy of the target frequency signal in the frame signal is greater than or equal to the adaptive sliding energy average of the frame signal, the output determination result z(i) is a non-zero value, for example, 1 as shown in formula ten; when the energy of the target frequency signal in the frame signal is less than the adaptive sliding energy average of the frame signal, the output determination result z(i) is a zero value; the output determination result can also be represented in other numerical or symbolic forms, not limited to 0 or 1;
[0091]
[0092] Step S105, judging whether the target signal exists in the original to-be-detected signal;
[0093] The target signal refers to a signal whose distribution characteristics in a period corresponding to the target frequency signal are consistent with the known distribution characteristics of the target frequency signal, that is, the signal with regular distribution is the target signal.
[0094] In step S104, it is determined whether the target signal exists in each frame signal, but the target signal can also exist in the interference signal, so the determination result of the target signal based on one frame signal cannot determine whether the original to-be-detected signal exists, and it is also necessary to determine whether the target signal exists in a period of original to-be-detected signal according to the detection result of multiple frame signals, that is, the distribution regularity.
[0095] According to the determination result output in step S104 and the period corresponding to the target frequency signal, it is judged whether the distribution regularity of the target frequency signal in the to-be-detected signal in the period is consistent with the known distribution regularity of the target frequency signal, when consistent, it is determined that the target signal exists in the to-be-detected signal in the period, otherwise, the target signal does not exist.
[0096] For example: the period corresponding to the target frequency signal is 10s, and the known distribution characteristics of the target frequency signal in the period are 1, 1, 0, 0, 1, 1…, if the distribution characteristics of the determination result z(i) corresponding to the to-be-detected signal in the last 10s are also 1, 1, 0, 0, 1, 1…, which is consistent with the known distribution characteristics, it is indicated that the target signal exists in the to-be-detected signal in the period of 10s; if the distribution characteristics of the determination result z(i) corresponding to the to-be-detected signal in the last 10s are 1, 0, 1, 0…, which is inconsistent with the known distribution characteristics, that is, the distribution characteristics of the detected target frequency signal are inconsistent with the known distribution characteristics of the target frequency signal, it is indicated that the detected target frequency signal in the to-be-detected signal in the period of 10s is not the real target frequency signal, that is, it is finally determined that the target signal does not exist in the to-be-detected signal in the period of time.
[0097] It should be noted that the target frequency signal herein refers to a signal of the same frequency, that is, for a signal of the same frequency, the distribution feature detected in the period of the frequency signal is compared with the known distribution feature. There can be multiple target signals of different frequencies in the to-be-detected signal in a period of time, and for each target frequency signal, the above method is used to determine whether it exists in the to-be-detected signal.
[0098] In some embodiments, when the target frequency signal of the to-be-detected signal contains multiple frequencies, for example, two target frequency signals f0 and f1 of different frequencies, the corresponding periods are T1 and T2 (assuming T1>T2). For example, the case can be handled according to whether f0 and f1 overlap. If f0 and f1 do not overlap, that is, a target frequency signal of a frequency appears in a period of time, for example, f0 appears in 0-1s and f1 appears in 1-2s, the above method can be used to calculate the energy value of f0 in each frame signal and the corresponding adaptive sliding energy mean value, and the energy value of f1 in each frame signal and the corresponding adaptive sliding energy mean value, according to the output determination result, to determine whether the determination result of the to-be-detected signal in (T1+T2) time is consistent with the distribution feature of the known target frequency signal, and when consistent, it is determined that the target signal exists in the to-be-detected signal in the period of (T1+T2); if f0 and f1 overlap, that is, f0 and f1 appear in a period of time, when calculating the energy by using the above method, the energy value of f0 in each frame signal and the energy value of f1 are calculated, and then the sum of the two energy values is calculated, and the adaptive sliding energy mean value corresponding to the sum of the energy values of each frame signal is calculated, and the sum of the energy values of each frame signal is compared with the adaptive sliding energy mean value corresponding to the sum of the energy values to determine whether f0 and f1 exist in each frame signal, according to the determination result corresponding to each frame signal, to determine whether the output result of the to-be-detected signal in T1 time is consistent with the distribution feature of the known target frequency signal, and when consistent, it is determined that the target signal exists in the to-be-detected signal in the period of T1.
[0099] In summary, referring to Figure 2 The signal detection method provided by the embodiment of the application comprises the following steps:
[0100] In step S201, a to-be-detected signal is acquired, the to-be-detected signal is framed, and the energy of a target frequency signal in each frame signal is calculated (for example, the above formulas one to five are used);
[0101] The to-be-detected signal, for example, comprises a target signal and / or an interference signal; the framing refers to dividing the acquired original to-be-detected signal into several frame signals of equal length according to a certain length;
[0102] In step S202, for each frame signal, an energy mean value corresponding to the frame signal is determined by using the energy of the target frequency signal in the frame signal (for example, by using the above formulas 6-9); and whether the target signal exists in the frame signal is determined by using the energy of the target frequency signal in the frame signal and the energy mean value corresponding to the frame signal, so as to obtain a determination result corresponding to the frame signal.
[0103] The energy mean value is, for example, the above adaptive sliding energy mean value.
[0104] For example, when the target signal exists in the frame signal, the determination result 1 is output; and when the target signal does not exist in the frame signal, the determination result 0 is output.
[0105] In step S203, whether the target signal exists in the to-be-detected signal is finally determined by using the determination results corresponding to the multiple frame signals.
[0106] Through step S203, the distribution characteristics of the to-be-detected signal are determined according to the determination results output by the multiple frame signals, so as to determine whether the target signal exists in the to-be-detected signal.
[0107] In order to determine the energy mean value of each frame signal, in some embodiments, for each frame signal, the energy mean value corresponding to the frame signal is determined by using the energy of the target frequency signal in the frame signal, including:
[0108] For each frame signal:
[0109] The direction coefficient (for example, the above D(i)) and the fluctuation coefficient (for example, the above V(i)) of the energy change of the target frequency signal within a preset time length are determined by using the energy of the target frequency signal in the frame signal.
[0110] The smoothing coefficient (for example, the above S(i)) for controlling the update speed of the energy mean value is determined by using the direction coefficient and the fluctuation coefficient.
[0111] The energy mean value corresponding to the frame signal is determined by using the energy of the target frequency signal in the frame signal, the smoothing coefficient, and the energy mean value corresponding to the previous frame signal (for example, the above a(i)).
[0112] The preset time length is, for example, the above preset window length M.
[0113] In some embodiments, the determination of the direction coefficient and the fluctuation coefficient of the energy change of the target frequency signal within a preset time length by using the energy of the target frequency signal in the frame signal includes:
[0114] determining a direction coefficient of the energy variation of the target frequency signal in the preset time length (e.g., Formula 6) by using the energy variation value of the target frequency signal in the preset time length in the signal to be detected;
[0115] determining a fluctuation coefficient of the energy variation of the target frequency signal in the preset time length (e.g., Formula 7) by using the sum of the energy variation values of the target frequency signal in each preset time interval in the preset time length in the signal to be detected.
[0116] In some embodiments, the determining the smoothing coefficient for controlling the update speed of the energy average by using the direction coefficient and the fluctuation coefficient comprises:
[0117] determining a ratio of the direction coefficient to the fluctuation coefficient (e.g., the efficiency ratio described above);
[0118] determining the smoothing coefficient for controlling the update speed of the energy average by using the ratio, and a preset first coefficient and a preset second coefficient (e.g., Formula 8).
[0119] In some embodiments, the determining the energy average of the frame signal by using the energy of the target frequency signal in the frame signal, the smoothing coefficient, and the energy average corresponding to the previous frame signal comprises:
[0120] determining a first product of the smoothing coefficient and the energy of the target frequency signal in the frame signal (e.g., S(i)*P(i) described above); and determining a second product by multiplying the energy average corresponding to the previous frame signal by a difference value obtained by subtracting the smoothing coefficient from a preset value (e.g., 1);
[0121] determining the energy average of the frame signal by using a sum of the first product and the second product (e.g., Formula 9).
[0122] In some embodiments, for each frame signal, the determining whether the target signal exists in the frame signal by using the energy of the target frequency signal in the frame signal and the energy average corresponding to the frame signal comprises:
[0123] for each frame signal, determining whether the energy of the target frequency signal in the frame signal is greater than or equal to the energy average corresponding to the frame signal, and if yes, determining that the target signal exists in the frame signal; otherwise, determining that the target signal does not exist in the frame signal.
[0124] In some embodiments, the finally determining whether the target signal exists in the signal to be detected by using the determination results corresponding to the multiple frame signals comprises:
[0125] The distribution feature of the target frequency signal in the period is determined according to the determination result of the to-be-detected signal in the period corresponding to the target frequency signal; wherein the determination result of the to-be-detected signal in the period corresponds to the judgment result of multiple frames of signals;
[0126] The distribution feature is compared with the known distribution feature of the target frequency signal in the period, and if they are consistent, it is finally determined that the target signal exists in the to-be-detected signal, otherwise, it is finally determined that the target signal does not exist in the to-be-detected signal;
[0127] For example, a 10s to-be-detected signal, the distribution feature of the target frequency signal is 0, 1, 0, 1…, if the judgment result of the to-be-detected signal in the 10s is also 0, 1, 0, 1…, it is indicated that the distribution feature of the 10s to-be-detected signal is consistent with the known distribution feature, and the target signal exists in the 10s to-be-detected signal; if the judgment result of the to-be-detected signal in the 10s is 1, 0, 1, 0, 1…, it is indicated that the distribution feature of the 10s to-be-detected signal is inconsistent with the known distribution feature, and the target signal detected in the 10s to-be-detected signal is not a real target signal, that is, the target signal does not exist in the 10s to-be-detected signal.
[0128] The following describes the device or apparatus provided by the embodiments of the present application, wherein the explanations or examples of the same or corresponding technical features described in the above method will not be repeated.
[0129] Referring to Figure 3 The signal detection device provided by the embodiments of the present application comprises:
[0130] The processor 300 is configured to read the program in the memory 320 and execute the following processes:
[0131] The to-be-detected signal is acquired, the to-be-detected signal is framed, and the energy of the target frequency signal in each frame of signal is calculated;
[0132] For each frame of signal, the energy mean value corresponding to the frame of signal is determined by using the energy of the target frequency signal in the frame of signal; and whether the target signal exists in the frame of signal is judged by using the energy of the target frequency signal in the frame of signal and the energy mean value corresponding to the frame of signal, to obtain the judgment result corresponding to the frame of signal;
[0133] The judgment result corresponding to multiple frames of signals is used to finally determine whether the target signal exists in the to-be-detected signal.
[0134] In some embodiments, for each frame of signal, the energy mean value corresponding to the frame of signal is determined by using the energy of the target frequency signal in the frame of signal, comprising:
[0135] for each frame signal:
[0136] determining a direction coefficient and a fluctuation coefficient of energy variation of the target frequency signal in a preset time length by using the energy of the target frequency signal in the frame signal;
[0137] determining a smoothing coefficient for controlling the update speed of the energy mean value by using the direction coefficient and the fluctuation coefficient;
[0138] determining the energy mean value corresponding to the frame signal by using the energy of the target frequency signal in the frame signal, the smoothing coefficient and the energy mean value corresponding to the previous frame signal.
[0139] In some embodiments, the determining the direction coefficient and the fluctuation coefficient of energy variation of the target frequency signal in a preset time length by using the energy of the target frequency signal in the frame signal comprises:
[0140] determining the direction coefficient of energy variation of the target frequency signal in the preset time length by using the energy variation value of the target frequency signal in the preset time length in the to-be-detected signal;
[0141] determining the fluctuation coefficient of energy variation of the target frequency signal in the preset time length by using the sum of the energy variation values of the target frequency signal in each preset time interval in the preset time length in the to-be-detected signal.
[0142] In some embodiments, the determining the smoothing coefficient for controlling the update speed of the energy mean value by using the direction coefficient and the fluctuation coefficient comprises:
[0143] determining the ratio of the direction coefficient to the fluctuation coefficient;
[0144] determining the smoothing coefficient for controlling the update speed of the energy mean value by using the ratio, and a preset first coefficient and a preset second coefficient.
[0145] In some embodiments, the determining the energy mean value corresponding to the frame signal by using the energy of the target frequency signal in the frame signal, the smoothing coefficient and the energy mean value corresponding to the previous frame signal comprises:
[0146] determining a first product of the smoothing coefficient and the energy of the target frequency signal in the frame signal; and determining a second product by multiplying the energy mean value corresponding to the previous frame signal by a difference value obtained by subtracting the smoothing coefficient from a preset value;
[0147] determining the energy mean value corresponding to the frame signal by using the sum of the first product and the second product.
[0148] In some embodiments, for each frame of signal, the presence of a target signal is determined by using the energy of the target frequency signal in that frame of signal and the average energy value corresponding to that frame of signal, thereby obtaining a determination result corresponding to that frame of signal, including:
[0149] For each frame of signal, determine whether the energy of the target frequency signal in that frame is greater than or equal to the average energy of that frame. If it is, then the target signal is determined to exist in that frame; otherwise, the target signal is determined not to exist in that frame.
[0150] In some embodiments, the determination of whether a target signal exists in the signal to be detected is made by utilizing the judgment results corresponding to multiple frames of signals, including:
[0151] The distribution characteristics of the target frequency signal within a period are determined by using the judgment results corresponding to the signal to be detected within the period corresponding to the target frequency signal; wherein, the judgment results corresponding to the signal to be detected within the period include the judgment results corresponding to multiple frames of signals;
[0152] The distribution characteristics are compared with the known distribution characteristics of the target frequency signal within the period. If they match, it is finally determined that the target signal exists in the signal to be detected; otherwise, it is finally determined that the target signal does not exist in the signal to be detected.
[0153] In some embodiments, the signal detection device provided in this application further includes a transceiver 310 for receiving and transmitting data under the control of the processor 300.
[0154] Among them, Figure 3 In this context, the bus architecture can include any number of interconnected buses and bridges, specifically linking various circuits together, represented by one or more processors (processor 300) and memory (memory 320). The bus architecture can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface. The transceiver 310 can be multiple elements, including transmitters and receivers, providing a unit for communicating with various other devices over a transmission medium.
[0155] In some embodiments, the signal detection device provided in this application further includes a user interface 330. The user interface 330 may be an interface that can connect to external or internal devices, including but not limited to keypads, displays, speakers, microphones, joysticks, etc.
[0156] The processor 300 is responsible for managing the bus architecture and general processing, while the memory 320 can store the data used by the processor 300 when performing operations.
[0157] In some embodiments, the processor 300 can be a CPU (Central Processor Unit), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or a CPLD (Complex Programmable Logic Device).
[0158] Embodiments of the present application provide a computing device, which can be a desktop computer, a portable computer, a smart phone, a tablet computer, a PDA (Personal Digital Assistant), and the like. The computing device can include a CPU (Center Processing Unit), a memory, an input / output device, and the like. The input device can include a keyboard, a mouse, a touch screen, and the like. The output device can include a display device, such as an LCD (Liquid Crystal Display), a CRT (Cathode Ray Tube), and the like.
[0159] The memory can include a ROM (Read-Only Memory) and a RAM (Random Access Memory), and provide the processor with program instructions and data stored in the memory. In embodiments of the present application, the memory can be used to store programs of any of the methods provided by embodiments of the present application.
[0160] The processor, by invoking the program instructions stored in the memory, is configured to perform any of the methods provided by embodiments of the present application according to the obtained program instructions.
[0161] The embodiments of the present application further provide a computer program product or computer program, which comprises computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to perform any of the methods described in the above embodiments. The program product can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium may, for example, be but is not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0162] The embodiments of the present application provide a computer readable storage medium for storing computer program instructions for the apparatus provided in the above embodiments of the present application, which contains programs for executing any of the methods provided in the above embodiments of the present application. The computer readable storage medium can be a non-transitory computer readable medium.
[0163] The computer readable storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to a magnetic storage (such as a floppy disk, a hard disk, a magnetic tape, a magneto-optical disk (MO), etc.), an optical storage (such as a CD, a DVD, a BD, a HVD, etc.), and a semiconductor storage (such as a ROM, an EPROM, an EEPROM, a non-volatile memory (NAND FLASH), a solid state disk (SSD)), etc.
[0164] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can adopt a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can adopt a computer program product implemented on one or more computer readable storage media containing computer usable program code (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.).
[0165] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 means for functionally implementing the steps in one or more flow or blocks
[0166] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 means for functionally implementing the steps in one or more flow or blocks
[0167] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flow or blocks Figure 1 means for functionally implementing the steps in one or more flow or blocks
[0168] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims and their equivalents, the application can be practiced otherwise than as specifically described.
Claims
1. A signal detection method, characterized by, The method comprises: acquiring a to-be-detected signal, framing the to-be-detected signal, and calculating the energy of a target frequency signal in each frame signal; for each frame signal, determining the energy mean value corresponding to the frame signal by using the energy of the target frequency signal in the frame signal; and determining whether the target signal exists in the frame signal by using the energy of the target frequency signal in the frame signal and the energy mean value corresponding to the frame signal, to obtain the determination result corresponding to the frame signal; finally determining whether the target signal exists in the to-be-detected signal by using the determination results corresponding to multiple frame signals; wherein, for each frame signal, the energy mean value corresponding to the frame signal is determined by using the energy of the target frequency signal in the frame signal, comprising: for each frame signal: determining the direction coefficient and the fluctuation coefficient of the energy change of the target frequency signal within a preset time length by using the energy of the target frequency signal in the frame signal; determining the smoothing coefficient for controlling the update speed of the energy mean value by using the direction coefficient and the fluctuation coefficient; determining the energy mean value corresponding to the frame signal by using the energy of the target frequency signal in the frame signal, the smoothing coefficient and the energy mean value corresponding to the last frame signal; the determination result corresponding to the frame signal is determined by using the determination result corresponding to the frame signal, comprising: determining the distribution characteristics of the target frequency signal within a period by using the determination result corresponding to the to-be-detected signal within the period; wherein, the determination result corresponding to the to-be-detected signal within the period comprises the determination results corresponding to multiple frame signals; comparing the distribution characteristics with the known distribution characteristics of the target frequency signal within the period, if consistent, finally determining that the target signal exists in the to-be-detected signal, otherwise, finally determining that the target signal does not exist in the to-be-detected signal.
2. The method of claim 1, wherein, the energy of the target frequency signal within the preset time length is determined by using the energy change value of the target frequency signal in the to-be-detected signal within the preset time length, comprising: determining the direction coefficient of the energy change of the target frequency signal within the preset time length by using the energy change value of the target frequency signal in the to-be-detected signal within the preset time length; determining the fluctuation coefficient of the energy change of the target frequency signal within the preset time length by using the sum of the energy change values of the target frequency signal in the to-be-detected signal within each preset time interval within the preset time length.
3. The method of claim 1, wherein, the smoothing coefficient for controlling the update speed of the energy mean value is determined by using the direction coefficient and the fluctuation coefficient, comprising: determining the ratio of the direction coefficient to the fluctuation coefficient; determining the smoothing coefficient for controlling the update speed of the energy mean value by using the ratio, and a preset first coefficient and a second coefficient.
4. The method of claim 1, wherein, the energy mean value corresponding to the frame signal is determined by using the energy of the target frequency signal in the frame signal, the smoothing coefficient and the energy mean value corresponding to the last frame signal, comprising: determining the first product of the smoothing coefficient and the energy of the target frequency signal in the frame signal; and obtaining the second product by multiplying the energy mean value corresponding to the last frame signal by the difference value obtained by subtracting the smoothing coefficient from the preset value; The sum of the first product and the second product is determined as the energy mean corresponding to the frame signal.
5. The method of claim 1, wherein, For each frame signal, whether the target signal exists in the frame signal is determined by using the energy of the target frequency signal in the frame signal and the energy mean corresponding to the frame signal, to obtain a determination result corresponding to the frame signal, including: For each frame signal, whether the energy of the target frequency signal in the frame signal is greater than or equal to the energy mean corresponding to the frame signal is determined, if yes, it is determined that the target signal exists in the frame signal; otherwise, it is determined that the target signal does not exist in the frame signal.
6. A signal detection device, characterized by It includes: A memory for storing program instructions; A processor for calling the program instructions stored in the memory to execute the method according to any one of claims 1 to 5 according to the obtained program execution right.
7. A computer program product for a computer, characterized in that It includes software code portions for executing the method according to any one of claims 1 to 5 when the product is running on the computer.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer executable instructions for causing the computer to execute the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Filter state divergence judgment method and device
CN105141287A
Financial time series prediction method, server and device
CN108875842A