CN111200777B - Signal processing method and device, electronic equipment and storage medium - Google Patents
Signal processing method and device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN111200777B CN111200777B CN202010108580.1A CN202010108580A CN111200777B CN 111200777 B CN111200777 B CN 111200777B CN 202010108580 A CN202010108580 A CN 202010108580A CN 111200777 B CN111200777 B CN 111200777B
- Authority
- CN
- China
- Prior art keywords
- signals
- channels
- difference value
- sum
- signal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R5/00—Stereophonic arrangements
- H04R5/04—Circuit arrangements, e.g. for selective connection of amplifier inputs/outputs to loudspeakers, for loudspeaker detection, or for adaptation of settings to personal preferences or hearing impairments
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04S—STEREOPHONIC SYSTEMS
- H04S1/00—Two-channel systems
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Acoustics & Sound (AREA)
- Signal Processing (AREA)
- Stereophonic System (AREA)
Abstract
The disclosure relates to a signal processing method and apparatus, an electronic device, and a storage medium. The signal processing method comprises the following steps: extracting signals of two channels of an input signal; judging whether the energy difference value of the signals of the two sound channels is smaller than a preset difference value and whether the phases are opposite; and if the energy difference value of the signals of the two sound channels is smaller than the preset difference value and the phases are opposite, generating a single-channel signal according to the signals of the two sound channels, and replacing the input signal with the single-channel signal. According to the embodiment of the disclosure, by judging whether the energy difference value of the signals of the two channels is smaller than the preset difference value and whether the phases are opposite, and when the energy difference value of the signals of the two channels is smaller than the preset difference value and the phases are opposite, generating the mono signal according to the signals of the two channels, and replacing the input signal with the mono signal, the problem that the sound playing device does not play sound due to installation or setting errors of audio hardware is solved.
Description
Technical Field
The present disclosure relates to the field of communications, and in particular, to a signal processing method and apparatus, an electronic device, and a storage medium.
Background
The audio signal is a regular sound wave frequency and amplitude variation information carrier with voice, music and sound effects. Currently, audio signals can be transmitted in two ways: a balanced transmission mode and an unbalanced transmission mode. In the balanced transmission mode, two channels transmit inverted signals, and then the inverted signals are subtracted to obtain a final signal. In the unbalanced transmission mode, two channels transmit stereo signals.
However, in the case of an error in the installation or setting of audio hardware, the monaural signal output by the balanced transmission method is input as an unbalanced stereo signal, so that the two channels of the obtained stereo signal are completely opposite, and if such a signal is played on a monaural device, the two channels of the obtained stereo signal will cancel out each other to generate no sound.
Disclosure of Invention
The present disclosure provides a signal processing method and apparatus, an electronic device, and a storage medium, to at least solve a problem in the related art that a sound playing device does not play sound due to an error in audio hardware installation or setting. The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a signal processing method, including:
extracting signals of two channels of an input signal;
judging whether the energy difference value of the signals of the two sound channels is smaller than a preset difference value and whether the phases are opposite;
and if the energy difference value of the signals of the two sound channels is smaller than the preset difference value and the phases are opposite, generating a single-channel signal according to the signals of the two sound channels, and replacing the input signal with the single-channel signal.
In one embodiment, the extracting signals of two channels of the input signal includes:
and respectively extracting the signals of the two sound channels according to different time points.
In an embodiment, the determining whether the energy difference between the signals of the two channels is smaller than a preset difference and the phases are opposite includes:
performing difference operation on the energy of the signals of the two sound channels at each time point to obtain at least one difference result;
summing the energy of the signals of the two sound channels at each time point to obtain at least one summation result;
calculating a first sum of at least one of the difference results and a second sum of at least one of the summation results;
comparing the ratio of the second sum to the first sum with a preset threshold;
if the ratio is smaller than the preset threshold, determining that the energy difference value of the signals of the two sound channels is smaller than the preset difference value and the phases are opposite;
and if the ratio is greater than or equal to the preset threshold, determining that the input signal is normal.
In an embodiment, the method further comprises:
if the first sum is zero, no processing of the input signal is required.
In an embodiment, the generating a mono signal from the signals of the two channels and replacing the input signal with the mono signal includes:
calculating the correlation value of the energy difference value of the signals of the two sound channels at each time point, and taking the correlation value of the energy difference value as a single-channel signal of the corresponding time point;
replacing signals of the two channels of the input signal at corresponding points in time with the mono signal.
According to a second aspect of the embodiments of the present disclosure, there is provided a signal processing apparatus including:
an extraction module configured to extract signals of two channels of an input signal;
a judging module configured to judge whether the energy difference of the signals of the two channels extracted by the extracting module is smaller than a preset difference and whether the phases are opposite;
and the processing module is configured to generate a single-channel signal according to the signals of the two channels and replace the input signal with the single-channel signal if the energy difference value of the signals of the two channels is determined to be smaller than the preset difference value and the phases are opposite according to the judgment result of the judging module.
In an embodiment, the extraction module is configured to:
and respectively extracting the signals of the two sound channels according to different time points.
In one embodiment, the determining module includes:
a first operation sub-module configured to perform a difference operation on the energy of the signals of the two channels at each time point to obtain at least one difference result;
a second operation sub-module configured to perform a summation operation on the energy of the signals of the two channels at each time point to obtain at least one summation result;
a third operation submodule configured to calculate a first sum of at least one of the difference results obtained by the first operation submodule and a second sum of at least one of the sum results obtained by the second operation submodule;
a comparison submodule configured to compare a ratio of the second sum to the first sum calculated by the third operation submodule with a preset threshold;
a first determining submodule configured to determine that an energy difference value of signals of the two channels is smaller than the preset difference value and phases of the signals are opposite if the comparison result of the comparing submodule is that the ratio is smaller than the preset threshold value;
a second determining submodule configured to determine that the input signal is normal if the comparison result of the comparing submodule is that the ratio is greater than or equal to the preset threshold.
In an embodiment, the determining module further includes:
a third determining submodule configured to not process the input signal if the first sum obtained by the third operation submodule is zero.
In one embodiment, the processing module comprises:
a calculation determination submodule configured to calculate a correlation value of an energy difference value of the signals of the two channels at each time point, and take the correlation value of the energy difference value as a mono signal at the corresponding time point;
a replacing sub-module configured to replace the signals of the two channels of the input signal at corresponding points in time using the mono signal determined by the calculation determining sub-module.
According to a third aspect of the embodiments of the present disclosure, there is provided an electronic apparatus including:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the above-mentioned signal processing method.
According to a fourth aspect of embodiments of the present disclosure, there is provided a storage medium having instructions that, when executed by a processor of an electronic device, enable the electronic device to perform the above-described signal processing method.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product, which, when run on an electronic device, causes the electronic device to perform the above-mentioned signal processing method.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
the method comprises the steps of judging whether the energy difference value of signals of two sound channels is smaller than a preset difference value or not and whether the phases are opposite or not, generating a single-channel signal according to the signals of the two sound channels when the energy difference value of the signals of the two sound channels is smaller than the preset difference value and the phases are opposite, and replacing an input signal with the single-channel signal, so that the problem that sound playing equipment does not play sound due to installation or setting errors of audio hardware is solved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 is a flowchart illustrating a signal processing method according to an exemplary embodiment of the present disclosure.
Fig. 2 is a schematic diagram illustrating a process of comparing the magnitude and phase of signals of two channels according to an exemplary embodiment of the disclosure.
Fig. 3 is a flow chart illustrating another method of signal processing according to an exemplary embodiment of the present disclosure.
Fig. 4 is a block diagram of a signal processing apparatus according to an exemplary embodiment of the present disclosure.
Fig. 5 is a block diagram illustrating another signal processing apparatus according to an exemplary embodiment of the present disclosure.
Fig. 6 is a block diagram illustrating another signal processing apparatus according to an exemplary embodiment of the present disclosure.
Fig. 7 is a block diagram of an electronic device shown in an exemplary embodiment of the present disclosure.
Fig. 8 is a block diagram illustrating an apparatus suitable for a signal processing method according to an exemplary embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating a signal processing method according to an exemplary embodiment of the disclosure, where the signal processing method may be used in an electronic device, as shown in fig. 1, and the signal processing method includes the following steps:
in step S101, signals of two channels of the input signal are extracted.
Wherein, the signals of two channels of the input signal can be extracted respectively according to different time points.
For example, the two channels are C1 and C2, respectively, and the signals of C1 and C2 are extracted at different time points as:
c1(0), C1(1), C1(2), C1(3), … …, C1(L) and C2(0), C2(1), C2(2), C2(3), … …, C2 (L).
Wherein, the energy value of the signals ranges from-1 to 1.
In step S102, it is determined whether the energy difference between the signals of the two channels is smaller than a preset difference and the phases are opposite.
In this embodiment, the purpose of determining the energy level and the phase of the two channel signals is to determine whether the energy levels of the two channel signals are close and the phases are opposite.
Wherein, the preset threshold value can be set according to the requirement.
As shown in fig. 2, the process of determining whether the energy difference between the signals of the two channels is smaller than a preset difference and the phases are opposite may include:
in step S1021, a difference operation is performed on the energy of the signals of the two channels at each time point to obtain at least one difference result.
For example, the energy of the signals of the two channels at each time point is: c1(0), C1(1), C1(2), C1(3), … …, C1(L), C2(0), C2(1), C2(2), C2(3), … …, and C2(L), and then difference operation is performed on the signals of the two channels at each time point, and the obtained difference result is:
X(0)=C1(0)-C2(0)、X(1)=C1(1)-C2(1)、X(2)=C1(2)-C2(2)、X(3)=C1(3)-C2(3)、……、X(L)=C1(L)-C2(L)。
in step S1022, the energy of the signals of the two channels at each time point is summed to obtain at least one summation result.
And performing summation operation on the energy of the signals of the two sound channels at each time point, wherein the obtained summation result is as follows:
Y(0)=C1(0)+C2(0)、Y(1)=C1(1)+C2(1)、Y(2)=C1(2)+C2(2)、Y(3)=C1(3)+C2(3)、……、Y(L)=C1(L)+C2(L)。
in step S1023, a first sum of at least one difference result and a second sum of at least one sum result are calculated.
Wherein, the first sum (X) is the sum of X (0), X (1), X (2), X (3), … …, X (L), and the second sum (Y) is the sum of Y (0), Y (1), Y (2), Y (3), … …, Y (L).
In this embodiment, if the second sum and the first sum are both equal to 0, it indicates that the current signal is muted and no processing is performed.
If the first sum is equal to 0 and the second sum is not equal to 0, it is indicated that the input signal is a stereo signal with two channels equal, and no processing is performed.
In step S1024, the ratio of the second sum to the first sum is compared with a preset threshold, if the ratio is smaller than the preset threshold, step S1025 is executed, and if the ratio is greater than or equal to the preset threshold, step S1026 is executed.
Wherein the predetermined threshold is an empirical value, typically a positive number less than 1.
In step S1025, it is determined that the energy difference between the signals of the two channels is smaller than a preset difference and opposite in phase.
In step S1026, the input signal is determined to be normal.
If the ratio of the second sum to the first sum is greater than or equal to a preset threshold, the input signal is a normal stereo signal with two equal channels, and no processing is required.
If the ratio of the second sum to the first sum is smaller than the preset threshold, it indicates that the energy of the two channel signals is similar in magnitude and opposite in phase, i.e. it indicates that the input signal is a signal with an input error, and needs to be corrected.
In step S103, if the energy difference between the signals of the two channels is smaller than the preset difference and the phases are opposite, a mono signal is generated according to the signals of the two channels, and the mono signal is used to replace the input signal.
In this embodiment, the input signal may be modified in the following manner: and calculating a correlation value of the energy difference value of the signals of the two channels at each time point, taking the correlation value of the energy difference value as a single-channel signal of the corresponding time point, and replacing the signals of the two channels of the input signal of the corresponding time point by the single-channel signal. Wherein the correlation value is 1/2.
For example, X (0)/2, X (1)/2, … …, X (L)/2 may be taken as the monaural signal at the corresponding time points, and C1(0) and C2(0) are replaced with X (0)/2, C1(1) and C2(1) are replaced with X (1)/2, … …, and C1(L) and C2(L) are replaced with X (L)/2.
In the above embodiment, by determining whether the energy difference between the signals of the two channels is smaller than the preset difference and whether the phases are opposite, and when the energy difference between the signals of the two channels is smaller than the preset difference and the phases are opposite, generating the mono signal according to the signals of the two channels, and replacing the input signal with the mono signal, the problem that the sound playing device does not play sound due to an error in the installation or setting of audio hardware is solved.
Fig. 3 is a flowchart illustrating another signal processing method according to an exemplary embodiment of the disclosure, and as shown in fig. 3, the signal processing method may include:
in step S301, signals of two channels of the input signal are extracted at different time points, respectively.
In step S302, the energy of the signals of the two channels at each time point is subjected to a difference operation to obtain at least one difference result.
In step S303, the energy of the signals of the two channels at each time point is summed to obtain at least one summation result.
In step S304, a first sum of the at least one difference result and a second sum of the at least one summation result are calculated.
In step S305, the ratio of the second sum to the first sum is compared with a preset threshold.
In step S306, if the ratio is smaller than the preset threshold, it is determined that the energy difference between the signals of the two channels is smaller than the preset difference and the phases are opposite, one half of the energy difference between the signals of the two channels at each time point is calculated, and one half of the energy difference is used as the mono signal at the corresponding time point.
In step S307, signals of two channels of the input signal at corresponding points in time are replaced with the monaural signal.
In the above embodiment, the signals of the two channels of the input signal are respectively extracted according to different time points, the multiple signals of the two channels are subjected to operation processing, and when it is determined that the energy difference value of the signals of the two channels is smaller than the preset difference value and the phases are opposite according to the operation result, a mono signal is generated, and the mono signal is used to replace the signals of the two channels at the corresponding time point, thereby avoiding the situation that the sound playing device does not play sound.
Fig. 4 is a block diagram of a signal processing apparatus according to an exemplary embodiment of the present disclosure. Referring to fig. 4, the apparatus includes:
the extraction module 41 is configured to extract signals of two channels of the input signal.
The judging module 42 is configured to judge whether the energy difference of the signals of the two channels extracted by the extracting module 41 is smaller than a preset difference and the phases are opposite.
The processing module 43 is configured to generate a mono signal according to the signals of the two channels and replace the input signal with the mono signal if it is determined that the energy difference of the signals of the two channels is smaller than the preset difference and the phases are opposite according to the determination result of the determining module 42.
The extracting module 41 may extract signals of two channels of the input signal according to different time points.
In the above embodiment, by determining whether the energy difference between the signals of the two channels is smaller than the preset difference and whether the phases are opposite, and when the energy difference between the signals of the two channels is smaller than the preset difference and the phases are opposite, generating the mono signal according to the signals of the two channels, and replacing the input signal with the mono signal, the problem that the sound playing device does not play sound due to an error in the installation or setting of audio hardware is solved.
Fig. 5 is a block diagram of another signal processing apparatus according to an exemplary embodiment of the disclosure, and as shown in fig. 5, on the basis of the embodiment shown in fig. 4, the determining module 42 may include:
the first operation sub-module 421 is configured to perform a difference operation on the energies of the signals of the two channels at each time point to obtain at least one difference result.
The second operation sub-module 422 is configured to perform a summation operation on the energies of the signals of the two channels at each time point, resulting in at least one summation result.
The third operation submodule 423 is configured to calculate a first sum of the at least one difference result obtained by the first operation submodule 421 and a second sum of the at least one sum result obtained by the second operation submodule 422.
The comparison submodule 424 is configured to compare the ratio of the second sum calculated by the third operation submodule 423 to the first sum with a preset threshold.
The first determining sub-module 425 is configured to determine that the energy difference of the signals of the two channels is smaller than a preset difference and the phases are opposite to each other if the comparison result of the comparing sub-module 424 is that the ratio is smaller than the preset threshold.
The second determining submodule 426 is configured to determine that the input signal is normal if the comparison result of the comparing submodule 424 is that the ratio is greater than or equal to the preset threshold.
Optionally, the determining module may further include:
the third determining submodule is configured such that no processing of the input signal is required if the first sum obtained by the third arithmetic submodule 423 is zero.
Fig. 6 is a block diagram of another signal processing apparatus according to an exemplary embodiment of the disclosure, and as shown in fig. 6, on the basis of the embodiment shown in fig. 5, the processing module 43 may include:
the calculation determination submodule 431 is configured to calculate a correlation value of an energy difference value of the signals of the two channels at each time point, and to regard the correlation value of the energy difference value as a mono signal of the corresponding time point.
The replacement submodule 432 is configured to replace the signals of the two channels of the input signal at the corresponding time point with the mono signal determined by the calculation determination submodule 431.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 7 is a block diagram of an electronic device shown in an exemplary embodiment of the present disclosure. As shown in fig. 7, the electronic device includes a processor 710, a memory 720 for storing instructions executable by the processor 710; wherein the processor is configured to execute the above instructions to implement the above signal processing method. In addition to the processor 710 and the memory 720 shown in fig. 7, the electronic device may further include other hardware according to the actual functions of signaling processing, which is not described in detail.
In an exemplary embodiment, a storage medium comprising instructions, such as the memory 720 comprising instructions, executable by the processor 710 to perform the signal processing method described above is also provided. Alternatively, the storage medium may be a non-transitory computer readable storage medium, for example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In an exemplary embodiment, there is also provided a computer program product which, when run on an electronic device, causes the electronic device to perform the above-described signal processing method.
Fig. 8 is a block diagram illustrating an apparatus suitable for a signal processing method according to an exemplary embodiment of the present disclosure, and as shown in fig. 8, an embodiment of the present disclosure provides an apparatus 800 suitable for a signal processing method, including: a Radio Frequency (RF) circuit 810, a power supply 820, a processor 830, a memory 840, an input unit 850, a display unit 860, a camera 870, a communication interface 880, and a Wireless Fidelity (Wi-Fi) module 890. Those skilled in the art will appreciate that the configuration of the apparatus shown in fig. 8 is not intended to be limiting and that embodiments of the present disclosure provide apparatus that may include more or less components than those shown, or that certain components may be combined, or that a different arrangement of components may be provided.
The various components of the apparatus 800 are described in detail below with reference to FIG. 8:
the RF circuitry 810 may be used for receiving and transmitting data during a communication or conversation. Specifically, the RF circuit 810 sends the downlink data of the base station to the processor 830 for processing; and in addition, sending the uplink data to be sent to the base station. In general, RF circuit 810 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
In addition, the RF circuit 810 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
Wi-Fi technology belongs to short distance wireless transmission technology, and the device 800 can be connected with an Access Point (AP) through a Wi-Fi module 890, so as to realize Access of a data network. The Wi-Fi module 890 may be used for receiving and transmitting data during communication.
Since the device 800 can implement a communication service to send information to other contacts in the embodiment of the present disclosure, the device 800 needs to have a data transmission function, that is, the device 800 needs to include a communication module inside. Although fig. 8 illustrates communication modules such as RF circuitry 810, Wi-Fi module 890, and communication interface 880, it will be appreciated that at least one of the above-described components, or other communication modules (e.g., bluetooth modules) for enabling communication, are present in device 800 for data transfer.
For example, when the device 800 is a cellular telephone, the device 800 may include RF circuitry 810 and may also include a Wi-Fi module 890; when device 800 is a computer, device 800 may include a communications interface 880 and may also include a Wi-Fi module 890; when the device 800 is a tablet computer, the device 800 may include a Wi-Fi module.
Alternatively, the memory 840 may mainly include a program storage area and a data storage area. The storage program area can store an operating system, various application programs (such as communication application), a face recognition module and the like; the storage data area may store data created according to the use of the device (such as various multimedia files like pictures, video files, etc., and face information templates), etc.
Further, the memory 840 may include high speed random access memory and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 850 may be used to receive numeric or character information input by a user and generate key signal inputs related to user settings and function control of the device 800.
Alternatively, the input unit 850 may include a touch panel 851 and other input devices 852.
The touch panel 851, also referred to as a touch screen, can collect touch operations of a user (such as operations of the user on the touch panel 851 or near the touch panel 851 by using any suitable object or accessory such as a finger or a stylus), and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 851 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 830, and can receive and execute commands sent by the processor 830. In addition, the touch panel 851 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave.
Alternatively, other input devices 852 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 860 may be used to display information input by a user or information provided to the user and various menus of the device 800. The display unit 860 is a display system of the device 800, and is used for presenting an interface and implementing human-computer interaction.
The display unit 860 may include a display panel 861. Alternatively, the Display panel 861 may be configured by a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
Further, the touch panel 851 may cover the display panel 861, and when the touch panel 851 detects a touch operation on or near the touch panel 851, the touch operation is transmitted to the processor 830 to determine the type of the touch event, and then the processor 830 provides a corresponding visual output on the display panel 861 according to the type of the touch event.
Although in FIG. 8, the touch panel 851 and the display panel 861 are shown as two separate components to implement the input and output functions of the device 800, in some embodiments, the touch panel 851 and the display panel 861 may be integrated to implement the input and output functions of the device 800.
The processor 830, which is the control center of the device 800, connects the respective components using various interfaces and lines, performs various functions of the device 800 and processes data by operating or executing software programs and/or modules stored in the memory 840 and calling data stored in the memory 840, thereby implementing various device-based services.
Optionally, processor 830 may include one or more processing units. Optionally, the processor 830 may integrate an application processor and a modem processor, wherein the application processor mainly handles operating systems, user interfaces, application programs, etc., and the modem processor mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 830.
A camera 870 for performing the functions of the device 800 to take pictures or video. The camera 870 may also be used to implement the scanning function of the apparatus 800 to scan a scanned object (two-dimensional code/barcode).
In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described signal processing methods.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (10)
1. A signal processing method, comprising:
extracting signals of two channels of an input signal;
judging whether the energy difference value of the signals of the two sound channels is smaller than a preset difference value and whether the phases are opposite;
if the energy difference value of the signals of the two sound channels is smaller than the preset difference value and the phases are opposite, calculating the correlation value of the energy difference value of the signals of the two sound channels at each time point, and taking the correlation value of the energy difference value as a single sound channel signal of the corresponding time point; replacing signals of the two channels of the input signal at corresponding points in time with the mono signal.
2. The signal processing method according to claim 1, wherein the extracting signals of two channels of the input signal comprises:
and respectively extracting the signals of the two sound channels according to different time points.
3. The signal processing method of claim 2, wherein the determining whether the energy difference between the signals of the two channels is smaller than a preset difference and the phases are opposite comprises:
performing difference operation on the energy of the signals of the two sound channels at each time point to obtain at least one difference result;
summing the energy of the signals of the two sound channels at each time point to obtain at least one summation result;
calculating a first sum of at least one of the difference results and a second sum of at least one of the summation results;
comparing the ratio of the second sum to the first sum with a preset threshold;
if the ratio is smaller than the preset threshold, determining that the energy difference value of the signals of the two sound channels is smaller than the preset difference value and the phases are opposite;
and if the ratio is greater than or equal to the preset threshold, determining that the input signal is normal.
4. The signal processing method of claim 3, further comprising:
if the first sum is zero, no processing of the input signal is required.
5. A signal processing apparatus, characterized by comprising:
an extraction module configured to extract signals of two channels of an input signal;
a judging module configured to judge whether the energy difference of the signals of the two channels extracted by the extracting module is smaller than a preset difference and whether the phases are opposite;
the processing module is configured to calculate a correlation value of the energy difference value of the signals of the two channels at each time point if it is determined that the energy difference value of the signals of the two channels is smaller than the preset difference value and the phases are opposite according to the judgment result of the judging module, and take the correlation value of the energy difference value as a single-channel signal of the corresponding time point; replacing signals of the two channels of the input signal at corresponding points in time with the mono signal.
6. The signal processing apparatus of claim 5, wherein the extraction module is configured to:
and respectively extracting the signals of the two sound channels according to different time points.
7. The signal processing apparatus of claim 6, wherein the determining module comprises:
a first operation sub-module configured to perform a difference operation on the energy of the signals of the two channels at each time point to obtain at least one difference result;
a second operation sub-module configured to perform a summation operation on the energy of the signals of the two channels at each time point to obtain at least one summation result;
a third operation submodule configured to calculate a first sum of at least one of the difference results obtained by the first operation submodule and a second sum of at least one of the sum results obtained by the second operation submodule;
a comparison submodule configured to compare a ratio of the second sum to the first sum calculated by the third operation submodule with a preset threshold;
a first determining submodule configured to determine that an energy difference value of signals of the two channels is smaller than the preset difference value and phases of the signals are opposite if the comparison result of the comparing submodule is that the ratio is smaller than the preset threshold value;
a second determining submodule configured to determine that the input signal is normal if the comparison result of the comparing submodule is that the ratio is greater than or equal to the preset threshold.
8. The signal processing apparatus of claim 7, wherein the determining module further comprises:
a third determining submodule configured to not process the input signal if the first sum obtained by the third operation submodule is zero.
9. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the signal processing method of any one of claims 1 to 4.
10. A storage medium, characterized in that instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the signal processing method of any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010108580.1A CN111200777B (en) | 2020-02-21 | 2020-02-21 | Signal processing method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010108580.1A CN111200777B (en) | 2020-02-21 | 2020-02-21 | Signal processing method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111200777A CN111200777A (en) | 2020-05-26 |
CN111200777B true CN111200777B (en) | 2021-07-20 |
Family
ID=70747435
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010108580.1A Active CN111200777B (en) | 2020-02-21 | 2020-02-21 | Signal processing method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111200777B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115529053B (en) * | 2021-06-24 | 2024-08-20 | 博泰车联网科技(上海)股份有限公司 | Audio signal adjusting method, device, control chip and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102113315A (en) * | 2008-07-29 | 2011-06-29 | Lg电子株式会社 | Method and apparatus for processing audio signal |
TW201715380A (en) * | 2015-10-23 | 2017-05-01 | 圓剛科技股份有限公司 | Electronic apparatus and sound signal adjustment method thereof |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8553892B2 (en) * | 2010-01-06 | 2013-10-08 | Apple Inc. | Processing a multi-channel signal for output to a mono speaker |
CN102264026B (en) * | 2010-05-25 | 2016-06-22 | 晨星软件研发(深圳)有限公司 | Message processes device and message processing method |
FR2966634A1 (en) * | 2010-10-22 | 2012-04-27 | France Telecom | ENHANCED STEREO PARAMETRIC ENCODING / DECODING FOR PHASE OPPOSITION CHANNELS |
US9530419B2 (en) * | 2011-05-04 | 2016-12-27 | Nokia Technologies Oy | Encoding of stereophonic signals |
CN110636415B (en) * | 2014-08-29 | 2021-07-23 | 杜比实验室特许公司 | Method, system, and storage medium for processing audio |
CN106303896A (en) * | 2016-09-30 | 2017-01-04 | 北京小米移动软件有限公司 | The method and apparatus playing audio frequency |
CN108616800B (en) * | 2018-03-28 | 2021-04-09 | 腾讯科技(深圳)有限公司 | Audio playing method and device, storage medium and electronic device |
CN110941415B (en) * | 2019-11-08 | 2023-11-28 | 北京达佳互联信息技术有限公司 | Audio file processing method and device, electronic equipment and storage medium |
CN111182441A (en) * | 2020-01-03 | 2020-05-19 | 天域全感音科技有限公司 | Multi-channel audio signal processing device and method |
-
2020
- 2020-02-21 CN CN202010108580.1A patent/CN111200777B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102113315A (en) * | 2008-07-29 | 2011-06-29 | Lg电子株式会社 | Method and apparatus for processing audio signal |
TW201715380A (en) * | 2015-10-23 | 2017-05-01 | 圓剛科技股份有限公司 | Electronic apparatus and sound signal adjustment method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN111200777A (en) | 2020-05-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN115357178B (en) | Control method applied to screen-throwing scene and related equipment | |
CN109921976B (en) | Group-based communication control method, device and storage medium | |
CN107393548B (en) | Method and device for processing voice information collected by multiple voice assistant devices | |
CN106528545B (en) | Voice information processing method and device | |
CN106599698B (en) | A kind of method and apparatus for encrypting picture, decrypting picture | |
CN106936827B (en) | A kind of broadcast recipients' queue regulation method, device and terminal | |
CN111200777B (en) | Signal processing method and device, electronic equipment and storage medium | |
CN110688051B (en) | Screen recording operation method and device, computer readable storage medium and terminal | |
CN110602707A (en) | Method and terminal for connecting wireless network | |
CN107910012B (en) | Audio data processing method, device and system | |
CN109086595B (en) | Service account switching method, system, device and server | |
CN106571878A (en) | RF fault detection method and device | |
CN111432304A (en) | Earphone control method, earphone control device, electronic equipment, earphone control system and storage medium | |
CN110754097B (en) | Call control method, device, terminal equipment and storage medium | |
CN113268210B (en) | Screen projection method, device and storage medium | |
CN110928463B (en) | Method, device and system for controlling remote equipment, service server and storage medium | |
CN104464244A (en) | Remote control method and remote control device for bluetooth loudspeaker box as well as remote control signal transmitting equipment for bluetooth loudspeaker box | |
CN110908586A (en) | Keyboard display method and device and terminal equipment | |
CN111447236B (en) | Block chain-based communication authentication method and device, terminal equipment and storage medium | |
CN115118636A (en) | Method and device for determining network jitter state, electronic equipment and storage medium | |
US12013983B2 (en) | Haptic feedback method, related device and computer readable storage medium | |
CN114006983A (en) | Video color ring interaction method, computer equipment and storage medium | |
CN103780477A (en) | Information pushing method and server | |
EP3518513A1 (en) | Streaming data acquisition method, device, and system | |
CN110119238B (en) | Method and equipment for adjusting position of intelligent terminal object |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |