Method and apparatus for detecting signal mutations and electronic device

CN116295799BActive Publication Date: 2026-05-29WUHAN JUXIN MICROELECTRONICS CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUHAN JUXIN MICROELECTRONICS CO LTD
Filing Date
2021-12-20
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing signal mutation detection methods are ineffective at identifying short-duration or short-interval mutation signals, making it difficult to accurately detect and filter out unwanted signal mutations, which can lead to unstable output power or damage to the speaker.

Method used

By sampling the signal, the maximum amplitude sampling point between every two adjacent zero-crossing points is determined. A reference sampling point and a reference amplitude value are set. A threshold is used to determine whether the maximum sampling point is a signal abrupt change point, and the threshold is dynamically adjusted to filter out unnecessary abrupt changes.

Benefits of technology

It effectively identifies desired signal abrupt changes, avoids the shortcomings of frame division and different tracking speed filters, ensures stable output power, and protects the speaker.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116295799B_ABST
    Figure CN116295799B_ABST
Patent Text Reader

Abstract

The present application relates to a method and device for detecting signal mutation and electronic equipment. A method for detecting signal mutation comprises: sampling a signal to obtain a sequence of sampling points with maximum amplitude values between adjacent zero-crossing points; determining a reference sampling point and a corresponding reference amplitude value in the sequence of sampling points based on amplitude values of the sampling points; determining a maximum sampling point with a maximum amplitude value from the reference sampling point to the latest sampling point in the sequence of sampling points; determining whether a difference or ratio between the maximum amplitude value and the reference amplitude value is greater than or equal to a first threshold value; and determining the maximum sampling point with the maximum amplitude value as a signal mutation point when the difference or ratio between the maximum amplitude value and the reference amplitude value is greater than or equal to the first threshold value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method and apparatus for detecting signal abrupt changes, and an electronic device including the apparatus. Background Technology

[0002] In signal processing, it is often necessary to detect abrupt changes in the signal. For example, a sudden increase in signal peaks in an audio signal can generate excessive output power, which may exceed the speaker's output capacity, leading to inappropriate sound output or even damage to the speaker. Therefore, it is necessary to detect signal abrupt changes and adjust the gain coefficient of the automatic gain control (AGC) circuit accordingly to ensure that the output power does not exceed the speaker's output capacity. Summary of the Invention

[0003] One aspect of this application provides a method for detecting signal abrupt changes, comprising: sampling a signal to obtain a sequence of sampling points with a maximum amplitude value between every two adjacent zero-crossing points; determining a reference sampling point and a corresponding reference amplitude value based on the amplitude values ​​of the sampling points in the sequence of sampling points; determining the maximum sampling point with the maximum amplitude value from the reference sampling point to the latest sampling point in the sequence of sampling points; determining whether the difference or ratio between the maximum amplitude value and the reference amplitude value is greater than or equal to the first threshold; and determining the maximum sampling point with the maximum amplitude value as a signal abrupt change point when the difference or ratio between the maximum amplitude value and the reference amplitude value is greater than or equal to the first threshold.

[0004] In some embodiments, the method further includes: when the difference or ratio between the maximum amplitude value and the reference amplitude value is less than a first threshold, determining the number of prior sampling points with sequentially decreasing amplitude values, starting from the maximum sampling point; adjusting the first threshold based on the number of prior sampling points with sequentially decreasing amplitude values ​​to obtain a second threshold; determining whether the difference or ratio between the maximum amplitude value and the reference amplitude value is greater than or equal to the second threshold; and when the difference or ratio between the maximum amplitude value and the reference amplitude value is greater than or equal to the second threshold, determining the maximum sampling point with the maximum amplitude value as a signal abrupt change point.

[0005] In some embodiments, a sampled segment of signal is cached in a buffer memory, and the method is repeatedly performed on the updated signal as the cached signal in the buffer memory is updated.

[0006] In some embodiments, the change in amplitude value of adjacent first or second sampling points relative to the amplitude value of the reference sampling point is greater than or equal to a third threshold, wherein the reference amplitude value is the amplitude value of the reference sampling point or the average of the amplitude values ​​of the reference sampling point and one or more adjacent sampling points.

[0007] In some embodiments, determining a reference sampling point includes: starting from the latest sampling point in the sequence of sampling points, determining whether the difference, ratio, or ratio of the difference to the first amplitude value of an earlier sampling point and the second amplitude value of an adjacent later sampling point is greater than or equal to the third threshold; when the difference, ratio, or ratio of the difference to the second amplitude value is greater than or equal to the third threshold, the later sampling point is determined as the reference sampling point; when no difference is detected between the first amplitude value and the second amplitude value... When the difference, ratio, or ratio of the second amplitude value to the first amplitude value is greater than or equal to the third threshold, starting from the earliest sampling point in the sequence of sampling points, it is determined whether the difference, ratio, or ratio of the second amplitude value of the subsequent sampling point to the first amplitude value of the adjacent earlier sampling point is greater than or equal to the third threshold; and when the difference, ratio, or ratio of the second amplitude value to the first amplitude value is greater than or equal to the third threshold, the earlier sampling point is determined as the reference sampling point.

[0008] Another aspect of this application provides an apparatus for detecting signal abrupt changes, comprising: a peak sampling unit for sampling a segment of signal to obtain a sequence of sampling points with the maximum amplitude value between every two adjacent zero-crossing points; a reference detection unit for determining a reference sampling point and a corresponding reference amplitude value in the sequence of sampling points based on the amplitude values ​​of the sampling points; and a sudden change detection unit, comprising: a maximum sampling point determination module for determining the maximum sampling point with the maximum amplitude value from the reference sampling point to the latest sampling point in the sequence of sampling points; a first comparison module for determining whether the difference or ratio between the maximum amplitude value and the reference amplitude value is greater than or equal to a first threshold; and a first sudden change determination module for determining the maximum sampling point with the maximum amplitude value as a signal abrupt change point when the difference or ratio between the maximum amplitude value and the reference amplitude value is greater than or equal to the first threshold.

[0009] In some embodiments, the mutation detection unit further includes: a decreasing sampling point determination module, configured to determine the number of prior sampling points whose amplitude values ​​decrease sequentially, starting from the maximum sampling point, when the difference or ratio between the maximum amplitude value and the reference amplitude value is less than a first threshold; a threshold adjustment module, configured to adjust the first threshold based on the number of prior sampling points whose amplitude values ​​decrease sequentially, to obtain a second threshold; a second comparison module, configured to determine whether the difference or ratio between the maximum amplitude value and the reference amplitude value is greater than or equal to the second threshold; and a second mutation determination module, configured to determine the maximum sampling point with the maximum amplitude value as a signal mutation point when the difference or ratio between the maximum amplitude value and the reference amplitude value is greater than or equal to the second threshold.

[0010] In some embodiments, the apparatus further includes: a signal buffer unit for buffering the segment of signal sampled by the peak sampling unit, wherein when the signal buffered in the signal buffer unit is updated, the peak sampling unit resamples the updated signal.

[0011] In some embodiments, the change in amplitude value of adjacent first or second sampling points relative to the amplitude value of the reference sampling point is greater than or equal to a third threshold, wherein the reference amplitude value is the amplitude value of the reference sampling point or the average of the amplitude values ​​of the reference sampling point and one or more adjacent sampling points.

[0012] In some embodiments, the reference detection unit is configured to perform the following operations: starting from the latest sampling point in the sequence of sampling points, determining whether the difference, ratio, or ratio of the difference to the first amplitude value of an earlier sampling point and the second amplitude value of an adjacent later sampling point is greater than or equal to a third threshold; when the difference, ratio, or ratio of the difference to the second amplitude value of the first amplitude value and the second amplitude value is greater than or equal to the third threshold, determining the later sampling point as the reference sampling point; when no difference or ratio between the first amplitude value and the second amplitude value is detected, the reference sampling point is determined ... When the difference, ratio, or ratio of the amplitude values ​​between the amplitude values ​​is greater than or equal to the third threshold, starting from the earliest sampling point in the sequence of sampling points, it is determined whether the difference, ratio, or ratio of the second amplitude value of the subsequent sampling point to the first amplitude value of the adjacent earlier sampling point is greater than or equal to the third threshold; and when the difference, ratio, or ratio of the second amplitude value to the first amplitude value is greater than or equal to the third threshold, the earlier sampling point is determined as the reference sampling point.

[0013] Another aspect of this application provides an electronic device that includes the aforementioned means for detecting signal abrupt changes. In some embodiments, the signal is an audio signal.

[0014] The above and other features and advantages of the present invention will become apparent from the following description of specific embodiments in conjunction with the accompanying drawings. Attached Figure Description

[0015] Figure 1A , Figure 1B and Figure 1C It is a graph showing examples of various signal abrupt changes.

[0016] Figure 2 This is a flowchart illustrating a method for detecting signal mutations according to an embodiment of this application.

[0017] Figure 3A , Figure 3B and Figure 3C This is a schematic diagram illustrating sampling a signal to obtain a sequence of sampling points according to an embodiment of this application.

[0018] Figure 4A and Figure 4B This is a schematic diagram illustrating the determination of a reference sampling point and a reference amplitude value according to an embodiment of this application.

[0019] Figure 5 This is a schematic diagram illustrating the determination of the maximum sampling point according to an embodiment of this application.

[0020] Figure 6A and Figure 6B This is a schematic diagram illustrating the continuous reduction of the number of sampling points before determining the maximum sampling point according to an embodiment of this application.

[0021] Figure 7 This is a block diagram illustrating an apparatus for detecting signal mutations according to an embodiment of this application.

[0022] Figure 8 This is a block diagram illustrating an electronic device according to an embodiment of this application. Detailed Implementation

[0023] Hereinafter, exemplary embodiments according to this application will be described in detail with reference to the accompanying drawings. Note that the drawings may not be drawn to scale. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments of this application, and this application is not limited to the exemplary embodiments described herein.

[0024] As mentioned earlier, when a signal abrupt change is detected, the gain coefficient of the automatic gain control (AGC) circuit can be adjusted accordingly to ensure that the output power does not exceed the speaker's output capability. Currently, common signal abrupt change detection methods include dividing the signal into several frames using a time window, first detecting signal characteristics such as peak values ​​in each frame, and then comparing the signal characteristics of adjacent frames. For example, a signal abrupt change is determined when the ratio of peak values ​​exceeds a certain threshold. Another method for detecting signal abrupt changes involves using two peak detection filters with different detection speeds. One peak detection filter tracks changes in signal peak values ​​quickly, while the other tracks changes slowly, requiring a time lag to detect the changes. The difference between the signal peak values ​​detected by these two peak detection filters can be used to determine whether a signal abrupt change has been detected.

[0025] However, existing signal abrupt change detection methods still have some drawbacks. For example, when dividing the signal into several frames using a time window, different starting points will result in different signal frames, leading to varying signal abrupt change detection results. This problem is likely to exist in all frame-based abrupt change detection methods. Furthermore, these signal abrupt change detection methods may not be suitable for certain specific application scenarios. For example, Figure 1A , Figure 1B and Figure 1C Three mutation signals are shown respectively, among which Figure 1A The mutation signal shown has a relatively long duration. Figure 1B The mutation signal shown has a short duration. Figure 1C This shows two abrupt signal peaks with a short interval between them. Generally speaking, Figure 1A The longer duration of the abrupt signal shown leads to a larger output power, therefore it is desirable that it be effectively identified. Figure 1B The short-duration abrupt signal shown has a small impact on the output power and can therefore be ignored to reduce processing load. However, existing signal abruptness detection methods cannot specifically ignore such short-duration abrupt signals. On the other hand, for Figure 1C As shown, when two abrupt signal intervals are used with two peak detection filters at different tracking speeds, the slower tracking filter cannot detect the rapid increase in signal peak value after a decrease in time. Therefore, it is difficult to effectively detect this rapid peak change between adjacent abrupt signals. If a signal frame method is used, it is possible to classify some of the larger peak values ​​of the two abrupt signals and the lower peak values ​​between them into the same signal frame. In this case, it is also difficult to detect this rapid peak change between adjacent abrupt signals.

[0026] The exemplary embodiments of this application described in detail below with reference to the accompanying drawings provide an improved technical solution that can overcome the above and other technical problems, effectively detect the desired mutation signal, and filter out signal mutations that do not need to be detected.

[0027] Figure 2 This is a flowchart illustrating a method 100 for detecting signal mutations according to an embodiment of this application. (Refer to...) Figure 2 Method 100 may begin with step 110, sampling the signal to obtain a sequence of sampling points with the maximum amplitude value between every two adjacent zero-crossings. The sampled signal may be a digital signal, for example, a segment of digital signal may be buffered in a buffer memory, and the signal stored in the buffer memory may be sampled; the sampled signal may also be an analog signal, for example, an analog signal may be sampled, and the obtained sample signal may be stored in a buffer memory for subsequent processing. In some embodiments, the signal processed here may be an audio signal.

[0028] Figure 3A The diagram schematically illustrates a signal cycle. Figure 3B It shows from Figure 3A The signal shown is used to determine the sampling points. In step 110, the sampling points with the maximum amplitude value between every two adjacent zero-crossing points are determined. Figure 3A The signal is positive between the zero-crossing points Z0 and Z1, with a maximum amplitude of A1; and negative between the zero-crossing points Z1 and Z2, with a maximum amplitude of A2. Therefore, as... Figure 3B As shown, two sampling points with the maximum amplitude value can be identified, with amplitude values ​​A1 and A2 respectively. Here, the amplitude value refers to the magnitude or absolute value of the amplitude, regardless of its sign. When sampling a signal and identifying the sampling points with the maximum amplitude value between every two adjacent zero-crossing points, a sequence of sampling points can be obtained. Figure 3C An example of a sampling point sequence is illustrated, which can be used for the subsequent processing described below. Here, for the convenience of the following description, the sequence of sampling points can be numbered sequentially from S0 to S1, starting from the side of the latest / latest sampling point on the time axis. n Alternatively, the numbering can be done in reverse order, with the earliest / oldest sampling point numbered S0 and the latest / newest sampling point numbered S... n Step 110 can determine the value of each sampling point S. x Amplitude value A x and time value T x The index x takes values ​​from 0 to n, where n is an integer greater than 1. Here, each sampling point S... x Time value T xIt can be the precise time value of the sampling point, or the time value of the sampling point before or after the zero-crossing point.

[0029] Continue to refer to Figure 2 In step 120, a reference sampling point and its corresponding reference amplitude value in the obtained sampling point sequence can be determined based on the amplitude values ​​of the sampling points. In some embodiments, the reference sampling point can be determined based on the change in the amplitude values ​​of the sampling points. For example, when the change in amplitude values ​​between adjacent sampling points exceeds a threshold, the sampling point with the smaller amplitude value can be used as the reference sampling point, and the amplitude value of the reference sampling point or the average amplitude value of the reference sampling point and one or more adjacent sampling points can be used as the reference amplitude value. Here, the sampling point adjacent to the reference sampling point whose amplitude value change exceeds the threshold can be called a reference sampling point, which can be an earlier / preceding adjacent sampling point of the reference sampling point or a later / further adjacent sampling point of the reference sampling point.

[0030] The following reference Figure 4A and 4B To illustrate an example of determining the reference sampling point and reference amplitude value, where Figure 4A and Figure 4B Examples of reference sampling points and reference amplitude values ​​determined under two different conditions are shown. First, refer to... Figure 4A In step 120, the earlier sampling point S can be determined starting from the latest sampling point S0 in the sampling point sequence. x+1 Amplitude value A x+1 Compared to the adjacent sampling point S x Amplitude value A x Changes in V1(A) x+1 A x Whether the amplitude value is greater than or equal to a threshold TH1. Here, the relative change in amplitude value V1(A) is considered. x+1 A x () can be the difference between two amplitude values, V1 = A x+1 -A x Alternatively, it could be the ratio of two amplitude values, V1 = A. x+1 / A x Or it could be the difference (A) x+1 -A x (relative to amplitude value A) x+1 Or A x The ratio V1 = (A x+1 -A x ) / A x+1 Or V1 = (A x+1 -A x ) / A x An appropriate threshold TH1 can be set based on the application scenario and the defined relative amplitude change V1. For example, when V1 = Ax+1 / A x When this is the case, the threshold TH1 can be set to a value greater than 1, such as 1.1, 1.2, 1.3, 1.4, or 1.5. When the initial sampling point S is determined... x+1 Compared to the adjacent sampling point S x When the amplitude change V1 is greater than or equal to the threshold TH1, the sampled values ​​with smaller amplitudes at subsequent sampling points S can be used. x The reference sampling point S was determined. B The earlier sampling point S with a larger amplitude value x+1 The reference sampling point S R Once the reference sampling point S is determined... B At that time, the reference sampling point S can be... B The amplitude value is used as the reference amplitude value A. B Or, the reference sampling point S B and one or more adjacent sampling points (e.g., at the reference sampling point S on the time axis). B The average amplitude value of one or more adjacent sampling points is used as the reference amplitude value A. B ,like Figure 4A As shown. This is understandable. Figure 4A The reference sampling point S determined in the middle B It could be a sampling point at the end of the falling edge of the previous abrupt change signal.

[0031] In some cases, such as Figure 4B As shown, it is possible that the prior sampling point S was not detected. x+1 Compared to the later sampling point S x The amplitude change V1 is greater than or equal to the threshold TH1. In this case, the earliest sampling point S in the sampling point sequence can be used. n Starting from one side, determine the sampling point S. x Amplitude value A x Relative to the adjacent prior sampling point S x+1 Amplitude value A x+1 Changes in V2(A) x A x+1 Is it greater than or equal to the threshold TH1? Here, the relative change in amplitude value V2(A) x A x+1 () can be the difference between two amplitude values, V2 = A x -A x+1 Alternatively, it could be the ratio of two amplitude values, V2 = A. x / A x+1 Or it could be the difference (A) x -A x+1 (relative to amplitude value A) x+1 Or A x The ratio V2 = (Ax -A x+1 ) / A x+1 Or V2=(A x -A x+1 ) / A x When it is determined that at the post-sampling point S x Relative to the adjacent prior sampling point S x+1 When the amplitude change V2 is greater than or equal to the threshold TH1, the earlier sampling point S with a smaller amplitude value can be... x+1 The reference sampling point S was determined. B The sample point S with a larger amplitude value will be used for sampling. x The reference sampling point S R Once the reference sampling point S is determined... B At that time, the reference sampling point S can be... B The amplitude value is used as the reference amplitude value A. B Or, the reference sampling point S B and one or more adjacent sampling points (e.g., at the reference sampling point S on the time axis). B The average amplitude value of one or more adjacent sampling points is used as the reference amplitude value A. B ,like Figure 4B As shown. This is understandable. Figure 4B The reference sampling point S determined in the middle B It may be the sampling point at the beginning of the rising edge of the subsequent mutation signal.

[0032] It can also be understood that, in some embodiments, when detected Figure 4A Even at the reference sampling point shown, it can still be detected. Figure 4B The reference sampling points are shown below. At this point, the two detected sampling points and multiple sampling points in between can all be used as reference sampling points, and the average amplitude value of these reference sampling points can be used as the reference amplitude value.

[0033] Return to reference Figure 2 In step 130, the sampling point sequence can be determined from the determined reference sampling point S. B The latest sampling point S0 has the maximum amplitude value A. max Maximum sampling point S max This can be achieved by simply comparing the amplitude values ​​of the sampling points. Figure 5 The determined maximum sampling point S is shown. max Examples.

[0034] In step 140, the maximum amplitude value A can be determined. max With reference amplitude value A B The difference between (A) max -A B ) or ratio (A)max / A B Whether it is greater than or equal to the threshold TH2, for simplicity, in Figure 2 Only the amplitude difference (A) is shown in the figure. max -A B Compare the amplitude differences (A). max -A B ) or amplitude ratio (A) max / A B If the value is greater than or equal to the threshold TH2, it indicates that the maximum sampling point S is... max The amplitude is high enough to produce a signal abrupt change, so the maximum sampling point S can be set in step 150. max The mutation sampling point was identified, and the corresponding mutation amplitude value A was obtained. max and time value T max .

[0035] In the above process, by processing the maximum amplitude sampling points between adjacent zero-crossings to detect signal abrupt changes, it is possible to avoid using time windows for frame division or using two peak detection filters with different tracking speeds, thus avoiding the related drawbacks discussed earlier. By utilizing the maximum amplitude sampling points between zero-crossings and setting appropriate thresholds TH1 and TH2, abrupt signal changes can be accurately identified, and it is also possible to identify two abrupt signal changes with short time intervals.

[0036] It should also be understood that the steps described above and below can be dynamically repeated on the signal. Specifically, during signal processing, data signals can be continuously written to and read from the buffer memory according to a clock signal. When the signal in the buffer memory is partially or fully updated, the processing steps described above and below can be performed on the signal in the buffer memory, such as determining the sampling point sequence, identifying the reference sampling point and the maximum sampling point, and identifying abrupt sampling points, etc. It should be understood that by setting an appropriate buffer signal length, signal update frequency, and re-executing the buffer signal... Figure 2 The time interval of the method shown ensures that only the latest signal mutation needs to be detected each time the method is executed, while previous signal mutations have already been detected in the last execution of the method. Therefore, only the latest reference sampling point is detected in step 120, and then the maximum sampling point from the reference sampling point to the latest sampling point is detected in step 130, and then it is determined in subsequent steps whether it is a mutation sampling point that meets the relevant threshold conditions. In this way, by repeating the execution... Figure 2 This method can continuously detect abrupt changes in the signal and perform corresponding processing, such as adjusting the gain coefficient of the automatic gain control (AGC) circuit.

[0037] Continue to refer to Figure 2, in some embodiments, the maximum amplitude value A may be determined in step 140 max and the reference amplitude value A B The difference between (A max - A B ) or the ratio (A max / A B ) is less than the threshold TH2. At this time, in step 160, the maximum sampling point S max The number N of sampling points S with continuously decreasing amplitude values before (earlier) dec can be further determined dec . In the example shown in Figure 6A , it can be determined that there are 5 (N max = 5) continuously decreasing sampling points S before the maximum sampling point S dec , in the example of dec there are only 2 (N Figure 6B = 2) continuously decreasing sampling points S dec . Generally speaking, dec The mutant signal with a shorter rising edge shown in Figure 6B has less impact on power, and it may be jitter noise, so it is desired to be filtered out; while Figure 6A The mutant signal with a longer rising edge shown in has a greater impact on power, and it is generally a valid signal that needs to be processed. Therefore, in step 170, based on the determined number N of continuously decreasing sampling points S dec , the amplitude threshold TH2 can be adjusted to determine a new amplitude threshold TH3. Specifically, the new amplitude threshold TH3 can be determined as, for example, TH3 = TH2 * R dec , where R is an adjustment factor and 0 < R < 1, or TH3 = TH2 - Step * N Ndec , where Step is an adjustment step size and is a positive value. In this way, when the value of N dec is larger, the adjusted amplitude threshold TH3 is smaller, and the minimum value of TH3 can be set to a predetermined value, that is, after reaching this minimum value, TH3 will not continue to decrease. If the value of N dec is small, then the adjusted TH3 may decrease less compared to TH2<0000…).

[0038] Then in step 180, it can be determined whether the difference between the maximum amplitude value A max and the reference amplitude value A B (A max - A B ) or the ratio (A max / A B ) is greater than or equal to the threshold TH2. For simplicity, only the use of the amplitude difference (A Figure 2 ) is shown inmax -A B The comparison is performed. It is understood that since threshold TH3 is obtained by adjusting TH2, and threshold TH2 is set for the difference or ratio, the comparison method used in step 180 can be the same as in step 140, i.e., both use difference or ratio comparison. If the amplitude difference (A...) max -A B ) or amplitude ratio (A) max / A B If the maximum sampling point S is greater than or equal to the threshold TH3, then in step 190, the maximum sampling point S can be set. max The mutation sampling point was identified, and the corresponding mutation amplitude value A was obtained. max and time value T max If the amplitude difference (A) max -A B ) or amplitude ratio (A) max / A B If the value is still less than the adjusted threshold TH3, then in step 199 it can be determined that no mutation point was detected. Then, the process can be repeated for, for example, the updated signal in the buffer memory. Figure 2 The method shown is used to detect signal mutations.

[0039] It is understandable that in steps 140 and 150 above, if the amplitude value of the maximum sampling point is large enough, it is directly identified as a signal abrupt change. If the amplitude value of the maximum sampling point is not large enough, in steps 160 and 170, the amplitude threshold is adjusted based on the number of sampling points with continuously decreasing amplitude values ​​before the maximum sampling point. Then, based on the adjusted amplitude threshold, it is determined whether the amplitude value of the maximum sampling point is greater than or equal to the adjusted threshold. If the condition is met, the maximum sampling point can also be identified as an abrupt change sampling point. By dynamically adjusting the threshold according to the relationship between the data before and after the sampling point, some small and short jittery signal abrupt changes can be filtered out, while the desired signal abrupt change can be correctly detected.

[0040] Figure 7 This is a schematic block diagram of an apparatus 200 for detecting signal abrupt changes according to an embodiment of this application. The various functional units and modules in apparatus 200 can be configured to perform the functions described above. Figures 1A to 6B The method 100 for detecting signal abrupt changes described herein will only briefly describe the apparatus 200; for more specific details, please refer to the detailed description of the detection method 100 above. (Refer to...) Figure 7 The device 200 may include a signal buffer unit 210, a peak sampling unit 220, a reference detection unit 230, and a sudden change detection unit 240.

[0041] The signal buffer unit 210 may include, for example, a buffer memory for buffering a segment of signal data. The peak sampling unit 220 may sample the buffered signal data to perform relevant processing steps. In some embodiments, the signal buffer unit 210 may also be used to buffer sampled data generated by the peak sampling unit 220.

[0042] The peak sampling unit 220 can be used to sample the signal to obtain a sequence of sampling points with the maximum amplitude value between every two adjacent zero crossings.

[0043] The reference detection unit 230 can be used to determine a reference sampling point and its corresponding reference amplitude value in a sampling point sequence based on the amplitude value of the sampling points. In some embodiments, the reference sampling point may be a sampling point that satisfies the following condition: the change in amplitude value of the adjacent first or second sampling point relative to the amplitude value of the reference sampling point is greater than or equal to a first threshold. The reference amplitude value may be the amplitude value of the reference sampling point, or it may be the average of the amplitude values ​​of the reference sampling point and one or more adjacent sampling points.

[0044] In some embodiments, the reference detection unit 230 can start from the latest / latest sampling point in the sampling point sequence and determine whether the difference, ratio, or ratio of the difference to the first amplitude value or the second amplitude value of an adjacent subsequent sampling point is greater than or equal to a first threshold. When it is greater than or equal to the first threshold, the reference detection unit 230 can determine the subsequent sampling point as the reference sampling point. If it is less than the first threshold, the reference detection unit 230 can also start from the earliest sampling point in the sampling point sequence and determine whether the difference, ratio, or ratio of the second amplitude value of a subsequent sampling point to the first amplitude value of an adjacent earlier sampling point is greater than or equal to the first threshold. When it is greater than or equal to the first threshold, the earlier sampling point is determined as the reference sampling point.

[0045] The mutation detection unit 240 may include a maximum sampling point determination module 241, a first comparison module 242, and a first mutation determination module 243. The maximum sampling point determination module 241 can determine the maximum sampling point with the maximum amplitude value from the reference sampling point to the latest sampling point in the sampling point sequence. The first comparison module 242 can compare the difference or ratio between the maximum amplitude value of the maximum sampling point and the reference amplitude value with a second threshold. If the difference or ratio is greater than or equal to the second threshold, the first mutation determination module 243 can determine the maximum sampling point as a signal mutation point.

[0046] In some embodiments, the mutation detection unit 240 may further include a decreasing sampling point determination module 244, a threshold adjustment module 245, a second comparison module 246, and a second mutation determination module 247. When the first comparison module 242 determines that the difference or ratio between the maximum amplitude value of the maximum sampling point and the reference amplitude value is less than a second threshold, the decreasing sampling point determination module 244 can determine the number of prior sampling points whose amplitude values ​​continuously decrease from the maximum sampling point. Then, the threshold adjustment module 245 can adjust the second threshold based on this number to obtain a third threshold. The second comparison module 246 can compare the difference or ratio between the maximum amplitude value and the reference amplitude value with the third threshold. When the difference or ratio is greater than or equal to the third threshold, the second mutation determination module 247 can determine the maximum sampling point as a signal mutation point.

[0047] Figure 8 This is a schematic block diagram illustrating an electronic device 10 according to an embodiment of this application. The electronic device 10 may be a portable electronic device such as a mobile phone, tablet, or personal digital assistant (PDA). The electronic device 10 may include a device 300 for detecting signal abrupt changes, which may be implemented as described above. Figure 7 The described device 200. In the electronic device 10, the device 300 can receive an audio signal as input, detect signal abrupt changes, and then instruct the signal abrupt changes to, for example, an automatic gain control (AGC) circuit (not shown). The AGC circuit can adjust the gain coefficient according to the amplitude, time, etc. of the signal abrupt changes to control the power of the output audio signal. The amplified audio signal output can be provided to a speaker to output a sound signal, or it can be provided to a vibrating device such as a linear motor to produce a tactile effect output.

[0048] The basic principles of this application have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this application are merely examples and not limitations, and should not be considered as essential features of each embodiment of this application. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the application to the necessity of employing the aforementioned specific details for implementation.

[0049] The block diagrams of devices, apparatuses, devices, and systems involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Each block shown in the figures can be subdivided into multiple sub-blocks, each sub-block implementing a related function or step, so that multiple sub-blocks can achieve the function implemented by a larger block before subdivision. Alternatively, multiple blocks shown in the figures can also be combined into a single block, which can achieve the functions of the multiple blocks before merging. In this application, words such as "comprising," "including," "having," etc., are open-ended terms meaning "including but not limited to," and are used interchangeably with them. The terms "or" and "and" as used herein refer to the terms "and / or," and are used interchangeably with them unless the context clearly indicates otherwise. The term "such as" as used herein refers to the phrase "such as but not limited to," and is used interchangeably with it.

[0050] It should also be noted that in the apparatus, equipment, and methods of this application, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions of this application.

[0051] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this application. Therefore, this application is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0052] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this application to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.

Claims

1. A method for detecting signal abrupt changes, comprising: A signal is sampled to obtain a sequence of sampling points with the maximum amplitude between every two adjacent zero-crossing points; In the sequence of sampling points, a reference sampling point and its corresponding reference amplitude value are determined based on the amplitude value of the sampling point; Determine the maximum sampling point with the largest amplitude value in the sequence of sampling points from the reference sampling point to the latest sampling point; Determine whether the difference or ratio between the maximum amplitude value and the reference amplitude value is greater than or equal to a first threshold; as well as When the difference or ratio between the maximum amplitude value and the reference amplitude value is greater than or equal to a first threshold, the maximum sampling point with the maximum amplitude value is determined as a signal abrupt change point. The method further includes: When the difference or ratio between the maximum amplitude value and the reference amplitude value is less than the first threshold, starting from the maximum sampling point with the maximum amplitude value, determine the number of earlier sampling points whose amplitude values ​​decrease sequentially. The first threshold is adjusted based on the number of prior sampling points whose amplitude values ​​decrease sequentially, to obtain the second threshold; Determine whether the difference or ratio between the maximum amplitude value and the reference amplitude value is greater than or equal to the second threshold; and When the difference or ratio between the maximum amplitude value and the reference amplitude value is greater than or equal to the second threshold, the maximum sampling point with the maximum amplitude value is determined as the signal abrupt change point.

2. The method as described in claim 1, wherein, The change in amplitude value of adjacent sampling points before or after the reference sampling point relative to the amplitude value of the reference sampling point is greater than or equal to a third threshold. The reference amplitude value is the amplitude value of the reference sampling point or the average of the amplitude values ​​of the reference sampling point and one or more adjacent sampling points.

3. The method as described in claim 2, wherein, Determining the baseline sampling points includes: Starting from the latest sampling point in the sequence of sampling points, determine whether the difference, ratio, or ratio of the first amplitude value of the earlier sampling point to the second amplitude value of the adjacent later sampling point is greater than or equal to the third threshold. When the difference, ratio, or ratio of the first amplitude value and the second amplitude value is greater than or equal to the third threshold, the subsequent sampling point is determined as the reference sampling point; When no difference, ratio, or ratio of the first amplitude value and the second amplitude value is detected that is greater than or equal to the third threshold, starting from the earliest sampling point in the sequence of sampling points, it is determined whether the difference, ratio, or ratio of the difference to the first amplitude value at a subsequent sampling point is greater than or equal to the third threshold; and When the difference, ratio, or ratio between the second amplitude value and the first amplitude value is greater than or equal to the third threshold, the prior sampling point is determined as the reference sampling point.

4. An apparatus for detecting signal abrupt changes, comprising: The peak sampling unit is used to sample a segment of signal to obtain a sequence of sampling points with the maximum amplitude value between every two adjacent zero crossings; A reference detection unit is used to determine the reference sampling point and the corresponding reference amplitude value in the sequence of sampling points based on the amplitude value of the sampling point; as well as The mutation detection unit includes: The maximum sampling point determination module is used to determine the maximum sampling point with the maximum amplitude value in the sequence of sampling points from the reference sampling point to the latest sampling point; A first comparison module is used to determine whether the difference or ratio between the maximum amplitude value and the reference amplitude value is greater than or equal to a first threshold; and The first mutation determination module is used to determine the maximum sampling point with the maximum amplitude value as a signal mutation point when the difference or ratio between the maximum amplitude value and the reference amplitude value is greater than or equal to a first threshold. The mutation detection unit further includes: The decreasing sampling point determination module is used to determine the number of prior sampling points whose amplitude values ​​decrease sequentially, starting from the maximum sampling point with the maximum amplitude value, when the difference or ratio between the maximum amplitude value and the reference amplitude value is less than a first threshold. A threshold adjustment module is used to adjust the first threshold based on the number of prior sampling points whose amplitude values ​​decrease sequentially, to obtain a second threshold; The second comparison module is used to determine whether the difference or ratio between the maximum amplitude value and the reference amplitude value is greater than or equal to the second threshold; and The second mutation determination module is used to determine the maximum sampling point with the maximum amplitude value as the signal mutation point when the difference or ratio between the maximum amplitude value and the reference amplitude value is greater than or equal to the second threshold.

5. The apparatus of claim 4, wherein, The change in amplitude value of adjacent sampling points before or after the reference sampling point relative to the amplitude value of the reference sampling point is greater than or equal to a third threshold. The reference amplitude value is the amplitude value of the reference sampling point or the average of the amplitude values ​​of the reference sampling point and one or more adjacent sampling points.

6. The apparatus of claim 5, wherein, The reference detection unit is configured to perform the following operations: Starting from the latest sampling point in the sequence of sampling points, determine whether the difference, ratio, or ratio of the first amplitude value of the earlier sampling point to the second amplitude value of the adjacent later sampling point is greater than or equal to the third threshold. When the difference, ratio, or ratio of the first amplitude value and the second amplitude value is greater than or equal to the third threshold, the subsequent sampling point is determined as the reference sampling point; When no difference, ratio, or ratio of the first amplitude value and the second amplitude value is detected that is greater than or equal to the third threshold, starting from the earliest sampling point in the sequence of sampling points, it is determined whether the difference, ratio, or ratio of the difference between the second amplitude value of the later sampling point and the first amplitude value of the adjacent earlier sampling point is greater than or equal to the third threshold. as well as When the difference, ratio, or ratio between the second amplitude value and the first amplitude value is greater than or equal to the third threshold, the prior sampling point is determined as the reference sampling point.

7. An electronic device comprising the means for detecting signal abrupt changes as described in any one of claims 4-6.

8. The electronic device as claimed in claim 7, wherein, The signal is an audio signal.