Signal processing method, device, electronic device and medium
By performing phase compensation on the phase spectrum of the signal, the difficulty in signal distinction in the medium and low signal-to-noise ratio environment is solved, and the signal processing accuracy and noise immunity are improved in this environment.
Patent Information
- Application Number
- CN202210377040.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-11
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2042-04-11
AI Technical Summary
In the low and medium signal-to-noise ratio environment, it is difficult for signal processing methods to accurately distinguish signals from noise, resulting in the inability to determine the signal of the target frequency from the amplitude spectrum.
By obtaining the first phase spectrum of the signal and using the phase compensation function for phase compensation, a second phase spectrum is obtained. This spectrum is the phase characteristic spectrum of the signal at the target frequency, so as to be accurate in a medium- and low signal-to-noise ratio environment. Signals that distinguish the target frequency.
Signal distinction in medium and low signal-to-noise ratio environment is realized, and signal processing accuracy and noise immunity are improved.
Smart Images

Figure CN115295024B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of communication technology, and specifically relates to a signal processing method, device, electronic equipment and medium. Background Art
[0002] With the development of communication technology, various signal detections are widely used in people’s production and life. For example, signal detection such as harmonic detection of voice signals, single-frequency tone detection, radar reflection frequency detection, and biomedical signal frequency detection are important in scenarios such as voice communication, industrial automation control, radar ranging, and medical imaging.
[0003] Since signals (such as speech signals) are often accompanied by noise, it is necessary to distinguish between signals and noise in practical applications to obtain effective signals. Usually, the energy curves of signals and noise can be reflected by the amplitude spectrum. Since the energy of the signal is stronger than the energy of the noise, the signal and noise can be distinguished according to the two curves in the amplitude spectrum, that is, the signal indicated by the curve with stronger energy is determined as the signal of the target frequency.
[0004] However, when the electronic device is in a low to medium signal-to-noise ratio environment below -15 decibels (dB), the energy of the signal is not much different from the energy of the noise, so the energy difference shown by the curve in the amplitude spectrum is small, making it impossible to distinguish between the signal and the noise. As a result, it is impossible to accurately determine the signal of the target frequency from the amplitude spectrum. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a signal processing method, device, electronic device and medium, which can solve the problem that the signal of the target frequency cannot be accurately determined from the amplitude spectrum when in a medium or low signal-to-noise ratio environment.
[0006] In a first aspect, an embodiment of the present application provides a signal processing method, the method comprising: obtaining a first phase spectrum of M frame signals, where M is a positive integer; performing phase compensation on the first phase spectrum according to a first phase compensation function to obtain a second phase spectrum, wherein the second phase spectrum is a phase characteristic spectrum of the M frame signal at a target frequency.
[0007] In a second aspect, an embodiment of the present application provides a signal processing device, which includes: an acquisition module and a processing module. The acquisition module is used to acquire a first phase spectrum of an M-frame signal, where M is a positive integer. The processing module is used to perform phase compensation on the first phase spectrum acquired by the acquisition module according to a first phase compensation function to obtain a second phase spectrum, where the second phase spectrum is a phase characteristic spectrum of the M-frame signal at a target frequency.
[0008] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0009] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0010] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0011] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0012] In an embodiment of the present application, a first phase spectrum of an M-frame signal is obtained, where M is a positive integer; according to a method, the method includes: obtaining a first phase spectrum of an M-frame signal, where M is a positive integer; performing phase compensation on the first phase spectrum according to a phase compensation function to obtain a second phase spectrum, where the second phase spectrum is a phase characteristic spectrum of the M-frame signal at a target frequency. Through this solution, after obtaining a phase spectrum of at least one frame of signal, another phase spectrum is obtained by performing phase compensation on the one phase spectrum according to a phase compensation function, and since the other phase spectrum is the phase characteristic spectrum of the at least one frame of signal at the target frequency, the signal of the target frequency can be accurately determined from the other phase spectrum. In this way, when in a medium to low signal-to-noise ratio environment, the signal of the target frequency can be distinguished by the signal processing method provided by the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 A schematic diagram of a signal processing method provided in an embodiment of the present application;
[0014] Figure 2 One of the schematic diagrams of a process for processing a phase spectrum provided in an embodiment of the present application;
[0015] Figure 3 A second schematic diagram of a process for processing a phase spectrum provided in an embodiment of the present application;
[0016] Figure 4 A third schematic diagram of a process of processing a phase spectrum provided in an embodiment of the present application;
[0017] Figure 5 A fourth schematic diagram of a process of processing a phase spectrum provided in an embodiment of the present application;
[0018] Figure 6 One of the time-frequency distribution diagrams provided in the embodiment of the present application;
[0019] Figure 7 A second schematic diagram of a time-frequency distribution provided in an embodiment of the present application;
[0020] Figure 8 A third time-frequency distribution diagram provided in an embodiment of the present application;
[0021] Fig. 9 A schematic diagram of the structure of a signal processing device provided in an embodiment of the present application;
[0022] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0023] Fig.11 A hardware schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0025] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0026] The signal processing method, device, electronic device and medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0027] like Figure 1 As shown, an embodiment of the present application provides a signal processing method, which includes the following S101 to S102.
[0028] S101. A signal processing device obtains a first phase spectrum of M frames of signal.
[0029] Wherein, M is a positive integer.
[0030] Optionally, the signal processing method provided in the embodiment of the present application may be applied to a medium to low signal-to-noise ratio environment below -15 decibels (dB).
[0031] Optionally, in the embodiment of the present application, the M frame signals are non-dense frequency signals. For example, the M frame signals are voice signals.
[0032] Optionally, the first phase spectrum diagram is a phase diagram of the M frame signals in the frequency domain.
[0033] Furthermore, when M=1, that is, one frame signal, the first phase spectrum diagram includes one phase-frequency curve; when M is greater than 1, that is, multiple frame signals, the first phase spectrum diagram includes multiple phase-frequency curves.
[0034] In addition, for the first phase spectrum, the electronic device can obtain it directly from the server, or the electronic device can obtain it by performing Fourier transform on the time domain signal. For details, please refer to the implementation method in the relevant technology, which will not be elaborated in the embodiments of the present application.
[0035] S102: The signal processing device performs phase compensation on the first phase spectrum according to a first phase compensation function to obtain a second phase spectrum.
[0036] Among them, the above-mentioned second phase spectrum is the phase characteristic spectrum of the M frame signal at the target frequency.
[0037] Optionally, the target frequency is determined according to a phase feature of the second phase spectrum.
[0038] Optionally, before the above S102, the signal processing method provided by the embodiment of the present application may further include: extracting the slope of the window function to obtain a first phase compensation function.
[0039] Optionally, the above window function may be set by a developer or customized by a user. For example, the window function may be a Hanning window.
[0040] Specifically, since the window function is a multi-segment continuous curve, its slope can be extracted to form a straight line with equal slope, that is, the straight line with equal slope is the first phase compensation function.
[0041] It should be noted that, by performing phase compensation processing on the first phase spectrum according to the first phase compensation function, the warped phase spectrum can be unwound, thereby achieving a flattening effect of the phase-frequency curve.
[0042] For example, take M=3 as an example. Figure 2 As shown, Figure 2 There are three sub-graphs (a) to (c). Figure 2 (a) in the figure is the amplitude spectrum of three adjacent frames. Figure 2 (b) is the first phase spectrum of the three adjacent frames. Figure 2 (c) is the phase curve of the three adjacent frames after the first phase spectrum is phase compensated by the first phase compensation function, that is, the second phase spectrum.
[0043] Further, based on the above Figure 2 An example is analyzed, and the area in the second phase spectrum corresponding to the sub-band area with stronger amplitude in the amplitude spectrum shows a good flatness feature, that is, the first phase compensation function has a good feature extraction effect.
[0044] Exemplarily, the difference between the first phase spectrum and the first phase compensation function is calculated to obtain a phase after the initial phase with wrapping is compensated once; then the phase is modulo 2 times π and then divided by 2 to obtain another phase after modulo; finally, the sine and then the arcsine of the other phase after modulo are taken to obtain a new phase spectrum, that is, the second phase spectrum.
[0045] It should be noted that, based on the characteristics of the sine signal taking the absolute value of the positive and negative phases, a method of taking the sine and finally taking the arc sine is designed to effectively remove the interference of phase wrapping. Furthermore, considering that the phase spectrum information does not need to pay attention to the sign of the phase difference, the phase information is divided by 2 to reduce the dynamic range to [0, pi], which is more in line with the need to extract the target frequency.
[0046] It can be understood that after the first phase spectrum is phase compensated according to the first compensation function to obtain the second phase spectrum, the area in the second phase spectrum corresponding to the sub-band area with stronger amplitude of the amplitude spectrum exhibits good flatness characteristics, that is, the first phase compensation function has a good feature extraction effect.
[0047] The embodiment of the present application provides a signal processing method, after obtaining a phase spectrum of at least one frame of signal, phase compensation is performed on the phase spectrum according to a phase compensation function to obtain another phase spectrum, and since the other phase spectrum is the phase characteristic spectrum of the at least one frame of signal at the target frequency, the signal of the target frequency can be accurately determined from the other phase spectrum. In this way, when in a medium or low signal-to-noise ratio environment, the signal of the target frequency can be distinguished by the signal processing method provided by the present application.
[0048] Optionally, before obtaining the second phase spectrum in S102, the signal processing method provided in the embodiment of the present application may further include S103. Accordingly, obtaining the second phase spectrum in S102 may be specifically implemented by S102A.
[0049] S103: The signal processing device obtains M second phase compensation functions.
[0050] Optionally, the above S103 can be specifically implemented by the following S103A and S103B.
[0051] S103A: The signal processing device determines a first estimated frequency based on the amplitude spectrogram of the M frames of signal.
[0052] The first estimated frequency is the frequency corresponding to the maximum amplitude value in the amplitude spectrum.
[0053] For example, Figure 3 As shown, Figure 3 (a) in FIG. 5 is an amplitude spectrum of three frames of signals. The frequency corresponding to the maximum amplitude in the amplitude spectrum is 100, that is, the first estimated frequency is 100.
[0054] S103B: The signal processing device determines M second phase compensation functions according to the first estimated frequency and the frame sequence numbers of the M frames of signal.
[0055] Optionally, the propagation time lengths corresponding to the frame numbers of the M frames of signal are calculated respectively, and combined with the first estimated frequency, to obtain M second phase compensation functions.
[0056] It can be understood that, since each frame signal in the M frame signals corresponds to a frame sequence number, M different second compensation functions are obtained.
[0057] The signal processing method provided in the embodiment of the present application determines a first estimated frequency based on the amplitude spectrum of M frame signals, and determines M second phase compensation functions according to the first estimated frequency and the frame sequence number of the M frame signals, thereby facilitating inter-frame phase difference compensation for the M frame signals through the M second phase compensation functions to achieve the purpose of further feature extraction.
[0058] S102A: The signal processing device performs inter-frame phase difference compensation on the third phase spectrum according to M second phase compensation functions to obtain a second phase spectrum.
[0059] Wherein, a second phase compensation function performs phase compensation on a frame signal corresponding to the second phase compensation function. The third phase spectrum is obtained by performing phase compensation according to the first phase compensation function.
[0060] Optionally, a frame signal corresponding to the second phase compensation function may be a signal after phase compensation using the first phase compensation function, or a signal not phase compensated using the first phase compensation function. The specific determination depends on actual conditions, and the present application embodiment does not limit this.
[0061] It should be noted that the above method is to first unwrap the first phase spectrum with warping, and then perform inter-frame phase difference compensation on the phase spectrum obtained after unwrap to obtain the second phase spectrum.
[0062] Optionally, the above S102A is exemplified by taking the example of performing phase compensation on the first phase spectrum according to the first phase compensation function to obtain a third phase spectrum; and performing inter-frame phase difference compensation on the third phase spectrum according to M second phase compensation functions to obtain a second phase spectrum.
[0063] Furthermore, when it is necessary to perform phase compensation on the first phase spectrum according to the first phase compensation function and M second phase compensation functions at the same time, it is also possible to first perform inter-frame phase difference compensation on the first phase spectrum according to the M second phase compensation functions to obtain a phase spectrum; and then perform phase compensation on the phase spectrum according to the first phase compensation function to obtain a second phase spectrum.
[0064] It should be noted that the above method is to perform inter-frame phase difference compensation on the first phase spectrum, and then unwrap the phase spectrum obtained after the inter-frame phase difference compensation to obtain the second phase spectrum. It can be understood that the above method can effectively save the amount of calculation.
[0065] Exemplarily, the signal processing device may first calculate the difference between the first phase spectrum and the second phase compensation function, to obtain a phase spectrum, wherein the phase of the phase spectrum is the phase after a phase compensation is performed on the initial phase with wrapping; then, the difference between the phase spectrum and the first phase compensation function is calculated to obtain another phase spectrum, wherein the phase of the other phase spectrum is the phase after a secondary phase compensation is performed on the phase with wrapping; then, the phase of the other phase spectrum is modulo 2π, and then divided by 2 to obtain the phase after modulo π; finally, the sine and arcsine of the phase after modulo π are first taken to obtain a new phase, i.e., the second phase spectrum is obtained.
[0066] For example, take M=3 as an example. Figure 2 ,like Figure 3 As shown, Figure 3 There are three sub-graphs (a) to (c). Figure 3 (a) in the figure is the amplitude spectrum of three adjacent frames. Figure 3 (c) is the second phase compensation function. Figure 3 (b) (i.e. Figure 2 (c) in FIG. 1 is a phase curve after inter-frame phase difference compensation, i.e., the second phase spectrum.
[0067] Further, based on the above Figure 3 An example is analyzed, and the area corresponding to the sub-band area with stronger amplitude in the amplitude spectrum in the second phase spectrum shows good inter-frame consistency, that is, the second phase compensation function has a good feature extraction effect.
[0068] In an embodiment of the present application, after the first phase spectrum is phase compensated according to the first compensation function, the third phase spectrum is compensated for the inter-frame phase difference according to M second phase compensation functions to obtain a second phase spectrum. Since the area in the second phase spectrum corresponding to the sub-band area with stronger amplitude of the amplitude spectrum shows good inter-frame consistency, that is, the second phase compensation function has a good feature extraction effect.
[0069] Optionally, before obtaining the second phase spectrum in S102A, the signal processing method provided in the embodiment of the present application may further include the following S104. Accordingly, obtaining the second phase spectrum in S102A may be specifically implemented by the following S102A1.
[0070] S104. The signal processing device obtains M first phase values corresponding to each frequency point in the fourth phase spectrum.
[0071] The fourth phase spectrum is obtained after compensating the inter-frame phase difference according to the M second phase compensation functions. A first phase value is determined by calculating the standard deviation of P phase values, where the P phase values are the phase values corresponding to a P frame signal at a frequency point, and the P frame signal is a signal frame adjacent to each frame signal in the M frame signal.
[0072] It should be noted that each of the M first phase values corresponds to a frame signal among the M frame signals.
[0073] S102A1. The signal processing device obtains a second phase spectrum according to the M first phase values and the frequency points in the fourth phase spectrum.
[0074] Optionally, the above S102A1 specifically includes: using the M first phase values as phase values corresponding to frequency points in the fourth phase spectrum to obtain a second phase spectrum.
[0075] It can be understood that the fourth phase spectrum includes a plurality of continuous frequency points, each of which corresponds to M first phase values, that is, the phase value of each frame signal at each frequency point is a first phase value, thereby obtaining the second phase spectrum.
[0076] For example, take M=3 as an example. Figure 3 ,like Figure 4 As shown, Figure 4 There are three sub-graphs (a) to (c). Figure 4 (a) in the figure is the amplitude spectrum of three adjacent frames. Figure 4 (c) is for Figure 4 (b) (i.e. Figure 3 The phase curve obtained after executing the above S104 and S102A1 in (c) is the second phase spectrum.
[0077] In the embodiment of the present application, M first phase values corresponding to each frequency point in the second phase spectrum can be obtained, and the second phase spectrum can be obtained according to the M first phase values and the frequency points in the fourth phase spectrum, so that the phase value of the region corresponding to the sub-band region with a strong amplitude in the amplitude spectrum in the second phase spectrum is obviously low and tends to zero. That is, feature extraction can be further performed through standard deviation calculation.
[0078] Optionally, before obtaining the second phase spectrum in S102A1, the signal processing method provided in the embodiment of the present application may further include the following S105. Accordingly, obtaining the second phase spectrum in S102A1 may be specifically implemented by the following S102a.
[0079] S105. The signal processing device obtains M second phase values corresponding to each frequency point in the fifth phase spectrum.
[0080] The fifth phase spectrum is obtained based on the M first phase values and the frequency points in the fourth phase spectrum. A second phase value is determined by calculating the average value of the phase values of K adjacent frequency points, where the K adjacent frequency points are frequency points adjacent to a frequency point, and K is an integer greater than 1.
[0081] It should be noted that each of the M second phase values corresponds to a frame signal among the M frame signals.
[0082] S102a: The signal processing device obtains a second phase spectrum according to the M second phase values and the frequency points in the fifth phase spectrum.
[0083] Optionally, the above S102a specifically includes: using the M second phase values as phase values corresponding to the frequency points in the fifth phase spectrum to obtain a second phase spectrum.
[0084] It can be understood that the fifth phase spectrum includes a plurality of continuous frequency points, each of which corresponds to M second phase values, that is, the phase value of each frame signal at each frequency point is a second phase value, thereby obtaining the second phase spectrum.
[0085] For example, take M=3 as an example. Figure 4,like Figure 5 As shown, Figure 5 There are three sub-graphs (a) to (c). Figure 5 (a) in the figure is the amplitude spectrum of three adjacent frames. Figure 5 (c) is for Figure 5 (b) (i.e. Figure 4 The phase curve obtained after executing the above S105 and S102a in (c) is the second phase spectrum.
[0086] In the embodiment of the present application, M second phase values corresponding to each frequency point in the fifth phase spectrum can be obtained, and the second phase spectrum can be obtained according to the M second phase values and the frequency points in the fifth phase spectrum, so that the second spectrum phase map can further highlight the region corresponding to the sub-band region with a stronger amplitude in the amplitude spectrum. It has better single-frame stability and discrimination. That is, through average value calculation, feature extraction can be further performed.
[0087] Optionally, after the above S102, the signal processing method provided in the embodiment of the present application may further include the following S106.
[0088] S106: The signal processing device performs sharpening processing on the second phase spectrum to obtain a target time-frequency diagram.
[0089] The target time-frequency diagram is a time-frequency distribution diagram of the M-frame signal at the target frequency.
[0090] Optionally, the above S106 specifically includes: sharpening the phase spectrum information of the second phase spectrum graph by using a decibel scale to obtain a target time-frequency graph.
[0091] Specifically, the sharpening process of the second phase spectrum in the above S106 specifically includes: first taking the logarithm of the phase value of the second phase spectrum, and then taking the inverse thereof.
[0092] For example, Figure 6 As shown, the signal-to-noise ratio is -7dB, the sampling frequency fs is 16 kHz, lenFrame is 512, lenFft is 2048, and width4fnStd is 6. Figure 6 (a) is the amplitude spectrum, and the dotted box 01 in the amplitude spectrum is the target frequency; Figure 6 (b) is the target phase spectrum;
[0093] Figure 6(c) in the figure is the target time-frequency diagram after the target phase spectrum is sharpened, and the dotted box 02 in the target time-frequency diagram is the target frequency. It can be seen that since the target time-frequency diagram reflects the distribution of multiple frame signals at a target frequency of 100, a single frame signal with a target frequency of 100 can be determined based on the target time-frequency diagram. In this way, compared with the amplitude spectrum diagram, the target time-frequency diagram further highlights the distribution of the target frequency.
[0094] For example, Figure 7 As shown, the signal-to-noise ratio is -15dB, the sampling frequency fs is 16 kHz, lenFrame is 512, lenFft is 2048, and width4fnStd is 6. Figure 7 (a) is the amplitude spectrum, and the dotted box 03 in the amplitude spectrum is the target frequency; Figure 7 (b) is the target phase spectrum. Figure 7 (c) in FIG. 1 is the target time-frequency diagram after the target phase spectrum is sharpened, and the dotted box 04 in the target time-frequency diagram is the target frequency. It can be seen that since the target time-frequency diagram reflects the distribution of multiple frame signals at a target frequency of 100, a single frame signal with a target frequency of 100 can be determined based on the target time-frequency diagram. In this way, compared with the amplitude spectrum diagram, the target time-frequency diagram further highlights the distribution of the target frequency.
[0095] For example, Figure 8 As shown, the signal-to-noise ratio is -18 dB, the sampling frequency fs is 16 kHz, lenFrame is 512, lenFft is 2048, and width4fnStd is 6. Figure 8 (a) is the amplitude spectrum, and the dotted box 05 in the amplitude spectrum is the target frequency; Figure 8 (b) is the target phase spectrum. Figure 8 (c) in the figure is the target time-frequency diagram after the target phase spectrum is sharpened, and the dotted box 06 in the target time-frequency diagram is the target frequency. It can be seen that since the target time-frequency diagram reflects the distribution of multiple frame signals at a target frequency of 100, a single frame signal with a target frequency of 100 can be determined based on the target time-frequency diagram. In this way, compared with the amplitude spectrum diagram, the target time-frequency diagram further highlights the distribution of the target frequency.
[0096] The signal processing method provided in the embodiment of the present application can sharpen the second phase spectrum to obtain a target time-frequency diagram. Since the target time-frequency diagram is a time-frequency distribution diagram of the M frame signal at the target frequency, the target time-frequency diagram can further highlight the target frequency, so that the signal of the target frequency can be determined based on the target time-frequency diagram to distinguish noise, thereby achieving higher noise resistance.
[0097] The signal processing method provided in the embodiment of the present application can be executed by a signal processing device. In the embodiment of the present application, a method for a signal processing device to execute signal processing is taken as an example to illustrate the signal processing device provided in the embodiment of the present application.
[0098] like Fig. 9 As shown, an embodiment of the present application provides a signal processing device 200, which may include an acquisition module 201 and a processing module 202. The acquisition module 201 may be used to acquire a first phase spectrum of an M-frame signal, where M is a positive integer. The processing module 202 may be used to perform phase compensation on the first phase spectrum acquired by the acquisition module 201 according to a first phase compensation function to obtain a second phase spectrum, which is a phase characteristic spectrum of the M-frame signal at a target frequency.
[0099] Optionally, the processing module may also be used to extract the slope of the window function to obtain a first phase compensation function.
[0100] Optionally, the acquisition module can also be used to acquire M second phase compensation functions. The processing module can be specifically used to perform inter-frame phase difference compensation on the third phase spectrum according to the M second phase compensation functions to obtain a second phase spectrum, where one second phase compensation function performs phase compensation on a frame signal corresponding to one second phase compensation function; wherein the third phase spectrum is obtained by performing phase compensation according to the first phase compensation function.
[0101] Optionally, the acquisition module can be specifically used to determine a first estimated frequency based on the amplitude spectrum of the M frame signal, where the first estimated frequency is the frequency corresponding to the maximum amplitude in the amplitude spectrum; and determine M second phase compensation functions based on the first estimated frequency and the frame number of the M frame signal.
[0102] Optionally, the acquisition module can also be used to obtain M first phase values corresponding to each frequency point in the fourth phase spectrum, where the first phase value is determined by calculating the standard deviation of P phase values, where the P phase values are phase values corresponding to a P frame signal at a frequency point, and the P frame signal is a signal frame adjacent to each frame signal in the M frame signal. The processing module can be specifically used to obtain a second phase spectrum according to the M first phase values and the frequency points in the fourth phase spectrum; wherein the fourth phase spectrum is obtained after compensating for the inter-frame phase difference according to the M second phase compensation functions.
[0103] Optionally, the acquisition module can also be used to obtain M second phase values corresponding to each frequency point in the fifth phase spectrum, where the second phase value is determined by averaging the phase values of K adjacent frequency points, where the K adjacent frequency points are frequency points adjacent to a frequency point, and K is an integer greater than 1. The processing module can be specifically used to obtain a second phase spectrum according to the M second phase values and the frequency points in the fifth phase spectrum; wherein the fifth phase spectrum is obtained according to the M first phase values and the frequency points in the fourth phase spectrum.
[0104] Optionally, the processing module may also be used to perform sharpening processing on the second phase spectrum to obtain a target time-frequency diagram, which is a time-frequency distribution diagram of the M frame signal at a target frequency.
[0105] The embodiment of the present application provides a signal processing device, after obtaining a phase spectrum of at least one frame of signal, phase compensation is performed on the phase spectrum according to a phase compensation function to obtain another phase spectrum, and since the other phase spectrum is the phase characteristic spectrum of the at least one frame of signal at the target frequency, the signal of the target frequency can be accurately determined from the other phase spectrum. In this way, when in a medium or low signal-to-noise ratio environment, the signal of the target frequency can be distinguished by the signal processing method provided by the present application.
[0106] The signal processing device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0107] The signal processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0108] The signal processing device provided in the embodiment of the present application can achieve Figures 1 to 8 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0109] Alternatively, if Fig.10 As shown, an embodiment of the present application also provides an electronic device 300, including a processor 301 and a memory 302, wherein the memory 302 stores programs or instructions that can be executed on the processor 301, and when the program or instructions are executed by the processor 301, the various steps of the above-mentioned signal processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0110] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0111] Fig.11 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0112] The electronic device 400 includes but is not limited to components such as a radio frequency unit 401 , a network module 402 , an audio output unit 403 , an input unit 404 , a sensor 405 , a display unit 406 , a user input unit 407 , an interface unit 408 , a memory 409 , and a processor 410 .
[0113] Those skilled in the art will appreciate that the electronic device 400 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 410 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.11 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0114] Among them, the processor 410 is used to obtain a first phase spectrum of the M frame signal, where M is a positive integer; and is used to perform phase compensation on the first phase spectrum according to a first phase compensation function to obtain a second phase spectrum, which is a phase characteristic spectrum of the M frame signal at the target frequency.
[0115] Optionally, the processor 410 is further configured to extract a slope of the window function to obtain a first phase compensation function.
[0116] Optionally, the acquisition module is further used to acquire M second phase compensation functions. The processor 410 can be specifically used to perform inter-frame phase difference compensation on the third phase spectrum according to the M second phase compensation functions to obtain a second phase spectrum, and one second phase compensation function performs phase compensation on a frame signal corresponding to one second phase compensation function; wherein the third phase spectrum is obtained by performing phase compensation according to the first phase compensation function.
[0117] Optionally, the processor 410 is used to determine a first estimated frequency based on the amplitude spectrum of the M frame signal, where the first estimated frequency is the frequency corresponding to the maximum amplitude in the amplitude spectrum; and determine M second phase compensation functions based on the first estimated frequency and the frame number of the M frame signal.
[0118] Optionally, the processor 410 is used for M first phase values corresponding to each frequency point in the fourth phase spectrum, the first phase value is determined by calculating the standard deviation of P phase values, the P phase values are phase values corresponding to a P frame signal at a frequency point, and the P frame signal is a signal frame adjacent to each frame signal in the M frame signal; and is used to obtain a second phase spectrum based on the M first phase values and the frequency points in the fourth phase spectrum; wherein the fourth phase spectrum is obtained after compensating for the inter-frame phase difference based on M second phase compensation functions.
[0119] Optionally, the processor 410 is used to obtain M second phase values corresponding to each frequency point in the fifth phase spectrum, where the second phase value is determined by averaging the phase values of K adjacent frequency points, where the K adjacent frequency points are frequency points adjacent to a frequency point, and K is an integer greater than 1; and is used to obtain a second phase spectrum based on the M second phase values and the frequency points in the fifth phase spectrum; wherein the fifth phase spectrum is obtained based on the M first phase values and the frequency points in the fourth phase spectrum.
[0120] Optionally, the processor 410 is used to perform sharpening processing on the second phase spectrum to obtain a target time-frequency diagram, where the target time-frequency diagram is a time-frequency distribution diagram of the M frame signal at a target frequency.
[0121] The embodiment of the present application provides an electronic device, after obtaining a phase spectrum of at least one frame signal, phase compensation is performed on the phase spectrum according to a phase compensation function to obtain another phase spectrum, and since the other phase spectrum is a phase characteristic spectrum of the at least one frame signal at a target frequency, the signal of the target frequency can be accurately determined from the other phase spectrum. In this way, when in a medium or low signal-to-noise ratio environment, the signal of the target frequency can be distinguished by the signal processing method provided by the present application.
[0122] It should be understood that in the embodiment of the present application, the input unit 404 may include a graphics processing unit (GPU) 4041 and a microphone 4042, and the graphics processor 4041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 406 may include a display panel 4061, and the display panel 4061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 407 includes a touch panel 4071 and at least one of other input devices 4072. The touch panel 4071 is also called a touch screen. The touch panel 4071 may include two parts: a touch detection device and a touch controller. Other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0123] The memory 409 can be used to store software programs and various data. The memory 409 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 409 may include a volatile memory or a non-volatile memory, or the memory 409 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 109 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0124] The processor 410 may include one or more processing units; optionally, the processor 410 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 410.
[0125] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned signal processing method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0126] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0127] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned xxx method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0128] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0129] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned signal processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0130] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0131] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0132] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A signal processing method, characterized in that: The method comprises: Obtain the first phase spectrum of M frame signals, where M is a positive integer; According to a first phase compensation function, phase compensation is performed on the first phase spectrum to obtain a second phase spectrum, wherein the first phase compensation function is obtained by extracting the slope of a window function, and the second phase spectrum is a phase characteristic spectrum of the M frame signal at a target frequency; Before obtaining the second phase spectrum, the method further includes: Acquire M second phase compensation functions, where the M second phase compensation functions are determined according to the first estimated frequency and the frame sequence numbers of the M frame signals; The obtaining of the second phase spectrum comprises: According to the M second phase compensation functions, inter-frame phase difference compensation is performed on the third phase spectrum to obtain the second phase spectrum, and a second phase compensation function is used to perform phase compensation on a frame of signal corresponding to the second phase compensation function; The third phase spectrum is obtained by performing phase compensation according to the first phase compensation function.
2. The method according to claim 1, characterized in that Before acquiring the M second phase compensation functions, the method further includes: Based on the amplitude spectrum of the M frames of signal, the first estimated frequency is determined, where the first estimated frequency is a frequency corresponding to the maximum amplitude in the amplitude spectrum.
3. The method according to claim 1, characterized in that Before obtaining the second phase spectrum, the method further includes: Obtaining M first phase values corresponding to each frequency point in the fourth phase spectrum, where the first phase value is determined by calculating the standard deviation of P phase values, where the P phase values correspond to a phase value of a P frame signal at one frequency point, and the P frame signal is a signal frame adjacent to each frame signal in the M frame signals; The obtaining of the second phase spectrum comprises: Obtaining the second phase spectrum according to the M first phase values and the frequency points in the fourth phase spectrum; The fourth phase spectrum is obtained after inter-frame phase difference compensation is performed according to the M second phase compensation functions.
4. The method according to claim 3, characterized in that Before obtaining the second phase spectrum, the method further includes: Obtaining M second phase values corresponding to each frequency point in the fifth phase spectrum, where the second phase value is determined by averaging phase values of K adjacent frequency points, where the K adjacent frequency points are frequency points adjacent to a frequency point, and K is an integer greater than 1; The obtaining of the second phase spectrum comprises: Obtaining the second phase spectrum according to the M second phase values and the frequency points in the fifth phase spectrum; The fifth phase spectrum is obtained according to the M first phase values and the frequency points in the fourth phase spectrum.
5. The method according to any one of claims 1 to 4, characterized in that After obtaining the second phase spectrum, the method further includes: The second phase spectrum is sharpened to obtain a target time-frequency diagram, where the target time-frequency diagram is a time-frequency distribution diagram of the M frame signals at the target frequency.
6. A signal processing device, characterized in that: The signal processing device comprises an acquisition module and a processing module; The acquisition module is used to acquire a first phase spectrum of M frames of signals, where M is a positive integer; The processing module is used to perform phase compensation on the first phase spectrum acquired by the acquisition module according to a first phase compensation function to obtain a second phase spectrum, wherein the first phase compensation function is obtained by extracting the slope of the window function, and the second phase spectrum is a phase characteristic spectrum of the M frame signal at a target frequency; The acquisition module is further used to acquire M second phase compensation functions, where the M second phase compensation functions are determined according to the first estimated frequency and the frame sequence numbers of the M frame signals; The processing module is specifically used to perform inter-frame phase difference compensation on the third phase spectrum according to the M second phase compensation functions to obtain the second phase spectrum, and a second phase compensation function performs phase compensation on a frame signal corresponding to the second phase compensation function; The third phase spectrum is obtained by performing phase compensation according to the first phase compensation function.
7. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the signal processing method according to any one of claims 1 to 5 are implemented.
8. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the signal processing method according to any one of claims 1 to 5 are implemented.