Hot backup method of audio signal and audio equipment

文档序号:1143066 发布日期:2020-09-11 浏览:25次 中文

阅读说明:本技术 一种音频信号的热备份方法及音频设备 (Hot backup method of audio signal and audio equipment ) 是由 罗立辉 余又斌 于 2019-12-31 设计创作,主要内容包括:一种音频信号的热备份方法及音频设备,该方法包括:获取接入该音频设备的主音频信号和备份音频信号,其中,该音频设备默认对主音频信号进行处理并输出;按照该音频设备预设的时间间隔,记录主音频信号与备份音频信号的第一电平差值的绝对值;判断该第一电平差值的绝对值的变化趋势是否满足第一预设条件,若满足该第一预设条件,控制该音频设备切换至对上述备份音频信号进行处理并输出。实施本申请实施例,能够提升音频信号热备份的灵活性和可靠性。(A hot backup method of an audio signal and an audio device, the method comprising: acquiring a main audio signal and a backup audio signal which are accessed into the audio equipment, wherein the audio equipment processes and outputs the main audio signal by default; recording the absolute value of the first level difference value of the main audio signal and the backup audio signal according to the time interval preset by the audio equipment; and judging whether the variation trend of the absolute value of the first level difference value meets a first preset condition, and if so, controlling the audio equipment to switch to process and output the backup audio signal. By implementing the embodiment of the application, the flexibility and the reliability of the audio signal hot backup can be improved.)

1. A method for hot-backup of an audio signal, the method being applied to an audio device, comprising:

acquiring a main audio signal and a backup audio signal which are accessed to the audio equipment, wherein the audio equipment processes and outputs the main audio signal by default;

recording the absolute value of the first level difference value of the main audio signal and the backup audio signal according to a time interval preset by the audio equipment;

judging whether the variation trend of the absolute value of the first level difference value meets a first preset condition or not;

and if the first preset condition is met, controlling the audio equipment to switch to process and output the backup audio signal.

2. The hot backup method according to claim 1, wherein the determining whether the variation trend of the absolute value of the first level difference satisfies a first preset condition comprises:

judging whether the continuous times that the absolute value of the first level difference is greater than or equal to a preset reference threshold value exceed a first specified time N, and if so, judging that the variation trend of the absolute value of the first level difference meets a first preset condition;

or, judging whether the times that the absolute value of the first level difference is greater than or equal to a preset reference threshold value within a specified time exceeds a second specified time M, and if so, judging that the variation trend of the absolute value of the first level difference meets a first preset condition;

or, judging whether the ratio of the number of times that the absolute value of the first level difference is greater than or equal to a preset reference threshold value to the number of recording times exceeds a specified ratio within a specified time, and if so, judging that the variation trend of the absolute value of the first level difference meets a first preset condition.

3. The hot standby method as claimed in claim 2, wherein the preset reference threshold is preset according to a variation trend of the absolute value of the first level difference within a specified time.

4. A hot standby method according to any one of claims 1 to 3, wherein after controlling the audio device to switch to processing and outputting the backup audio signal, the method further comprises:

recording the absolute value of the second level difference value of the main audio signal and the backup audio signal according to a time interval preset by the audio equipment;

judging whether the variation trend of the absolute value of the second level difference value meets a second preset condition or not;

and if so, controlling the audio power equipment to switch to process and output the main audio signal.

5. A hot-standby method according to any of claims 1 to 4, wherein the main audio signal and the standby audio signal are digital audio signals or analog audio signals.

6. An audio device, comprising:

the audio equipment comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a main audio signal and a backup audio signal which are accessed into the audio equipment, and the audio equipment processes and outputs the main audio signal by default;

the first recording unit is used for recording the absolute value of the first level difference value of the main audio signal and the backup audio signal according to the time interval preset by the audio equipment;

a first judging unit configured to judge whether a variation tendency of the absolute value of the first level difference satisfies a first preset condition;

and the first control unit is used for controlling the audio equipment to switch to process and output the backup audio signal when the first judging unit judges that the variation trend of the absolute value of the first level difference value meets a first preset condition.

7. The audio device according to claim 6, wherein the manner in which the first judging unit judges whether the variation tendency of the absolute value of the first level difference satisfies a first preset condition is specifically:

judging whether the continuous times that the absolute value of the first level difference is greater than or equal to a preset reference threshold value exceed a first specified time N, and if so, judging that the variation trend of the absolute value of the first level difference meets a first preset condition;

or, judging whether the times that the absolute value of the first level difference is greater than or equal to a preset reference threshold value within a specified time exceeds a second specified time M, and if so, judging that the variation trend of the absolute value of the first level difference meets a first preset condition;

or, judging whether the ratio of the number of times that the absolute value of the first level difference is greater than or equal to a preset reference threshold value to the number of recording times exceeds a specified ratio within a specified time, and if so, judging that the variation trend of the absolute value of the first level difference meets a first preset condition.

8. The audio device according to claim 7, wherein the preset reference threshold is preset according to a variation tendency of an absolute value of the first level difference in a specified time.

9. The audio device of any of claims 6-8, further comprising:

the second recording unit is used for recording the absolute value of the second level difference value of the main audio signal and the backup audio signal according to the time interval preset by the audio equipment;

a second judging unit, configured to judge whether a variation trend of the absolute value of the second level difference satisfies a second preset condition;

and the second control unit is used for controlling the audio power equipment to switch to process and output the main audio signal when the second judging unit judges that the variation trend of the absolute value of the second level difference value meets a second preset condition.

10. The audio device of any of claims 6 to 9, wherein the main audio signal and the backup audio signal are digital audio signals or analog audio signals.

Technical Field

The present application relates to the technical field of audio devices, and in particular, to a hot backup method for audio signals and an audio device.

Background

Currently, in the occasion of important performance, in order to ensure that the performance is normally performed, most of sound source equipment simultaneously provides analog and digital audio signals, and the analog and digital audio signals are used as input signals to be accessed into the audio equipment for further processing and output; when one of the audio signals is in fault, the audio equipment can automatically switch to the other audio signal, so that interruption of the audio signal to cause interruption of the performance is avoided. However, in practice, it is found that a digital audio signal is usually selected as a default input signal of an audio device, and whether the digital audio signal has a fault is determined according to whether a clock signal carried by the digital audio signal is interrupted; in addition, in some occasions, the sound source equipment still provides a continuous clock signal when the digital audio signal of the sound source equipment has a fault, so that the fault of the digital audio signal cannot be correctly detected, and further the digital audio signal cannot be switched to the analog audio signal in time, and thus, flexible and reliable audio signal hot backup cannot be realized.

Disclosure of Invention

The embodiment of the application discloses a hot backup method of an audio signal and audio equipment, which can improve the flexibility and reliability of the hot backup of the audio signal.

The first aspect of the embodiment of the present application discloses a method for hot backup of an audio signal, where the method is applied to an audio device, and includes:

acquiring a main audio signal and a backup audio signal which are accessed to the audio equipment, wherein the audio equipment processes and outputs the main audio signal by default;

recording the absolute value of the first level difference value of the main audio signal and the backup audio signal according to a time interval preset by the audio equipment;

judging whether the variation trend of the absolute value of the first level difference value meets a first preset condition or not;

and if the first preset condition is met, controlling the audio equipment to switch to process and output the backup audio signal.

As an optional implementation manner, in the first aspect of the embodiment of the present application, the determining whether the variation trend of the absolute value of the first level difference satisfies a first preset condition includes:

judging whether the continuous times that the absolute value of the first level difference is greater than or equal to a preset reference threshold value exceed a first specified time N, and if so, judging that the variation trend of the absolute value of the first level difference meets a first preset condition;

or, judging whether the times that the absolute value of the first level difference is greater than or equal to a preset reference threshold value within a specified time exceeds a second specified time M, and if so, judging that the variation trend of the absolute value of the first level difference meets a first preset condition;

or, judging whether the ratio of the number of times that the absolute value of the first level difference is greater than or equal to a preset reference threshold value to the number of recording times exceeds a specified ratio within a specified time, and if so, judging that the variation trend of the absolute value of the first level difference meets a first preset condition.

As another optional implementation manner, in the first aspect of the embodiment of the present application, the preset reference threshold is preset according to a variation trend of the absolute value of the first level difference within a specified time.

As another optional implementation manner, in the first aspect of the embodiment of the present application, after controlling the audio device to switch to processing and outputting the backup audio signal, the method further includes:

recording the absolute value of the second level difference value of the main audio signal and the backup audio signal according to a time interval preset by the audio equipment;

judging whether the variation trend of the absolute value of the second level difference value meets a second preset condition or not;

and if so, controlling the audio power equipment to switch to process and output the main audio signal.

As another optional implementation manner, in the first aspect of the embodiment of the present application, the main audio signal and the backup audio signal are digital audio signals or analog audio signals.

A second aspect of an embodiment of the present application discloses an audio device, including:

the audio equipment comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a main audio signal and a backup audio signal which are accessed into the audio equipment, and the audio equipment processes and outputs the main audio signal by default;

the first recording unit is used for recording the absolute value of the first level difference value of the main audio signal and the backup audio signal according to the time interval preset by the audio equipment;

a first judging unit configured to judge whether a variation tendency of the absolute value of the first level difference satisfies a first preset condition;

and the first control unit is used for controlling the audio equipment to switch to process and output the backup audio signal when the first judging unit judges that the variation trend of the absolute value of the first level difference value meets a first preset condition.

As an optional implementation manner, in the second aspect of the embodiment of the present application, the manner that the first determining unit determines whether the variation trend of the absolute value of the first level difference satisfies the first preset condition is specifically:

judging whether the continuous times that the absolute value of the first level difference is greater than or equal to a preset reference threshold value exceed a first specified time N, and if so, judging that the variation trend of the absolute value of the first level difference meets a first preset condition;

or, judging whether the times that the absolute value of the first level difference is greater than or equal to a preset reference threshold value within a specified time exceeds a second specified time M, and if so, judging that the variation trend of the absolute value of the first level difference meets a first preset condition;

or, judging whether the ratio of the number of times that the absolute value of the first level difference is greater than or equal to a preset reference threshold value to the number of recording times exceeds a specified ratio within a specified time, and if so, judging that the variation trend of the absolute value of the first level difference meets a first preset condition.

As another optional implementation manner, in the second aspect of the embodiment of the present application, the preset reference threshold is preset according to a variation trend of the absolute value of the first level difference within a specified time.

As another optional implementation manner, in the second aspect of the embodiments of the present application, the audio device further includes:

the second recording unit is used for recording the absolute value of the second level difference value of the main audio signal and the backup audio signal according to the time interval preset by the audio equipment;

a second judging unit, configured to judge whether a variation trend of the absolute value of the second level difference satisfies a second preset condition;

and the second control unit is used for controlling the audio power equipment to switch to process and output the main audio signal when the second judging unit judges whether the variation trend of the absolute value of the second level difference value meets a second preset condition.

As another optional implementation manner, in the second aspect of the embodiments of the present application, the main audio signal and the backup audio signal are digital audio signals or analog audio signals.

A third aspect of the embodiments of the present application discloses another audio device, including:

a memory storing executable program code;

a processor coupled with the memory;

the processor calls the executable program code stored in the memory to execute all or part of the steps of any one of the audio signal hot backup methods disclosed in the first aspect of the embodiments of the present application.

A fourth aspect of the embodiments of the present application discloses a computer-readable storage medium storing a computer program, where the computer program enables a computer to execute all or part of the steps in any one of the audio signal hot backup methods disclosed in the first aspect of the embodiments of the present application.

A fifth aspect of the embodiments of the present application discloses a computer program product, which, when running on a computer, causes the computer to execute all or part of the steps in any one of the audio signal hot backup methods of the first aspect of the embodiments of the present application.

Compared with the prior art, the embodiment of the application has the following beneficial effects:

in the embodiment of the application, the hot backup method of the audio signal is applied to the audio equipment, and firstly, a main audio signal and a backup audio signal which are accessed into the audio equipment are obtained, wherein the audio equipment processes and outputs the main audio signal by default; recording the absolute value of the first level difference value of the main audio signal and the backup audio signal according to a preset time interval of the audio equipment; judging whether the variation trend of the absolute value of the first level difference value meets a first preset condition or not; and if so, switching to the audio equipment to process and output the backup audio signal. Therefore, by implementing the embodiment of the application, whether the main audio signal is interrupted or not can be judged according to the variation trend of the level difference value of the main audio signal and the backup audio signal, if the main audio signal is interrupted, the main audio signal is switched to the backup audio signal, and the effect of hot backup of the audio signal is achieved. In the process, the main audio signal and the backup audio signal can be flexibly selected to be digital audio signals or analog audio signals, and the judgment is carried out without depending on clock signals carried by the digital audio signals; in addition, the judgment is carried out according to the change trend of the level difference, the value can be taken for multiple times in a period of time, and the result of the value taken for multiple times is integrated to judge whether the main audio signal is interrupted, so that the reliability of the judgment result is ensured. Therefore, the embodiment of the application can improve the flexibility and reliability of the audio signal hot backup.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present application, those skilled in the art will understand that other drawings can be obtained according to the drawings required to be used in the embodiments without creative efforts.

Fig. 1 is a schematic flowchart of a hot backup method for audio signals according to an embodiment of the present application;

FIG. 2 is a flow chart illustrating another method for hot-backup of audio signals according to an embodiment of the present disclosure;

FIG. 3 is a block diagram of an audio device according to an embodiment of the present disclosure;

FIG. 4 is a modular schematic diagram of another audio device disclosed in embodiments of the present application;

FIG. 5 is a modular schematic diagram of yet another audio device disclosed in an embodiment of the present application;

FIG. 6 is a schematic diagram of an audio device for accessing an audio signal according to an embodiment of the disclosure;

fig. 7 is a schematic diagram of the level of the main audio signal and the backup audio signal before and after interruption of the main audio signal according to the embodiment of the present application.

Detailed Description

The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

It should be noted that the terms "comprises" and "comprising," and any variations thereof, in the embodiments of the present application, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.

The embodiment of the application discloses a hot backup method of an audio signal and audio equipment, which can improve the flexibility and reliability of the hot backup of the audio signal. The following detailed description is made with reference to the accompanying drawings.

Referring to fig. 1, fig. 1 is a flowchart illustrating a hot backup method for audio signals according to an embodiment of the present application, wherein the hot backup method is applied to an audio device. As shown in fig. 1, the hot backup method may include the steps of:

101. the audio equipment acquires a main audio signal and a backup audio signal which are accessed into the audio equipment, wherein the audio equipment processes and outputs the main audio signal by default.

In this embodiment of the present application, both the main audio signal and the backup audio signal may be digital audio signals or analog audio signals, and this embodiment of the present application is not particularly limited. Illustratively, the main audio signal and the backup audio signal may both be digital audio signals, may both be analog audio signals, and may be one of the digital audio signals and the other of the analog audio signals.

For example, if the main audio signal is an analog audio signal and the backup audio signal is a digital audio signal, as shown in fig. 6, after the audio device obtains the accessed main audio signal and backup audio signal, the main audio signal, i.e., the analog audio signal, may be processed and output by default. Specifically, the audio device may perform analog-to-digital conversion on the main audio signal, input the main audio signal to the DSP processing module, and output the main audio signal to the speaker unit for playing after being processed by the DSP processing module.

In this process, the audio device may perform the following steps 102 to 104 to determine whether the main audio signal is interrupted, and if the main audio signal is interrupted, the audio device may switch to process and output the backup audio signal.

102. The audio device records the absolute value of the first level difference between the main audio signal and the backup audio signal at a time interval preset by the audio device.

Illustratively, as shown in fig. 7, when the main audio signal and the backup audio signal are normal (i.e., no interruption occurs) before time t0, the level of the main audio signal and the level of the backup audio signal will change with time, but the level difference Δ d between the main audio signal and the backup audio signal will fluctuate around a certain fixed value and will not exhibit a significant change. On this basis, the audio device may record the level difference Δ d between the main audio signal and the backup audio signal as a first level difference according to a preset time interval T of the audio device, and obtain an absolute value | Δ d |. The absolute value of the first level difference is a discrete function in the time domain, that is, | Δ d | ═ f (t), t ═ nT, n ═ 0,1,2.

103. The audio device judges whether the variation trend of the absolute value of the first level difference value meets a first preset condition, if so, the step 104 is executed; otherwise, the flow is ended.

For example, the first preset condition may include: the continuous times that the absolute value of the first level difference is greater than or equal to the preset reference threshold value exceed a first designated time N; or the number of times that the absolute value of the first level difference value is greater than or equal to a preset reference threshold value within a specified time exceeds a second specified number of times M; or, the ratio of the number of times that the absolute value of the first level difference is greater than or equal to a preset reference threshold value to the number of times of recording within a specified time exceeds a specified ratio.

The preset reference threshold may be preset according to a variation trend of the absolute value of the first level difference within a predetermined time, that is, according to a variation trend of the absolute value | Δ d | of the level difference between the main audio signal and the backup audio signal within a predetermined time. For example, since the level difference Δ d between the main audio signal and the backup audio signal will fluctuate around a fixed value when the main audio signal and the backup audio signal are normal (i.e. no interruption occurs), the maximum threshold Δ dref of the absolute value | Δ d | of the level difference can be obtained within a specified time1And applying the maximum threshold Δ dref1As a preset reference threshold value set in advance. Optionally, the maximum threshold Δ dref can also be set1The value Δ dref obtained by floating up and down1And x is used as a preset reference threshold value which is preset.

Specifically, as shown in fig. 7, when the main audio signal is interrupted at time t0, the level thereof will gradually decrease. To confirm whether the main audio signal is interrupted at this time, it may be determined whether a variation tendency of the absolute value of the first level difference satisfies a first preset condition, for example, whether a consecutive number of times that the absolute value of the first level difference is greater than or equal to a preset reference threshold exceeds a first prescribed number of times N, that is, whether there is an absolute value | Δ d of consecutive N level differences recorded in time series1|=f(t1),|Δd2|=f(t2),...,|Δdn|=f(tn) Are all greater than or equal to the preset reference threshold (from | Δ d in fig. 7)3If | begins to satisfy the above condition, | Δ d should be judgedn+2|). When the above condition is satisfied, that is, it is determined that the variation trend of the absolute value of the first level difference satisfies the first preset condition, it may be determined that the main audio signal is interrupted at this time, and then the backup audio signal may be switched by performing the following step 104.

The above-mentioned determining whether the variation trend of the absolute value of the first level difference satisfies the first preset condition may be determining whether the number of times that the absolute value of the first level difference is greater than or equal to a preset reference threshold value within a specified time exceeds a second specified number M, that is, determining whether there are at least M absolute values | Δ d of the level differences in the level differences recorded within a specified length of time1|=f(t1),|Δd2|=f(t2),...,|Δdm|=f(tm) Are all larger than or equal to the preset reference threshold.

Similarly, the above-mentioned determining whether the variation trend of the absolute value of the first level difference satisfies the first preset condition may be determining whether the ratio of the number of times that the absolute value of the first level difference is greater than or equal to the preset reference threshold to the number of times of recording within a specified time exceeds a specified ratio, that is, determining whether the absolute value of | Δ d of the S level differences recorded within a time period of a specified length is greater than or equal to the preset reference threshold1|=f(t1),|Δd2|=f(t2),...,|Δds|=f(ts) Whether the ratio S/S of the number S of the cells exceeds a predetermined ratio.

104. And the audio equipment controls the audio equipment to switch to process and output the backup audio signal.

By implementing the method, the audio equipment can judge whether the main audio signal is interrupted or not according to the variation trend of the absolute value of the level difference value of the main audio signal and the backup audio signal, and if the main audio signal is interrupted, the main audio signal is switched to the backup audio signal, so that the effect of hot backup of the audio signal is achieved. In the process, the main audio signal and the backup audio signal can be flexibly selected to be digital audio signals or analog audio signals, and whether a clock signal carried by the main audio signal is interrupted or not is not depended on when the digital audio signal is used as the main audio signal is used as a basis for judging whether the main audio signal is interrupted or not; in addition, the judgment is carried out according to the variation trend of the absolute value of the level difference, the value can be taken for multiple times within a period of time, and the result of the value taken for multiple times is integrated to judge whether the main audio signal is interrupted, so that the reliability of the judgment result is ensured.

It can be seen that the hot backup method described in fig. 1 can improve the flexibility and reliability of the audio signal hot backup.

Referring to fig. 2, fig. 2 is a flowchart illustrating another hot backup method for audio signals according to an embodiment of the present application, wherein the hot backup method is applied to an audio device. As shown in fig. 2, the hot backup method may include the steps of:

201. the audio equipment acquires a main audio signal and a backup audio signal which are accessed into the audio equipment, wherein the audio equipment processes and outputs the main audio signal by default.

202. The audio device records the absolute value of the first level difference between the main audio signal and the backup audio signal at a time interval preset by the audio device.

203. The audio device judges whether the continuous times of the absolute value of the first level difference value being greater than or equal to a preset reference threshold value exceed a first designated time N, if so, the steps 204 to 206 are executed; otherwise, the flow is ended.

As an optional implementation manner, the audio device may further determine whether the number of times that the absolute value of the first level difference is greater than or equal to the preset reference threshold within the specified time exceeds a second specified number M, and if so, may perform the following steps 204 to 206; otherwise, the flow is ended.

As another optional implementation, the audio device may further determine whether a ratio of the number of times that the absolute value of the first level difference is greater than or equal to a preset reference threshold value to the number of recording times within a specified time exceeds a specified ratio, and if so, may perform the following steps 204 to 206; otherwise, the flow is ended.

204. And the audio equipment controls the audio equipment to switch to process and output the backup audio signal.

205. And the audio equipment records the absolute value of the second level difference value of the main audio signal and the backup audio signal according to a preset time interval of the audio equipment.

Similar to the first level difference, the audio device may record the level difference Δ d between the main audio signal and the backup audio signal as a second level difference according to a preset time interval T of the audio device, and obtain an absolute value | Δ d |. Likewise, the absolute value of the second level difference is also a discrete function in the time domain, i.e., satisfies | Δ d | ═ f (t), t ═ nT, and n ═ 0,1,2.

206. The audio device judges whether the variation trend of the absolute value of the second level difference value meets a second preset condition, if so, step 207 is executed; otherwise, the flow is ended.

For example, the determining, by the audio apparatus, whether the variation tendency of the absolute value of the second level difference satisfies a second preset condition may include: judging whether the continuous times that the absolute value of the second level difference is smaller than another preset reference threshold (different from the preset reference threshold in the step 203) exceeds a third designated time P, and if so, judging that the variation trend of the absolute value of the second level difference meets a second preset condition; or, judging whether the number of times that the absolute value of the second level difference is smaller than another preset reference threshold value within a specified time exceeds a fourth specified number of times Q, and if so, judging that the variation trend of the absolute value of the second level difference meets a second preset condition; or, whether the ratio of the number of times that the absolute value of the second level difference is smaller than another preset reference threshold to the number of recording times within a specified time exceeds a specified ratio is judged, and if so, it can be judged that the variation trend of the absolute value of the second level difference meets a second preset condition.

The another preset reference threshold may be preset according to a variation trend of the level difference Δ d between the main audio signal and the backup audio signal within a specified time. For example, becauseWhen the main audio signal and the backup audio signal are normal (i.e. no interruption occurs), the level difference Δ d between the main audio signal and the backup audio signal will fluctuate around a fixed value, and then the average value Δ dref of the absolute value | Δ d | of the level difference can be obtained within a specified time2And the average value Δ dref is calculated2As another preset reference threshold value (different from the preset reference threshold value in step 203) set in advance. Optionally, the average value Δ dref can also be measured2The value Δ dref obtained by floating up and down2And + -y is used as another preset reference threshold value which is preset.

Since the level of the main audio signal is gradually increased and finally restored to be close to the level of the backup audio signal when the main audio signal is restored, when the above condition is satisfied, that is, when it is determined that the variation trend of the absolute value of the second level difference satisfies the second preset condition, it may be determined that the main audio signal is restored at this time, and then the main audio signal may be switched by performing the following step 207.

207. And the audio equipment controls the audio equipment to switch to process and output the main audio signal.

By implementing the method, the audio equipment can judge whether the main audio signal is interrupted or not according to the variation trend of the absolute value of the level difference value of the main audio signal and the backup audio signal, and if the main audio signal is interrupted, the audio equipment is switched to the backup audio signal to play the effect of hot backup of the audio signal; in addition, when the main audio signal is restored, the audio device can also judge whether the main audio signal is restored according to the variation trend of the absolute value of the level difference value of the main audio signal and the backup audio signal, if the main audio signal is restored, the main audio signal is switched to again, the effect of hot backup reset of the audio signal is achieved, the times of the hot backup and the hot backup reset are not limited, and the flexibility and the reliability of the hot backup of the audio signal are further improved.

Furthermore, when the time interval T for recording the absolute value of the first level difference and the absolute value of the second level difference is sufficiently small, the implementation of the method has sufficient timeliness, that is, the judgment time and the switching time are short, which is beneficial to ensuring the stability of audio signal playing.

It can be seen that the hot backup method described in fig. 2 can improve the flexibility and reliability of the audio signal hot backup.

In addition, by implementing the hot backup method described in fig. 2, hot backup reset can be performed after hot backup is implemented, and the number of times of hot backup and hot backup reset is not limited, which is beneficial to further improving the flexibility and reliability of audio signal hot backup.

Referring to fig. 3, fig. 3 is a schematic block diagram of an audio device according to an embodiment of the present disclosure. As shown in fig. 3, the audio device may include:

an obtaining unit 301, configured to obtain a main audio signal and a backup audio signal accessed to the audio device, where the audio device processes and outputs the main audio signal by default.

A first recording unit 302 for recording an absolute value of a first level difference between the main audio signal and the backup audio signal at a time interval preset by the audio apparatus.

A first judging unit 303, configured to judge whether a variation trend of the absolute value of the first level difference satisfies a first preset condition.

A first control unit 304, configured to control the audio device to switch to processing and outputting the backup audio signal when the first determining unit 303 determines that the variation trend of the absolute value of the first level difference satisfies a first preset condition.

In this embodiment of the present application, both the main audio signal and the backup audio signal may be digital audio signals or analog audio signals, and this embodiment of the present application is not particularly limited.

As an optional implementation manner, the manner that the first determining unit 303 determines whether the variation trend of the absolute value of the first level difference satisfies the first preset condition may specifically be: judging whether the continuous times that the absolute value of the first level difference is greater than or equal to a preset reference threshold value exceed a first specified time N, and if so, judging that the variation trend of the absolute value of the first level difference meets a first preset condition; or, judging whether the times that the absolute value of the first level difference is greater than or equal to a preset reference threshold value within a specified time exceeds a second specified time M, and if so, judging that the variation trend of the absolute value of the first level difference meets a first preset condition; or, judging whether the ratio of the number of times that the absolute value of the first level difference is greater than or equal to a preset reference threshold value to the number of recording times within a specified time exceeds a specified ratio, and if so, judging that the variation trend of the absolute value of the first level difference meets a first preset condition.

The preset reference threshold may be preset according to a variation trend of the absolute value of the first level difference within a predetermined time.

By implementing the audio equipment, whether the main audio signal is interrupted or not can be judged according to the variation trend of the absolute value of the level difference value of the main audio signal and the backup audio signal, if the main audio signal is interrupted, the first control unit 304 of the audio equipment is switched to the backup audio signal, and the effect of hot backup of the audio signal is achieved. The main audio signal and the backup audio signal can be flexibly selected to be digital audio signals or analog audio signals, and do not depend on clock signals carried by the digital audio signals for judgment; in addition, the first determining unit 303 determines according to a variation trend of the absolute value of the level difference, and may determine whether the main audio signal is interrupted by taking values for multiple times within a period of time and integrating the results of the multiple values, which is beneficial to ensuring the reliability of the determination result.

It can be seen that the audio device described in fig. 3 can improve the flexibility and reliability of the audio signal hot backup.

Referring to fig. 4, fig. 4 is a schematic block diagram of another audio device according to an embodiment of the disclosure. The audio device shown in fig. 4 is optimized from the audio device shown in fig. 3. Compared to the audio apparatus shown in fig. 3, the audio apparatus shown in fig. 4 further includes:

a second recording unit 305 for recording an absolute value of a second level difference of the main audio signal and the backup audio signal at time intervals preset by the audio apparatus.

A second determining unit 306, configured to determine whether a variation trend of the absolute value of the second level difference satisfies a second preset condition.

A second control unit 307, configured to control the audio performance apparatus to switch to process and output the main audio signal when the second determining unit 306 determines that the variation trend of the absolute value of the second level difference satisfies a second preset condition.

As an optional implementation manner, the manner that the second determining unit 306 determines whether the variation trend of the absolute value of the second level difference satisfies the second preset condition may specifically be: judging whether the continuous times that the absolute value of the second level difference is smaller than another preset reference threshold (different from the preset reference threshold) exceed a third designated time P, and if so, judging that the variation trend of the absolute value of the second level difference meets a second preset condition; or, judging whether the times that the absolute value of the second level difference is smaller than another preset reference threshold value within a specified time exceeds a fourth specified time Q, and if so, judging that the variation trend of the absolute value of the second level difference meets a second preset condition; or, judging whether the ratio of the number of times that the absolute value of the second level difference is smaller than another preset reference threshold value to the number of recording times within a specified time exceeds a specified ratio, and if so, judging that the variation trend of the absolute value of the second level difference meets a second preset condition.

The another preset reference threshold may be preset according to a variation trend of a level difference between the main audio signal and the backup audio signal within a specified time.

The audio device can judge whether the main audio signal is interrupted or not according to the variation trend of the absolute value of the level difference value of the main audio signal and the backup audio signal, and switch to the backup audio signal if the main audio signal is interrupted, so that the effect of hot backup of the audio signal is achieved, and can judge whether the main audio signal is restored or not by the second judging unit 306 according to the variation trend of the absolute value of the level difference value of the main audio signal and the backup audio signal when the main audio signal is restored, and if the main audio signal is restored, the second control unit 307 controls the audio device to be switched to the main audio signal again, so that the effect of hot backup and reset of the audio signal is achieved; in addition, the times of the audio signal hot backup and the hot backup reset are not limited, and the flexibility and the reliability of the audio signal hot backup are further improved.

Further, with the present audio apparatus, when the time interval between the recording of the absolute value of the first level difference by the first recording unit 302 and the recording of the absolute value of the second level difference by the second recording unit 305 is sufficiently small, the judgment and switching are performed with sufficient invalidity, that is, the judgment time and the switching time are short, which is advantageous to ensure the stability of the audio signal playback.

It can be seen that the audio device described in fig. 4 can improve the flexibility and reliability of the audio signal hot backup.

In addition, the audio device described in fig. 4 can perform hot backup reset after hot backup is implemented, and the number of times of hot backup and hot backup reset is not limited, which is beneficial to further improving the flexibility and reliability of hot backup of audio signals.

Referring to fig. 5, fig. 5 is a schematic block diagram of another audio device according to an embodiment of the present disclosure. As shown in fig. 5, the audio device may include:

a memory 501 in which executable program code is stored;

a processor 502 coupled to a memory 501;

the processor 502 calls the executable program code stored in the memory 501 to execute all or part of the steps in the hot backup method of any one of the audio signals in fig. 1-2.

In addition, the embodiment of the present application further discloses a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program causes a computer to execute all or part of the steps in the hot backup method of an audio signal in any one of fig. 1 to fig. 2.

In addition, the embodiment of the present application further discloses a computer program product, which, when running on a computer, causes all or part of the steps in the hot backup method of any one of the audio signals of the computer 1 to fig. 2.

It will be understood by those skilled in the art that all or part of the steps in the methods of the embodiments described above may be implemented by instructions associated with a program, which may be stored in a computer-readable storage medium, where the storage medium includes Read-Only Memory (ROM), Random Access Memory (RAM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), One-time Programmable Read-Only Memory (OTPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), compact disc-Read-Only Memory (CD-ROM), or other Memory, magnetic disk, magnetic tape, or magnetic tape, Or any other medium which can be used to carry or store data and which can be read by a computer.

The hot backup method for audio signals and the audio device disclosed in the embodiments of the present application are described in detail above, and specific examples are applied herein to explain the principles and embodiments of the present invention, and the descriptions of the above embodiments are only used to help understand the method and the core ideas of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于DNN和频带内互相关系数的单通道语音增强算法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类