Video recorder, digital audio signal processing method and device
By combining multiple digital audio signals in the recorder and processing them by a single audio conversion module, the problem of high hardware cost of the recorder is solved, and the simultaneous output of multiple audio signals is realized.
Patent Information
- Application Number
- CN202211659036.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-22
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2042-12-22
AI Technical Summary
In order to output multiple audio signals at the same time in existing video recorders, multiple audio conversion modules need to be configured, resulting in high hardware costs.
The multiple digital audio signals are combined into the second digital audio signal of one audio frame through the audio processing module, and processed by a single audio conversion module to generate multiple target analog audio signals, reducing the number of audio conversion modules.
A single audio conversion module can simultaneously process multiple digital audio signals, reducing the hardware cost of the video recorder.
Smart Images

Figure CN115941870B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of audio processing technology, and in particular to a video recorder, a digital audio signal processing method and a device. Background Art
[0002] The audio output function is a basic function of recorders such as DVR (Digital Video Recorder) and NVR (Network Video Recorder).
[0003] In current video recorders, audio output is usually bound to an audio channel. Simply put, an audio channel in a video recorder is only used to output one digital audio signal. This means that during the audio output process, each audio conversion module in the video recorder is only used to process one digital audio signal. The audio conversion module in the video recorder may include conversion devices such as audio AD (Analogue to Digital conversion) devices.
[0004] In the related art, to simultaneously output multiple audio channels, a video recorder often requires multiple audio conversion modules. Each audio conversion module is responsible for processing one digital audio signal. The need for multiple audio conversion modules in a video recorder increases the hardware cost. Summary of the Invention
[0005] The purpose of the embodiments of the present application is to provide a video recorder, a digital audio signal processing method and apparatus to reduce the hardware cost of the video recorder. The specific technical solution is as follows:
[0006] In a first aspect, an embodiment of the present application provides a video recorder, comprising: an audio processing module and an audio conversion module, wherein:
[0007] The audio processing module is configured to obtain at least one first digital audio signal, wherein each first digital audio signal is generated based on an original analog audio signal; generate, based on the at least one first digital audio signal, a second digital audio signal including an audio frame of the at least one first digital audio signal; and write the second digital audio signal to a first storage location;
[0008] The audio conversion module is configured to read a digital audio signal from a second storage location to obtain a third digital audio signal, wherein the digital audio signal in the second storage location is generated based on the second digital audio signal in the first storage location; convert the third digital audio signal to obtain at least one target analog audio signal, each target analog audio signal uniquely corresponding to one first digital audio signal; and write each target analog audio signal to the associated third storage location;
[0009] Among them, the third storage location associated with each target analog audio signal is: a storage location pre-configured for the original analog audio signal corresponding to the target analog audio signal, for storing the analog audio signal to be played, and the original analog audio signal corresponding to each target analog audio signal is: the original analog audio signal used to generate the first digital audio signal corresponding to the target analog audio signal.
[0010] Optionally, the audio processing module generates, based on the at least one first digital audio signal, a second digital audio signal including audio frames of the at least one first digital audio signal, including:
[0011] Acquire an initial audio frame included in the at least one first digital audio signal as a frame to be composited;
[0012] For each frame to be composited, determining a frame sequence corresponding to the first digital audio signal to which the frame to be composited belongs as the frame sequence corresponding to the frame to be composited; wherein the frame sequence corresponding to each first digital audio signal is pre-configured or randomly generated; and the frame sequence corresponding to any first digital audio signal is used to represent the frame sequence of the audio frame of the first digital audio signal in the audio frame group to be generated;
[0013] Merging at least one to-be-combined frame into an audio frame group according to a frame sequence corresponding to each to-be-combined frame;
[0014] Writing the audio frame group into a data queue for a digital audio signal to be generated;
[0015] From the at least one first digital audio signal, obtain the next audio frame of each frame to be composited as a new frame to be composited, and return to the step of determining, for each frame to be composited, a frame sequence corresponding to the first digital audio signal to which the frame to be composited belongs, as the frame sequence corresponding to the frame to be composited.
[0016] Optionally, the audio processing module merges at least one frame to be composited into an audio frame group according to a frame sequence corresponding to each frame to be composited, including:
[0017] For each frame sequence in the audio frame group to be generated, if there is a corresponding frame to be composited for the frame sequence, the frame to be composited corresponding to the frame sequence is written at the position of the frame sequence; if there is no corresponding frame to be composited for the frame sequence, the specified audio frame is written at the position of the frame sequence to obtain an audio frame group.
[0018] Optionally, the audio processing module is further configured to, before performing the step of obtaining the initial audio frames included in the at least one first digital audio signal as the frames to be composited, sequentially write the received audio frames of the at least one first digital audio signal into a fourth storage location in the order in which the audio frames are received;
[0019] The audio processing module obtains the next audio frame of each frame to be composited from the at least one first digital audio signal as a new frame to be composited, including:
[0020] When the audio frames of the at least one first digital audio signal stored in the fourth storage location meet a specified condition, obtaining the next audio frame of each to-be-combined frame from the audio frames of the at least one first digital audio signal stored in the fourth storage location as a new to-be-combined frame;
[0021] The specified conditions include: the number of audio frames of the at least one first digital audio signal stored in the fourth storage location is greater than a specified number threshold; and / or the storage duration of the audio frames of the at least one first digital audio signal stored in the fourth storage location is greater than a specified duration threshold; and / or the data volume of the audio frames of the at least one first digital audio signal stored in the fourth storage location is greater than a specified data volume threshold.
[0022] Optionally, the audio conversion module converts the third digital audio signal to obtain at least one target analog audio signal, including:
[0023] Parsing the third digital audio signal to obtain audio frames of each channel of the first digital audio signal according to a specified parsing method; wherein the specified parsing method is a parsing method that matches a method for generating the second digital audio signal;
[0024] For each first digital audio signal, digital-to-analog conversion is performed on the audio frames of the first digital audio signal obtained through analysis to obtain a target analog audio signal corresponding to the first digital audio signal.
[0025] Optionally, the second digital audio signal includes a plurality of audio frame groups, each audio frame group includes audio frames at the same position in each of the first digital audio signals; each of the first digital audio signals corresponds to a frame sequence in each audio frame group;
[0026] The audio conversion module parses the third digital audio signal to obtain an audio frame of each channel of the first digital audio signal according to a specified parsing method, including:
[0027] determining, based on positions of the plurality of audio frame groups in the second digital audio signal, respective audio frame groups in the third digital audio signal;
[0028] For each first digital audio signal, the audio frames of the first digital audio signal are extracted from each audio frame group included in the third digital audio signal according to the frame sequence corresponding to the first digital audio signal in each audio frame group.
[0029] Optionally, each audio frame in the third digital audio signal carries a signal identifier, and the signal identifier carried by each audio frame is used to indicate an original analog audio signal corresponding to the audio frame; the original analog audio signal corresponding to each audio frame is the original analog audio signal used to generate the audio frame;
[0030] The audio conversion module parses the third digital audio signal to obtain an audio frame of each channel of the first digital audio signal according to a specified parsing method, including:
[0031] For each first digital audio signal, an audio frame carrying a target signal identifier is determined from each audio frame in the third digital audio signal; wherein the original analog audio signal indicated by the target signal identifier is the original analog audio signal corresponding to the first digital audio signal.
[0032] Optionally, the video recorder further includes: a data receiving module;
[0033] The data receiving module is configured to receive at least one original analog audio signal; for each original analog audio signal, generate a first digital audio signal using the original analog audio signal; for each first digital audio signal, write the first digital audio signal into an associated fifth storage location; the fifth storage location associated with each first digital audio signal being a storage location pre-configured for storing the first digital audio signal for the original analog audio signal corresponding to the first digital audio signal;
[0034] The audio processing module obtains at least one first digital audio signal, including:
[0035] The first digital audio signal is read from at least one fifth storage location to obtain at least one first digital audio signal.
[0036] Optionally, the video recorder further includes: a data output module;
[0037] The data output module is configured to read the second digital audio signal from the first storage location; process the second digital audio signal according to a specified transmission protocol, and write the processed digital audio signal into the second storage location.
[0038] Optionally, the audio processing module is further used to process the at least one first digital audio signal according to a specified processing operation before generating a second digital audio signal including an audio frame of the at least one first digital audio signal based on the at least one first digital audio signal, and after the processing is completed, execute the step of generating a second digital audio signal including an audio frame of the at least one first digital audio signal based on the at least one first digital audio signal; wherein the specified processing operation includes: at least one of: noise reduction processing, upsampling processing, downsampling processing, and format conversion processing.
[0039] In a second aspect, an embodiment of the present application provides a method for processing a digital audio signal, the method comprising:
[0040] Acquire at least one first digital audio signal, wherein each first digital audio signal is generated based on an original analog audio signal;
[0041] generating, based on the at least one first digital audio signal, a second digital audio signal including audio frames of the at least one first digital audio signal;
[0042] generating a third digital audio signal based on the second digital audio signal;
[0043] Converting the third digital audio signal into at least one target analog audio signal, each target analog audio signal uniquely corresponding to one first digital audio signal;
[0044] For each target analog audio signal, the target analog audio signal is written to an associated third storage location; wherein the third storage location associated with each target analog audio signal is: a storage location pre-configured for the original analog audio signal corresponding to the target analog audio signal, for storing the analog audio signal to be played, and the original analog audio signal corresponding to each target analog audio signal is: the original analog audio signal used to generate the first digital audio signal corresponding to the target analog audio signal.
[0045] Optionally, the generating, based on the at least one first digital audio signal, a second digital audio signal including audio frames of the at least one first digital audio signal includes:
[0046] Acquire an initial audio frame included in the at least one first digital audio signal as a frame to be composited;
[0047] For each frame to be composited, determining a frame sequence corresponding to the first digital audio signal to which the frame to be composited belongs as the frame sequence corresponding to the frame to be composited; wherein the frame sequence corresponding to each first digital audio signal is pre-configured or randomly generated; and the frame sequence corresponding to any first digital audio signal is used to represent the frame sequence of the audio frame of the first digital audio signal in the audio frame group to be generated;
[0048] Merging at least one to-be-combined frame into an audio frame group according to a frame sequence corresponding to each to-be-combined frame;
[0049] Writing the audio frame group into a data queue for a digital audio signal to be generated;
[0050] From the at least one first digital audio signal, obtain the next audio frame of each frame to be composited as a new frame to be composited, and return to the step of determining, for each frame to be composited, a frame sequence corresponding to the first digital audio signal to which the frame to be composited belongs, as the frame sequence corresponding to the frame to be composited.
[0051] Optionally, merging at least one frame to be composited into an audio frame group according to a frame sequence corresponding to each frame to be composited includes:
[0052] For each frame sequence in the audio frame group to be generated, if there is a corresponding frame to be composited for the frame sequence, the frame to be composited corresponding to the frame sequence is written at the position of the frame sequence; if there is no corresponding frame to be composited for the frame sequence, the specified audio frame is written at the position of the frame sequence to obtain an audio frame group.
[0053] Optionally, before performing the step of obtaining the initial audio frames included in the at least one first digital audio signal as the frames to be composited, the received audio frames are sequentially written into a fourth storage location according to the order in which the audio frames of the at least one first digital audio signal are received;
[0054] The step of obtaining the next audio frame of each frame to be composited from the at least one first digital audio signal as a new frame to be composited includes:
[0055] When the audio frames of the at least one first digital audio signal stored in the fourth storage location meet specified conditions, the next audio frame of each to-be-combined frame is obtained from the audio frames of the at least one first digital audio signal stored in the fourth storage location as a new to-be-combined frame; wherein the specified conditions include: the number of audio frames of the at least one first digital audio signal stored in the fourth storage location is greater than a specified number threshold; and / or the storage duration of the audio frames of the at least one first digital audio signal stored in the fourth storage location is greater than a specified duration threshold; and / or the data volume of the audio frames of the at least one first digital audio signal stored in the fourth storage location is greater than a specified data volume threshold.
[0056] Optionally, converting the third digital audio signal to obtain at least one target analog audio signal includes:
[0057] Parsing the third digital audio signal to obtain audio frames of each channel of the first digital audio signal according to a specified parsing method; wherein the specified parsing method is a parsing method that matches a method for generating the second digital audio signal;
[0058] For each first digital audio signal, digital-to-analog conversion is performed on the audio frames of the first digital audio signal obtained through analysis to obtain a target analog audio signal corresponding to the first digital audio signal.
[0059] Optionally, the second digital audio signal includes a plurality of audio frame groups, and each audio frame group includes audio frames at the same position in each channel of the first digital audio signal;
[0060] The step of parsing the third digital audio signal to obtain an audio frame of each channel of the first digital audio signal according to a specified parsing method includes:
[0061] determining, based on positions of the plurality of audio frame groups in the second digital audio signal, respective audio frame groups in the third digital audio signal;
[0062] For each first digital audio signal, audio frames of the first digital audio signal are extracted from each audio frame group included in the third digital audio signal according to a frame sequence in each audio frame group corresponding to the first digital audio signal.
[0063] Optionally, each audio frame in the third digital audio signal carries a signal identifier, and the signal identifier carried by each audio frame is used to indicate an original analog audio signal corresponding to the audio frame; the original analog audio signal corresponding to each audio frame is the original analog audio signal used to generate the audio frame;
[0064] The step of parsing the third digital audio signal to obtain an audio frame of each channel of the first digital audio signal according to a specified parsing method includes:
[0065] For each first digital audio signal, an audio frame carrying a target signal identifier is determined from each audio frame in the third digital audio signal; wherein the original analog audio signal indicated by the target signal identifier is the original analog audio signal corresponding to the first digital audio signal.
[0066] Optionally, obtaining at least one first digital audio signal includes:
[0067] Receive at least one original analog audio signal;
[0068] For each original analog audio signal, a first digital audio signal is generated by using the original analog audio signal.
[0069] Optionally, generating a third digital audio signal based on the second digital audio signal includes:
[0070] The second digital audio signal is processed according to a specified transmission protocol, and the processed digital audio signal is written into the second storage location.
[0071] Optionally, before generating a second digital audio signal including an audio frame of the at least one first digital audio signal based on the at least one first digital audio signal, the at least one first digital audio signal is processed according to a specified processing operation, and after the processing is completed, the step of generating a second digital audio signal including an audio frame of the at least one first digital audio signal based on the at least one first digital audio signal is performed; wherein the specified processing operation includes: at least one of noise reduction processing, upsampling processing, downsampling processing, and format conversion processing.
[0072] In a third aspect, an embodiment of the present application provides a digital audio signal processing device, the device comprising:
[0073] A signal acquisition module, configured to acquire at least one first digital audio signal, wherein each first digital audio signal is generated based on one original analog audio signal;
[0074] A first signal generating module is configured to generate, based on the at least one first digital audio signal, a second digital audio signal including an audio frame of the at least one first digital audio signal;
[0075] A second signal generating module, configured to generate a third digital audio signal based on the second digital audio signal;
[0076] A third signal generating module is configured to convert the third digital audio signal into at least one target analog audio signal, each target analog audio signal uniquely corresponding to one first digital audio signal;
[0077] A signal writing module is configured to write each target analog audio signal into an associated third storage location; wherein the third storage location associated with each target analog audio signal is a storage location pre-configured for the original analog audio signal corresponding to the target analog audio signal and used to store the analog audio signal to be played, and the original analog audio signal corresponding to each target analog audio signal is an original analog audio signal used to generate the first digital audio signal corresponding to the target analog audio signal.
[0078] In a fourth aspect, an embodiment of the present application provides a video recorder, comprising a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to implement any of the methods described in the second aspect.
[0079] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any method described in the second aspect is implemented.
[0080] Beneficial effects of the embodiments of the present application:
[0081] An embodiment of the present application provides a video recorder. When outputting a digital audio signal, an audio processing module can obtain at least one first digital audio signal and, based on the at least one first digital audio signal, generate a second digital audio signal containing an audio frame of the at least one first digital audio signal; write the second digital audio signal to a first storage location; an audio conversion module can read the digital audio signal from the second storage location to obtain a third digital audio signal, wherein the digital audio signal in the second storage location is generated based on the second digital audio signal in the first storage location; convert the third digital audio signal to obtain at least one target analog audio signal, each target analog audio signal uniquely corresponding to one first digital audio signal; and write each target analog audio signal into an associated third storage location. Since the audio processing module can generate a second digital audio signal containing audio frames of at least one first digital audio signal after obtaining at least one first digital audio signal, thereby realizing the merging of at least one first digital audio signal, even when multiple first digital audio signals are obtained, the audio conversion module only needs to process one third digital audio signal. This means that a single audio conversion module in the video recorder provided by the present application can simultaneously process multiple digital audio signals, so that only a small number of audio conversion modules need to be configured in the video recorder to achieve simultaneous output of multiple audio channels, thereby reducing the hardware cost of the video recorder.
[0082] Of course, it is not necessary to achieve all the advantages described above at the same time when implementing any product or method of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0084] Figure 1 A schematic diagram of a digital audio signal output of a video recorder in the related art;
[0085] Figure 2 A schematic structural diagram of a first video recorder provided in an embodiment of the present application;
[0086] Figure 3 A schematic structural diagram of a second video recorder provided in an embodiment of the present application;
[0087] Figure 4 A schematic structural diagram of a third video recorder provided in an embodiment of the present application;
[0088] Figure 5 A schematic diagram of a digital audio signal output of a video recorder provided in an embodiment of the present application;
[0089] Figure 6 A flowchart of a digital audio signal processing method provided in an embodiment of the present application;
[0090] Figure 7 A schematic diagram of the structure of a digital audio signal processing device provided in an embodiment of the present application;
[0091] Figure 8 This is a schematic diagram of the structure of the video recorder provided in an embodiment of the present application. DETAILED DESCRIPTION
[0092] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field based on this application are within the scope of protection of this application.
[0093] In the related art, in order to ensure that multiple digital audio signals can be output simultaneously, a plurality of audio conversion modules need to be configured in the video recorder, which makes the hardware cost of the video recorder high. Figure 1 The figure shows a schematic diagram of a digital audio signal output of a video recorder in the related art. In order to output four channels of digital audio signals simultaneously, the video recorder needs to be equipped with four audio conversion modules, namely audio conversion module 1, audio conversion module 2, audio conversion module 3 and audio conversion module 4. Among them, audio conversion module 1 is responsible for the audio output corresponding to the original analog audio signal 1, audio conversion module 2 is responsible for the audio output corresponding to the original analog audio signal 2, audio conversion module 3 is responsible for the audio output corresponding to the original analog audio signal 3, and audio conversion module 4 is responsible for the audio output corresponding to the original analog audio signal 4. It can be seen that in the related art, a plurality of audio conversion modules need to be configured in the video recorder to ensure simultaneous multi-channel audio output. However, the more audio conversion modules there are, the higher the hardware cost of the video recorder.
[0094] In order to reduce the hardware cost of a video recorder, embodiments of the present application provide a video recorder, a digital audio signal processing method, and a device.
[0095] The video recorder provided in the embodiment of the present application can be any electronic device capable of audio output, such as a DVR (Digital Video Recorder), an NVR (Network Video Recorder), etc. A DVR is a computer system that performs image storage and processing, and has functions such as long-term video recording and audio recording of images / voices. NVRs are mostly used in back-end products in the security industry. They can access multiple network cameras (IP Camera, abbreviated as IPC) and decode, display, record, store, and transmit the video signals and / or audio signals transmitted from each network camera over the network. The video signals and / or audio signals can be either analog or digital signals.
[0096] The video recorder provided in the embodiment of the present application may include an audio processing module and an audio conversion module, wherein:
[0097] an audio processing module configured to obtain at least one first digital audio signal, wherein each first digital audio signal is generated based on an original analog audio signal; generate, based on the at least one first digital audio signal, a second digital audio signal including an audio frame of the at least one first digital audio signal; and write the second digital audio signal to a first storage location;
[0098] an audio conversion module configured to read a digital audio signal from a second storage location to obtain a third digital audio signal, wherein the digital audio signal in the second storage location is generated based on the second digital audio signal in the first storage location; convert the third digital audio signal to obtain at least one target analog audio signal, each target analog audio signal uniquely corresponding to the first digital audio signal; and write each target analog audio signal to the associated third storage location;
[0099] Among them, the third storage location associated with each target analog audio signal is: a storage location pre-configured for the original analog audio signal corresponding to the target analog audio signal, for storing the analog audio signal to be played, and the original analog audio signal corresponding to each target analog audio signal is: the original analog audio signal used to generate the first digital audio signal corresponding to the target analog audio signal.
[0100] In the above scheme of the present application, after obtaining at least one first digital audio signal, a second digital audio signal containing audio frames of at least one first digital audio signal can be generated, thereby realizing the merging of at least one first digital audio signal. In this way, even when multiple first digital audio signals are obtained, the audio conversion module only needs to process one third digital audio signal. This means that a single audio conversion module in the video recorder provided by the present application can process multiple digital audio signals at the same time, so that only a small number of audio conversion modules need to be configured in the video recorder to realize the simultaneous output of multiple audio channels, thereby reducing the hardware cost of the video recorder.
[0101] The video recorder provided in the embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0102] like Figure 2 As shown, an embodiment of the present application provides a video recorder, which includes an audio processing module 201 and an audio conversion module 202, wherein:
[0103] The audio processing module 201 is configured to obtain at least one first digital audio signal, wherein each first digital audio signal is generated based on an original analog audio signal; generate, based on the at least one first digital audio signal, a second digital audio signal including audio frames of the at least one first digital audio signal; and write the second digital audio signal to a first storage location;
[0104] The audio conversion module 202 is configured to read a digital audio signal from a second storage location to obtain a third digital audio signal, wherein the digital audio signal in the second storage location is generated based on the second digital audio signal in the first storage location; convert the third digital audio signal to obtain at least one target analog audio signal, each target analog audio signal uniquely corresponding to the first digital audio signal; and write each target analog audio signal to the associated third storage location.
[0105] Among them, the third storage location associated with each target analog audio signal is: a storage location pre-configured for the original analog audio signal corresponding to the target analog audio signal, for storing the analog audio signal to be played, and the original analog audio signal corresponding to each target analog audio signal is: the original analog audio signal used to generate the first digital audio signal corresponding to the target analog audio signal.
[0106] Among them, the audio processing module 201 can be software, hardware, or a combination of software and hardware for realizing the audio processing function. In one implementation, the above-mentioned audio processing module 201 can be an audio processing module chip, which can perform any processing operation such as noise reduction processing, upsampling processing, downsampling processing, format conversion processing, etc. on the digital audio signal. The above-mentioned audio conversion module 202 can be software, hardware, or a combination of software and hardware for realizing the audio conversion function. In one implementation, the above-mentioned audio conversion module 202 can be an audio AD device, wherein the audio AD device can realize the mutual conversion between analog audio signals and digital audio signals. Of course, the audio conversion module 202 provided in the embodiment of the present application can only have the function of converting analog audio signals into digital audio signals, which means that it may not have the function of converting digital audio signals into analog audio signals, which is also possible.
[0107] Unlike conventional audio processing modules in related arts that only perform conventional processing such as noise reduction, upsampling, downsampling, and format conversion on digital audio signals, the audio processing module 201 provided in the embodiment of the present application can, after acquiring at least one first digital audio signal, generate a second digital audio signal containing audio frames of at least one first digital audio signal based on the at least one first digital audio signal, and then write the second digital audio signal to the first storage location. This means that the audio processing module 201 provided in the embodiment of the present application can combine multiple first digital audio signals into one second digital audio signal, i.e., the audio processing module 201 can also combine multiple digital audio signals.
[0108] Among them, the above-mentioned first digital audio signal can be generated based on an original analog audio signal, and the original analog audio signal can be collected by the front-end recording device of the video recorder. The front-end recording device can be a camera with a recording function, such as a network camera, a recorder and other devices. The original analog audio signal can be an analog electrical signal obtained by the front-end recording device collecting the ambient sound signal of the environment in which it is located.
[0109] Optionally, the first digital audio signal is a digital signal obtained by performing analog-to-digital conversion on an original analog audio signal. For example, the original analog audio signal is sampled according to a specified sampling period, and then, based on the amplitude value of the original analog audio signal within the sampling interval, a character corresponding to the amplitude value is determined to obtain a character sequence as the first digital audio signal. Of course, after obtaining the character sequence, other preprocessing operations may also be performed, and the preprocessed character sequence is then used as the first digital audio signal. Such preprocessing operations may include any type of operation such as format conversion and noise removal.
[0110] In one implementation, the format of the first digital audio signal can have a specific format, such as RA (RealAudio, network real-time audio) format, MOV (Movie Digital Video Technology, movie digital video technology) format, etc. The RA format is an audio format for music files that can be transmitted and played in real time over the network. The MOV format is a QuickTime encapsulation format, which is mainly used to store common digital media types. Of course, the format of the first digital audio signal is not limited to RA format audio stream or MOV format audio stream.
[0111] After acquiring at least one first digital audio signal, the audio processing module 201 may generate a second digital audio signal comprising audio frames of the at least one first digital audio signal based on the at least one first digital audio signal, and write the second digital audio signal to a first storage location. The first storage location may be a pre-designated first memory area, wherein the memory area may be a storage area of a memory storage device such as a DDR (Double Data Rate) memory.
[0112] In one implementation, after acquiring at least one first digital audio signal, the audio processing module 201 may combine the at least one first digital audio signal into a second digital audio signal including audio frames of the at least one first digital audio signal.
[0113] Exemplarily, the audio processing module 201 acquires two first digital audio signals, namely, first digital audio signal 1 and first digital audio signal 2. First digital audio signal 1 includes audio frames 11, 12, and 13; and first digital audio signal 2 includes audio frames 21, 22, and 23. The composited second digital audio signal may be audio frames 11, 21, 12, 22, 13, and 23.
[0114] In one implementation, the audio processing module 201 can obtain an initial audio frame contained in at least one first digital audio signal as a frame to be composited, and then generate an audio frame group based on the obtained at least one frame to be composited, and write the audio frame group into a data queue for the digital audio signal to be generated, and obtain the next audio frame of each frame to be composited from the at least one first digital audio signal as a new frame to be composited, and return to execute the step of generating an audio frame group based on the obtained at least one frame to be composited.
[0115] Taking the above-mentioned first digital audio signal 1 and first digital audio signal 2 as an example, the audio processing module 201 can first obtain the initial audio frames of the first digital audio signal 1 and the first digital audio signal 2: audio frame 11 and audio frame 21, then merge the audio frame 11 and audio frame 21 into an audio frame group {audio frame 11, audio frame 21}, and write {audio frame 11, audio frame 21} into a data queue of the digital audio signal to be generated. Then, the next audio frame of each frame to be composited is obtained from the first digital audio signal 1 and the first digital audio signal 2: audio frame 12 and audio frame 22, as a new frame to be composited, and the above process is repeated to finally obtain the data queue of the digital audio signal: audio frame 11, audio frame 21, audio frame 12, audio frame 22, audio frame 13, audio frame 23.
[0116] In order to more accurately composite at least one first digital audio signal, each first digital audio signal corresponds to a frame sequence. The frame sequence corresponding to any first digital audio signal is used to represent the frame sequence of the audio frame of the first digital audio signal in the audio frame group to be generated. Exemplarily, the composition format of the audio frame group to be generated is {1, 2, 3}, where 1, 2, and 3 respectively represent the position of the audio frame in the audio frame group. The frame sequence corresponding to each first digital audio signal is pre-configured or randomly generated. For example, the at least one first digital audio signal obtained by the audio processing module 201 includes a first digital audio signal 1, a first digital audio signal 2, and a first digital audio signal 3, where the frame sequence corresponding to the first digital audio signal 1 is 1, the frame sequence corresponding to the first digital audio signal 2 is 2, and the frame sequence corresponding to the first digital audio signal 3 is 3.
[0117] In this case, each time the audio processing module 201 obtains a frame to be composited from at least one first digital audio signal, it can determine, for each frame to be composited, the frame sequence corresponding to the first digital audio signal to which the frame to be composited belongs, as the frame sequence corresponding to the frame to be composited, and then merge at least one frame to be composited into an audio frame group according to the frame sequence corresponding to each frame to be composited.
[0118] For example, taking the above-mentioned first digital audio signal 1, first digital audio signal 2 and first audio signal 3 as an example, each time three frames to be composited, namely frame 1 to be composited, frame 2 to be composited and frame 3 to be composited, are obtained from the first digital audio signal 1, the first digital audio signal 2 and the first digital audio signal 3, the frame sequence corresponding to frame 1 to be composited can be determined to be 1, the frame sequence corresponding to frame 2 to be composited can be determined to be 2, and the frame sequence corresponding to frame 3 to be composited can be determined to be 3, and then the obtained frames to be composited can be merged according to the determined frame sequence to obtain an audio frame group.
[0119] Optionally, merging at least one frame to be composited into an audio frame group according to the frame sequence corresponding to each frame to be composited may include:
[0120] For each frame sequence in the audio frame group to be generated, if there is a corresponding frame to be composited for the frame sequence, the frame to be composited corresponding to the frame sequence is written at the position of the frame sequence; if there is no corresponding frame to be composited for the frame sequence, the specified audio frame is written at the position of the frame sequence to obtain an audio frame group.
[0121] For example, still taking the above-mentioned first digital audio signal 1, first digital audio signal 2 and first audio signal 3 as an example, if the audio frame group to be composited is an audio frame group containing three channels, that is, the format of the audio group is {1, 2, 3}, then after determining that the frame sequence corresponding to the frame to be composited 1 is 1, the frame sequence corresponding to the frame to be composited 2 is 2, and the frame sequence corresponding to the frame to be composited 3 is 3, the frame to be composited 1, the frame to be composited 2 and the frame to be composited 3 are merged to obtain the audio frame group: {frame to be composited 1, frame to be composited 2, frame to be composited 3}. If the audio frame group to be composited is an audio frame group containing four channels, that is, the format of the audio group is {1, 2, 3, 4}, then after determining that the frame sequence corresponding to the frame to be composited 1 is 1, the frame sequence corresponding to the frame to be composited 2 is 2, and the frame sequence corresponding to the frame to be composited 3 is 3, the frame to be composited 1, the frame to be composited 2 and the frame to be composited 3 are merged to obtain the audio frame group: {frame to be composited 1, frame to be composited 2, frame to be composited 3, specified audio frame}. The above-mentioned designated audio frame is set according to requirements, for example, it can be an audio frame with a value of 0.
[0122] In order to avoid the signal jitter problem caused by uneven digital audio signal input rates, in the embodiment of the present application, each of the at least one first digital audio signal may be buffered before being multiplexed.
[0123] Optionally, the audio processing module 201 is further configured to, before obtaining the initial audio frames contained in the at least one first digital audio signal as the frames to be composited, write the received audio frames into the fourth storage location in sequence according to the order in which the audio frames of the at least one first digital audio signal are received.
[0124] In this case, when the audio frames of at least one first digital audio signal stored in the fourth storage position meet the specified conditions, the audio processing module 201 can obtain the next audio frame of each frame to be composited from the audio frames of at least one first digital audio signal stored in the fourth storage position as a new frame to be composited.
[0125] The above specified conditions may be determined according to needs and scenarios. Optionally, the above specified conditions may include at least one of the following conditions:
[0126] First condition: the number of audio frames of at least one first digital audio signal stored in the fourth storage location is greater than a specified number threshold;
[0127] Among them, the specified number threshold can be determined according to needs and scenarios, for example 30 frames, which means that for each first digital audio signal, only when the number of audio frames of the first digital audio signal in the fourth storage location is greater than 30 frames, can the audio frames of the first digital audio signal be read from the fourth storage location for subsequent composite processing.
[0128] Second condition: the storage duration of the audio frames of at least one first digital audio signal stored in the fourth storage location is greater than a specified duration threshold;
[0129] Among them, the specified duration threshold can be determined according to needs and scenarios, for example 1s, which means that for each first digital audio signal, only when the storage duration of the audio frame of the first digital audio signal in the fourth storage position is greater than 1s, can the audio frame of the first digital audio signal be read from the fourth storage position for subsequent composite processing.
[0130] Third condition: the data volume of the audio frames of at least one first digital audio signal stored in the fourth storage location is greater than a specified data volume threshold;
[0131] Among them, the specified data volume threshold can be determined according to needs and scenarios, for example 1M, which means that for each first digital audio signal, only when the data volume of the audio frame of the first digital audio signal in the fourth storage position is greater than 1M, can the audio frame of the first digital audio signal be read from the fourth storage position for subsequent composite processing.
[0132] Optionally, the storage capacity of the fourth storage location is limited. In this case, when the jitter is too severe, overflow may occur. In this case, a reset process can be used to clear the data frame of the first digital audio signal stored in the fourth storage location, and after the reset, at least one audio frame of the first digital audio signal is rewritten to the fourth storage location.
[0133] In order to ensure that after the audio processing module 201 merges at least one first digital audio signal into a second digital audio signal, each original analog audio signal can still be digitized normally, the audio conversion module 202 provided in the present application can split the merged digital audio signal to obtain at least one target analog audio signal, wherein each target analog audio signal uniquely corresponds to one first digital audio signal.
[0134] Optionally, the audio conversion module 202 can read the digital audio signal from the second storage location to obtain a third digital audio signal, wherein the digital audio signal in the second storage location is generated based on the second digital audio signal in the first storage location. The second storage location can be a pre-designated second memory area.
[0135] In one implementation, after generating the second digital audio signal, another processing chip may further process the second digital audio signal and write the processed digital audio signal to the second storage location. Specifically, this will be described in detail in subsequent embodiments and will not be repeated here. Optionally, in another implementation, after generating the second digital audio signal, no further processing may be performed on the second digital audio signal. Simply put, in this case, the second storage location is the same as the first storage location, and the digital audio signal in the second storage location is the second digital audio signal. In this case, the third digital audio signal is the second digital audio signal.
[0136] After obtaining the third digital audio signal, the audio conversion module 202 can convert the third digital audio signal into at least one target analog audio signal, wherein each target analog audio signal uniquely corresponds to one first digital audio signal, and then for each target analog audio signal, the target analog audio signal is written into the associated third storage location.
[0137] The third storage location associated with each target analog audio signal is a storage location pre-configured for the original analog audio signal corresponding to the target analog audio signal and used to store the analog audio signal to be played. The original analog audio signal corresponding to each target analog audio signal is the original analog audio signal used to generate the first digital audio signal corresponding to the target analog audio signal. The third storage location may be a pre-designated third memory area.
[0138] The audio conversion module 202 may generate at least one target analog audio signal in a variety of audio modes, illustratively including at least one of the following two modes:
[0139] The first generation method can parse the third digital audio signal according to a specified parsing method to obtain an audio frame of each first digital audio signal; wherein the specified parsing method is a parsing method that matches the generation method of the second digital audio signal; and then, for each first digital audio signal, based on the parsed audio frame of the first digital audio signal, generate an analog audio signal to obtain a target analog audio signal corresponding to the first digital audio signal.
[0140] Optionally, the second digital audio signal includes multiple audio frame groups, each audio frame group including audio frames at the same position in each of the first digital audio signals. In this case, the audio conversion module 202 can determine each audio frame group in the third digital audio signal based on the position of the multiple audio frame groups in the second digital audio signal, and then, for each of the first digital audio signals, extract the audio frames of the first digital audio signal from each audio frame group in the third digital audio signal.
[0141] Optionally, each first digital audio signal corresponds to a frame sequence in each audio frame group. In this case, the audio conversion module 202 can extract the audio frames of each first digital audio signal from each audio frame group included in the third digital audio signal according to the frame sequence in each audio frame group corresponding to the first digital audio signal.
[0142] In one implementation, each audio frame in the third digital audio signal carries a signal identifier, and the signal identifier carried by each audio frame is used to indicate the original analog audio signal corresponding to the audio frame. The original analog audio signal corresponding to each audio frame is the original analog audio signal used to generate the audio frame. In this case, the audio conversion module 202 can determine the audio frame carrying the target signal identifier from each audio frame in the third digital audio signal for each first digital audio signal, wherein the target signal identifier indicates that the original analog audio signal is the original analog audio signal corresponding to the first digital audio signal. The above-mentioned signal identifier can be an identifier such as SSRC (Synchronous Source).
[0143] The second generation method can perform digital-to-analog conversion on each audio frame of the first digital audio signal obtained through analysis for each first digital audio signal to generate an analog audio signal, thereby obtaining a target analog audio signal corresponding to the first digital audio signal.
[0144] Optionally, the audio frames of the first digital audio signal obtained by parsing may be sequentially converted from digital to analog in the order of the timestamps of each audio frame to obtain a target analog audio signal corresponding to the first digital audio signal.
[0145] In the above-mentioned scheme of the present application, after obtaining at least one first digital audio signal, a second digital audio signal containing audio frames of at least one first digital audio signal can be generated, thereby realizing the merging of at least one first digital audio signal. In this way, even when multiple first digital audio signals are obtained, the audio conversion module only needs to process one third digital audio signal. This means that a single audio conversion module in the video recorder provided by the present application can process multiple digital audio signals at the same time, so that only a small number of audio conversion modules need to be configured in the video recorder to realize the simultaneous output of multiple audio channels, thereby reducing the hardware cost of the video recorder.
[0146] In one embodiment, Figure 3 As shown, the structural diagram of the video recorder provided in the embodiment of the present application may also include a data receiving module 203. When the video recorder is a network hard disk video recorder, the above-mentioned data receiving module may be a network receiving module, which can realize functions such as receiving analog audio signals and dividing audio channels. It can receive analog audio signals from different audio sources through different networks and different network ports, and convert the received analog audio signals into digital audio signals for storage.
[0147] Optionally, the data receiving module 203 may receive at least one original analog audio signal, and for each original analog audio signal, generate a first digital audio signal using the original analog audio signal, and write the first digital audio signal to an associated fifth storage location. The fifth storage location associated with each first digital audio signal is a storage location pre-configured for storing the first digital audio signal for the original analog audio signal corresponding to the first digital audio signal.
[0148] After receiving at least one original analog audio signal, the data receiving module 203 may perform analog-to-digital conversion on each original analog audio signal to obtain a first digital audio signal, and then write the first digital audio signal into the associated fifth storage location.
[0149] In this case, the audio processing module 201 may read the first digital audio signal from at least one fifth storage location to obtain at least one first digital audio signal.
[0150] In the above scheme of the present application, the hardware cost of the video recorder can be reduced. Furthermore, the original analog audio signal is received by the data receiving module, and then the original analog audio signal is converted into a first digital audio signal, which provides a basis for reducing the hardware cost of the video recorder.
[0151] In one embodiment, Figure 4As shown, the structural diagram of the video recorder provided in the embodiment of the present application may also include a data output module 204, which can read the second digital audio signal from the first storage location; process the second digital audio signal according to the specified transmission protocol, and write the processed digital audio signal into the second storage location.
[0152] Optionally, the data output module 204 may transmit and arrange the digital audio signal according to a data transmission protocol, and then write the processed digital audio signal to the second storage location. The specified transmission protocol may be a single-channel LMS (Local Message Switch) protocol or an I2S (Inter-IC Sound) protocol.
[0153] In one embodiment, Figure 5 As shown, an embodiment of the present application provides a schematic diagram of the digital audio signal output of a video recorder. After receiving at least one original analog audio signal, the data receiving module 203 converts the at least one original analog audio signal into at least one first digital audio signal; after obtaining at least one digital audio signal, the audio processing module combines the at least one digital audio signal into a second digital audio signal; after obtaining the second digital audio signal, the data output module converts it into a third digital audio signal and transmits it to the audio conversion module. After obtaining the third digital audio signal, the audio conversion module converts the third digital audio signal into at least one target analog audio signal and outputs it.
[0154] In the above solution of the present application, the hardware cost of the video recorder can be reduced. Furthermore, by processing the second digital audio signal through the data output module, the quality of the audio output can be improved.
[0155] Corresponding to the above-mentioned video recorder of this application, as Figure 6 As shown, the embodiment of the present application provides a digital audio signal processing method, including steps S601-S605, wherein:
[0156] S601: Acquire at least one first digital audio signal, wherein each first digital audio signal is generated based on an original analog audio signal;
[0157] Optionally, the acquiring of at least one first digital audio signal may include: receiving at least one original analog audio signal, and then generating a first digital audio signal by using each original analog audio signal.
[0158] S602: Generate, based on the at least one first digital audio signal, a second digital audio signal including audio frames of the at least one first digital audio signal;
[0159] In one implementation, the at least one first digital audio signal may be multiplexed into a second digital audio signal including audio frames of the at least one first digital audio signal.
[0160] Optionally, in one implementation, an initial audio frame contained in the at least one first digital audio signal can be obtained as a frame to be composited; an audio frame group can be generated based on the obtained at least one frame to be composited; the audio frame group can be written into a data queue for the digital audio signal to be generated; the next audio frame of each frame to be composited is obtained from the at least one first digital audio signal as a new frame to be composited, and the step of generating an audio frame group based on the obtained at least one frame to be composited is returned to execute.
[0161] In one implementation, the step of generating the audio frame group based on the obtained at least one frame to be composited may include:
[0162] For each frame to be composited, a frame sequence corresponding to the first digital audio signal to which the frame to be composited belongs is determined as the frame sequence corresponding to the frame to be composited; wherein the frame sequence corresponding to any first digital audio signal is used to represent the frame sequence of the audio frame of the first digital audio signal in the audio frame group to be generated; according to the frame sequence corresponding to each frame to be composited, at least one frame to be composited is merged into an audio frame group.
[0163] In one implementation, merging at least one frame to be composited into an audio frame group according to the frame sequence corresponding to each frame to be composited may include:
[0164] For each frame sequence in the audio frame group to be generated, if there is a corresponding frame to be composited for the frame sequence, the frame to be composited corresponding to the frame sequence is written at the position of the frame sequence; if there is no corresponding frame to be composited for the frame sequence, the specified audio frame is written at the position of the frame sequence to obtain an audio frame group.
[0165] The frame sequence corresponding to each channel of the first digital audio signal is pre-configured or randomly generated.
[0166] In one implementation, before obtaining the initial audio frames included in the at least one first digital audio signal as the frames to be composited, the received audio frames may be sequentially written into the fourth storage location according to the order in which the audio frames of the at least one first digital audio signal are received.
[0167] The step of obtaining the next audio frame of each frame to be composited from the at least one first digital audio signal as a new frame to be composited may include:
[0168] When the audio frames of the at least one first digital audio signal stored in the fourth storage location meet a specified condition, obtaining the next audio frame of each to-be-combined frame from the audio frames of the at least one first digital audio signal stored in the fourth storage location as a new to-be-combined frame;
[0169] In one implementation, the above-mentioned specified conditions include:
[0170] The number of audio frames of at least one first digital audio signal stored in the fourth storage location is greater than a specified number threshold; and / or,
[0171] The storage duration of the audio frames of the at least one first digital audio signal stored in the fourth storage location is greater than a specified duration threshold; and / or,
[0172] The data volume of the audio frames of the at least one first digital audio signal stored in the fourth storage location is greater than a specified data volume threshold.
[0173] S603, generating a third digital audio signal based on the second digital audio signal;
[0174] In one implementation, generating the third digital audio signal based on the second digital audio signal may include:
[0175] The second digital audio signal is processed according to a specified processing operation, and the processed digital audio signal is used to obtain a third digital audio signal.
[0176] The designated processing operation includes at least one of noise reduction processing, upsampling processing, downsampling processing, and format conversion processing.
[0177] In another implementation, the second digital audio signal is directly used as the third digital audio signal.
[0178] S604: Convert the third digital audio signal into at least one target analog audio signal, each target analog audio signal uniquely corresponding to one first digital audio signal;
[0179] In one implementation, converting the third digital audio signal to obtain at least one target analog audio signal may include:
[0180] Parsing the third digital audio signal to obtain audio frames of each channel of the first digital audio signal according to a specified parsing method; wherein the specified parsing method is a parsing method that matches a method for generating the second digital audio signal;
[0181] For each first digital audio signal, an analog audio signal is generated based on the parsed audio frame of the first digital audio signal to obtain a target analog audio signal corresponding to the first digital audio signal.
[0182] Optionally, the second digital audio signal may include multiple audio frame groups, each audio frame group including audio frames at the same position in each channel of the first digital audio signal;
[0183] In this case, parsing the third digital audio signal according to the specified parsing method to obtain the audio frame of each channel of the first digital audio signal may include:
[0184] determining, based on positions of the plurality of audio frame groups in the second digital audio signal, respective audio frame groups in the third digital audio signal;
[0185] For each first digital audio signal, an audio frame of the first digital audio signal is extracted from each audio frame group of the third digital audio signal.
[0186] Optionally, each channel of the first digital audio signal corresponds to a frame sequence in each audio frame group;
[0187] In this case, for each first digital audio signal, extracting the audio frame of the first digital audio signal from each audio frame group of the third digital audio signal may include:
[0188] For each first digital audio signal, audio frames of the first digital audio signal are extracted from each audio frame group included in the third digital audio signal according to a frame sequence in each audio frame group corresponding to the first digital audio signal.
[0189] Optionally, each audio frame in the third digital audio signal carries a signal identifier, and the signal identifier carried by each audio frame is used to indicate an original analog audio signal corresponding to the audio frame; the original analog audio signal corresponding to each audio frame is the original analog audio signal used to generate the audio frame;
[0190] Parsing the third digital audio signal to obtain the audio frames of each channel of the first digital audio signal according to the specified parsing method may include:
[0191] For each first digital audio signal, an audio frame carrying a target signal identifier is determined from each audio frame in the third digital audio signal; wherein the original analog audio signal indicated by the target signal identifier is the original analog audio signal corresponding to the first digital audio signal.
[0192] In one implementation, for each first digital audio signal, digital-to-analog conversion may be performed on each audio frame of the parsed first digital audio signal to generate an analog audio signal, thereby obtaining a target analog audio signal corresponding to the first digital audio signal.
[0193] Optionally, for each first digital audio signal, the audio frames of the first digital audio signal obtained by parsing can be converted from digital to analog in sequence according to the timestamp order of each audio frame to generate an analog audio signal, thereby obtaining a target analog audio signal corresponding to the first digital audio signal.
[0194] S605, for each channel of target analog audio signal, writing the target analog audio signal into an associated third storage location;
[0195] Among them, the third storage location associated with each target analog audio signal is: a storage location pre-configured for the original analog audio signal corresponding to the target analog audio signal, for storing the analog audio signal to be played, and the original analog audio signal corresponding to each target analog audio signal is: the original analog audio signal used to generate the first digital audio signal corresponding to the target analog audio signal.
[0196] In the above-mentioned scheme of the present application, after obtaining at least one first digital audio signal, a second digital audio signal containing audio frames of at least one first digital audio signal can be generated, thereby realizing the merging of at least one first digital audio signal. In this way, even when multiple first digital audio signals are obtained, the audio conversion module only needs to process one third digital audio signal. This means that a single audio conversion module in the video recorder provided by the present application can process multiple digital audio signals at the same time, so that only a small number of audio conversion modules need to be configured in the video recorder to realize the simultaneous output of multiple audio channels, thereby reducing the hardware cost of the video recorder.
[0197] The specific implementation and related introduction of each of the above steps can be found in the above video recorder embodiment and will not be described in detail here.
[0198] Corresponding to the digital audio signal processing method provided in the above embodiment of the present application, as Figure 7 As shown, an embodiment of the present application further provides a digital audio signal processing device, the device comprising:
[0199] The signal acquisition module 701 is configured to acquire at least one first digital audio signal, wherein each first digital audio signal is generated based on one original analog audio signal;
[0200] A first signal generating module 702 is configured to generate, based on the at least one first digital audio signal, a second digital audio signal including audio frames of the at least one first digital audio signal;
[0201] A second signal generating module 703 is configured to generate a third digital audio signal based on the second digital audio signal;
[0202] A third signal generating module 704 is configured to convert the third digital audio signal into at least one target analog audio signal, each target analog audio signal uniquely corresponding to one first digital audio signal;
[0203] The signal writing module 705 is configured to write each target analog audio signal into an associated third storage location. The third storage location associated with each target analog audio signal is a storage location pre-configured for the original analog audio signal corresponding to the target analog audio signal and used to store the analog audio signal to be played. The original analog audio signal corresponding to each target analog audio signal is the original analog audio signal used to generate the first digital audio signal corresponding to the target analog audio signal.
[0204] Optionally, the first signal generating module includes:
[0205] An audio frame acquisition submodule, configured to acquire an initial audio frame included in the at least one first digital audio signal as a frame to be composited;
[0206] a frame sequence determination submodule, configured to determine, for each frame to be composited, a frame sequence corresponding to the first digital audio signal to which the frame to be composited belongs, as the frame sequence corresponding to the frame to be composited; wherein the frame sequence corresponding to each first digital audio signal is preconfigured or randomly generated; and the frame sequence corresponding to any first digital audio signal is used to represent the frame sequence of the audio frame of the first digital audio signal in the audio frame group to be generated;
[0207] An audio frame merging submodule, configured to merge at least one frame to be composited into an audio frame group according to a frame sequence corresponding to each frame to be composited;
[0208] The frame group writing submodule is configured to write the audio frame group into a data queue for the digital audio signal to be generated; obtain the next audio frame of each frame to be composited from the at least one first digital audio signal as a new frame to be composited; and call the frame sequence determination submodule to execute the step of determining, for each frame to be composited, a frame sequence corresponding to the first digital audio signal to which the frame to be composited belongs, as the frame sequence corresponding to the frame to be composited.
[0209] Optionally, the audio frame merging submodule is specifically used to, for each frame sequence in the audio frame group to be generated, write the corresponding frame to be composited at the position of the frame sequence if the frame sequence has a corresponding frame to be composited; if the frame sequence does not have a corresponding frame to be composited, write the specified audio frame at the position of the frame sequence to obtain an audio frame group.
[0210] Optionally, the audio frame acquisition submodule is further configured to, before acquiring the initial audio frames included in the at least one first digital audio signal as the frame to be composited, sequentially write the received audio frames of the at least one first digital audio signal into a fourth storage location in the order in which the audio frames are received;
[0211] The frame group writing submodule is specifically configured to, when the audio frames of the at least one first digital audio signal stored in the fourth storage location meet a specified condition, obtain the next audio frame of each to-be-combined frame from the audio frames of the at least one first digital audio signal stored in the fourth storage location as a new to-be-combined frame; wherein the specified condition includes: the number of audio frames of the at least one first digital audio signal stored in the fourth storage location is greater than a specified number threshold; and / or the storage duration of the audio frames of the at least one first digital audio signal stored in the fourth storage location is greater than a specified duration threshold; and / or the data volume of the audio frames of the at least one first digital audio signal stored in the fourth storage location is greater than a specified data volume threshold.
[0212] Optionally, the third signal generating module includes:
[0213] a signal parsing submodule, configured to parse the third digital audio signal to obtain audio frames of each channel of the first digital audio signal according to a specified parsing method; wherein the specified parsing method is a parsing method that matches a method for generating the second digital audio signal;
[0214] The digital-to-analog conversion submodule is configured to perform digital-to-analog conversion on the audio frames of each first digital audio signal obtained through analysis to obtain a target analog audio signal corresponding to the first digital audio signal.
[0215] Optionally, the second digital audio signal includes a plurality of audio frame groups, and each audio frame group includes audio frames at the same position in each channel of the first digital audio signal;
[0216] The signal parsing submodule is specifically configured to determine, based on positions of the multiple audio frame groups in the second digital audio signal, each audio frame group in the third digital audio signal; and, for each first digital audio signal, extract, from each audio frame group included in the third digital audio signal, audio frames of the first digital audio signal according to a frame sequence in each audio frame group corresponding to the first digital audio signal.
[0217] Optionally, each audio frame in the third digital audio signal carries a signal identifier, and the signal identifier carried by each audio frame is used to indicate an original analog audio signal corresponding to the audio frame; the original analog audio signal corresponding to each audio frame is the original analog audio signal used to generate the audio frame;
[0218] The signal analysis submodule is specifically configured to determine, for each first digital audio signal, an audio frame carrying a target signal identifier from each audio frame in the third digital audio signal; wherein the original analog audio signal indicated by the target signal identifier is the original analog audio signal corresponding to the first digital audio signal.
[0219] Optionally, the signal acquisition module is specifically configured to receive at least one original analog audio signal; and for each original analog audio signal, generate a first digital audio signal using the original analog audio signal.
[0220] Optionally, the second signal generating module is specifically configured to process the second digital audio signal according to a specified transmission protocol, and write the processed digital audio signal into the second storage location.
[0221] Optionally, the first signal generating module is further used to process the at least one first digital audio signal according to a specified processing operation before generating a second digital audio signal including an audio frame of the at least one first digital audio signal based on the at least one first digital audio signal, and after the processing is completed, execute the step of generating a second digital audio signal including an audio frame of the at least one first digital audio signal based on the at least one first digital audio signal; wherein the specified processing operation includes: at least one of: noise reduction processing, upsampling processing, downsampling processing, and format conversion processing.
[0222] In the above-mentioned scheme of the present application, after obtaining at least one first digital audio signal, a second digital audio signal containing audio frames of at least one first digital audio signal can be generated, thereby realizing the merging of at least one first digital audio signal. In this way, even when multiple first digital audio signals are obtained, the audio conversion module only needs to process one third digital audio signal. This means that a single audio conversion module in the video recorder provided by the present application can process multiple digital audio signals at the same time, so that only a small number of audio conversion modules need to be configured in the video recorder to realize the simultaneous output of multiple audio channels, thereby reducing the hardware cost of the video recorder.
[0223] The embodiment of the present application also provides a video recorder, such as Figure 8 As shown, the system includes a processor 801 and a machine-readable storage medium 802. The machine-readable storage medium 802 stores machine-executable instructions that can be executed by the processor 801. The processor 801 is prompted by the machine-executable instructions to implement the following steps:
[0224] Acquire at least one first digital audio signal, wherein each first digital audio signal is generated based on an original analog audio signal;
[0225] generating, based on the at least one first digital audio signal, a second digital audio signal including audio frames of the at least one first digital audio signal;
[0226] generating a third digital audio signal based on the second digital audio signal;
[0227] Converting the third digital audio signal into at least one target analog audio signal, each target analog audio signal uniquely corresponding to one first digital audio signal;
[0228] For each target analog audio signal, the target analog audio signal is written to an associated third storage location; wherein the third storage location associated with each target analog audio signal is: a storage location pre-configured for the original analog audio signal corresponding to the target analog audio signal, for storing the analog audio signal to be played, and the original analog audio signal corresponding to each target analog audio signal is: the original analog audio signal used to generate the first digital audio signal corresponding to the target analog audio signal.
[0229] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.
[0230] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0231] In another embodiment provided by the present application, a computer-readable storage medium is further provided, wherein a computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, the steps of any of the above-mentioned digital audio signal processing methods are implemented.
[0232] In another embodiment provided by the present application, a computer program product including instructions is further provided, which, when executed on a computer, enables the computer to execute any one of the digital audio signal processing methods in the above embodiments.
[0233] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0234] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0235] Each embodiment in this specification is described in a related manner. Similar portions between the various embodiments can be referenced to each other. Each embodiment focuses on the differences between the other embodiments. In particular, the method, apparatus, computer-readable storage medium, and computer program product embodiments are generally similar to the method embodiments, so their descriptions are relatively simplified. For related portions, reference can be made to the descriptions of the method embodiments.
[0236] The above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application are included in the scope of protection of the present application.
Claims
1. A video recorder, characterized in that: include: Audio processing module and audio conversion module, including: The audio processing module is configured to obtain at least one first digital audio signal, wherein each first digital audio signal is generated based on one original analog audio signal; obtain an initial audio frame contained in at least one first digital audio signal as a frame to be composited; for each frame to be composited, determine a frame sequence corresponding to the first digital audio signal to which the frame to be composited belongs, as the frame sequence corresponding to the frame to be composited; for each frame sequence in the audio frame group to be generated, if the frame sequence has a corresponding frame to be composited, write the frame to be composited corresponding to the frame sequence at the position of the frame sequence; if the frame sequence does not have a corresponding frame to be composited, write a specified audio frame at the position of the frame sequence to obtain an audio frame group; write the audio frame group into a data queue for the second digital audio signal to be generated, and In at least one first digital audio signal, the next audio frame of each frame to be composited is obtained as a new frame to be composited, and the step of determining, for each frame to be composited, a frame sequence corresponding to the first digital audio signal to which the frame to be composited belongs is returned to be executed as the frame sequence corresponding to the frame to be composited, so as to generate a second digital audio signal; and the second digital audio signal is written into a first storage location; wherein each first digital audio signal corresponds to a frame sequence, and the frame sequence corresponding to each first digital audio signal is preconfigured or randomly generated, and the frame sequence corresponding to any first digital audio signal is used to represent the frame sequence of the audio frame of the first digital audio signal in the audio frame group to be generated; the audio frame group contains a specified number of channels, and the number of frame sequences present in the audio frame group is the specified number; The audio conversion module is configured to read a digital audio signal from a second storage location to obtain a third digital audio signal, wherein the digital audio signal in the second storage location is generated based on the second digital audio signal in the first storage location; convert the third digital audio signal to obtain at least one target analog audio signal, each target analog audio signal uniquely corresponding to one first digital audio signal; and write each target analog audio signal to an associated third storage location, so that the video recorder can simultaneously output each target analog audio signal. Among them, the third storage location associated with each target analog audio signal is: a storage location pre-configured for the original analog audio signal corresponding to the target analog audio signal, for storing the analog audio signal to be played, and the original analog audio signal corresponding to each target analog audio signal is: the original analog audio signal used to generate the first digital audio signal corresponding to the target analog audio signal.
2. The video recorder according to claim 1, wherein The audio processing module is further configured to, before obtaining the initial audio frames included in the at least one first digital audio signal as the frames to be composited, sequentially write the received audio frames of the at least one first digital audio signal into a fourth storage location in the order in which the audio frames are received; The audio processing module obtains the next audio frame of each frame to be composited from the at least one first digital audio signal as a new frame to be composited, including: When the audio frames of the at least one first digital audio signal stored in the fourth storage location meet a specified condition, obtaining the next audio frame of each to-be-combined frame from the audio frames of the at least one first digital audio signal stored in the fourth storage location as a new to-be-combined frame; The specified conditions include: the number of audio frames of the at least one first digital audio signal stored in the fourth storage location is greater than a specified number threshold; and / or the storage duration of the audio frames of the at least one first digital audio signal stored in the fourth storage location is greater than a specified duration threshold; and / or the data volume of the audio frames of the at least one first digital audio signal stored in the fourth storage location is greater than a specified data volume threshold.
3. The video recorder according to claim 1, wherein The audio conversion module converts the third digital audio signal to obtain at least one target analog audio signal, including: Parsing the third digital audio signal to obtain audio frames of each channel of the first digital audio signal according to a specified parsing method; wherein the specified parsing method is a parsing method that matches a method for generating the second digital audio signal; For each first digital audio signal, digital-to-analog conversion is performed on the audio frames of the first digital audio signal obtained through analysis to obtain a target analog audio signal corresponding to the first digital audio signal.
4. The video recorder according to claim 3, wherein The second digital audio signal includes a plurality of audio frame groups, each audio frame group includes audio frames at the same position in each of the first digital audio signals; each of the first digital audio signals corresponds to a frame sequence in each audio frame group; The audio conversion module parses the third digital audio signal to obtain an audio frame of each channel of the first digital audio signal according to a specified parsing method, including: determining, based on positions of the plurality of audio frame groups in the second digital audio signal, respective audio frame groups in the third digital audio signal; For each first digital audio signal, the audio frames of the first digital audio signal are extracted from each audio frame group included in the third digital audio signal according to the frame sequence corresponding to the first digital audio signal in each audio frame group.
5. The video recorder according to claim 1, wherein The video recorder further comprises: a data receiving module; The data receiving module is configured to receive at least one original analog audio signal; for each original analog audio signal, generate a first digital audio signal using the original analog audio signal; for each first digital audio signal, write the first digital audio signal into an associated fifth storage location; the fifth storage location associated with each first digital audio signal being a storage location pre-configured for storing the first digital audio signal for the original analog audio signal corresponding to the first digital audio signal; The audio processing module obtains at least one first digital audio signal, including: The first digital audio signal is read from at least one fifth storage location to obtain at least one first digital audio signal.
6. The video recorder according to claim 1, wherein The video recorder further comprises: a data output module; The data output module is configured to read the second digital audio signal from the first storage location; process the second digital audio signal according to a specified transmission protocol, and write the processed digital audio signal into the second storage location.
7. The video recorder according to claim 1, wherein The audio processing module is further configured to process the at least one first digital audio signal according to a specified processing operation before obtaining an initial audio frame included in the at least one first digital audio signal as the frame to be composited, and after the processing is completed, execute the step of obtaining the initial audio frame included in the at least one first digital audio signal as the frame to be composited; The designated processing operation includes at least one of noise reduction processing, upsampling processing, downsampling processing, and format conversion processing.
8. A digital audio signal processing method, characterized in that: Applied to a video recorder, the method comprises: Acquire at least one first digital audio signal, wherein each first digital audio signal is generated based on an original analog audio signal; Acquire at least one initial audio frame contained in the first digital audio signal as a frame to be composited; for each frame to be composited, determine the frame sequence corresponding to the first digital audio signal to which the frame to be composited belongs, as the frame sequence corresponding to the frame to be composited; for each frame sequence in the audio frame group to be generated, if the frame sequence has a corresponding frame to be composited, write the frame to be composited corresponding to the frame sequence at the position of the frame sequence; if the frame sequence does not have a corresponding frame to be composited, write a specified audio frame at the position of the frame sequence to obtain an audio frame group; write the audio frame group into a data queue for the second digital audio signal to be generated, and acquire each frame to be composited from the at least one first digital audio signal. The next audio frame of the composite frame is used as a new frame to be composited, and the step of determining, for each frame to be composited, a frame sequence corresponding to the first digital audio signal to which the frame to be composited belongs as the frame sequence corresponding to the frame to be composited is returned to generate a second digital audio signal; wherein each channel of the first digital audio signal corresponds to a frame sequence, and the frame sequence corresponding to each channel of the first digital audio signal is pre-configured or randomly generated, and the frame sequence corresponding to any first digital audio signal is used to represent the frame sequence of the audio frame of the first digital audio signal in the audio frame group to be generated; the audio frame group includes a specified number of channels, and the number of frame sequences existing in the audio frame group is the specified number; generating a third digital audio signal based on the second digital audio signal; Converting the third digital audio signal into at least one target analog audio signal, each target analog audio signal uniquely corresponding to one first digital audio signal; For each target analog audio signal, the target analog audio signal is written into an associated third storage location so that the video recorder can output each target analog audio signal simultaneously; wherein the third storage location associated with each target analog audio signal is: a storage location pre-configured for the original analog audio signal corresponding to the target analog audio signal, for storing the analog audio signal to be played, and the original analog audio signal corresponding to each target analog audio signal is: the original analog audio signal used to generate the first digital audio signal corresponding to the target analog audio signal.
9. The method according to claim 8, characterized in that Before performing the step of obtaining the initial audio frames included in the at least one first digital audio signal as the frames to be composited, writing the received audio frames into a fourth storage location in sequence according to the order in which the audio frames of the at least one first digital audio signal are received; The step of obtaining the next audio frame of each frame to be composited from at least one first digital audio signal as a new frame to be composited includes: When the audio frames of the at least one first digital audio signal stored in the fourth storage location meet a specified condition, obtaining the next audio frame of each to-be-combined frame from the audio frames of the at least one first digital audio signal stored in the fourth storage location as a new to-be-combined frame; wherein the specified condition includes: the number of audio frames of the at least one first digital audio signal stored in the fourth storage location is greater than a specified number threshold; and / or the storage duration of the audio frames of the at least one first digital audio signal stored in the fourth storage location is greater than a specified duration threshold; and / or the data volume of the audio frames of the at least one first digital audio signal stored in the fourth storage location is greater than a specified data volume threshold; And / or, converting the third digital audio signal to obtain at least one target analog audio signal includes: Parsing the third digital audio signal to obtain audio frames of each channel of the first digital audio signal according to a specified parsing method; wherein the specified parsing method is a parsing method that matches a method for generating the second digital audio signal; For each first digital audio signal, performing digital-to-analog conversion on the audio frames of the first digital audio signal obtained by parsing to obtain a target analog audio signal corresponding to the first digital audio signal; And / or, the second digital audio signal includes a plurality of audio frame groups, each audio frame group includes audio frames at the same position in each of the first digital audio signals; The step of parsing the third digital audio signal to obtain an audio frame of each channel of the first digital audio signal according to a specified parsing method includes: determining, based on positions of the plurality of audio frame groups in the second digital audio signal, respective audio frame groups in the third digital audio signal; For each first digital audio signal, extracting the audio frames of the first digital audio signal from each audio frame group included in the third digital audio signal according to the frame sequence in each audio frame group corresponding to the first digital audio signal; And / or, each audio frame in the third digital audio signal carries a signal identifier, and the signal identifier carried by each audio frame is used to indicate an original analog audio signal corresponding to the audio frame; and the original analog audio signal corresponding to each audio frame is the original analog audio signal used to generate the audio frame; The step of parsing the third digital audio signal to obtain an audio frame of each channel of the first digital audio signal according to a specified parsing method includes: For each first digital audio signal, determine an audio frame carrying a target signal identifier from each audio frame in the third digital audio signal; wherein the original analog audio signal indicated by the target signal identifier is the original analog audio signal corresponding to the first digital audio signal; And / or, obtaining at least one first digital audio signal includes: Receive at least one original analog audio signal; For each original analog audio signal, generate a first digital audio signal using the original analog audio signal; And / or, generating a third digital audio signal based on the second digital audio signal includes: processing the second digital audio signal according to a specified transmission protocol, and writing the processed digital audio signal into a second storage location; And / or, before obtaining the initial audio frame contained in the at least one first digital audio signal as the frame to be composited, the at least one first digital audio signal is processed according to a specified processing operation, and after the processing is completed, the step of obtaining the initial audio frame contained in the at least one first digital audio signal as the frame to be composited is performed; wherein the specified processing operation includes: at least one of: noise reduction processing, upsampling processing, downsampling processing, and format conversion processing.
10. A digital audio signal processing device, characterized in that: Applied to a video recorder, the device comprises: A signal acquisition module, configured to acquire at least one first digital audio signal, wherein each first digital audio signal is generated based on one original analog audio signal; The first signal generating module is configured to obtain initial audio frames included in at least one first digital audio signal as frames to be composited; for each frame to be composited, determine a frame sequence corresponding to the first digital audio signal to which the frame to be composited belongs, and use the frame sequence corresponding to the frame to be composited; for each frame sequence in the audio frame group to be generated, if the frame sequence has a corresponding frame to be composited, write the frame to be composited corresponding to the frame sequence at the position of the frame sequence; if the frame sequence does not have a corresponding frame to be composited, write a specified audio frame at the position of the frame sequence to obtain an audio frame group; write the audio frame group into a data queue for the second digital audio signal to be generated, and from the at least one first digital audio signal, Obtaining the next audio frame of each frame to be composited as a new frame to be composited, and returning to execute the step of determining, for each frame to be composited, a frame sequence corresponding to the first digital audio signal to which the frame to be composited belongs, as the frame sequence corresponding to the frame to be composited, so as to generate a second digital audio signal; wherein each channel of the first digital audio signal corresponds to a frame sequence, and the frame sequence corresponding to each channel of the first digital audio signal is preconfigured or randomly generated, and the frame sequence corresponding to any first digital audio signal is used to represent the frame sequence of the audio frame of the first digital audio signal in the audio frame group to be generated; the audio frame group contains a specified number of channels, and the number of frame sequences present in the audio frame group is the specified number; A second signal generating module, configured to generate a third digital audio signal based on the second digital audio signal; A third signal generating module is configured to convert the third digital audio signal into at least one target analog audio signal, each target analog audio signal uniquely corresponding to one first digital audio signal; A signal writing module is used to write each target analog audio signal into an associated third storage location, so that the video recorder can output each target analog audio signal simultaneously; wherein the third storage location associated with each target analog audio signal is: a storage location pre-configured for the original analog audio signal corresponding to the target analog audio signal, and used to store the analog audio signal to be played; the original analog audio signal corresponding to each target analog audio signal is: the original analog audio signal used to generate the first digital audio signal corresponding to the target analog audio signal.
11. A video recorder, characterized in that: The method comprises a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor, and the processor is prompted by the machine-executable instructions to implement the method according to any one of claims 8 to 9.
Citation Information
Patent Citations
Method for wireless audio single-frequency multichannel transmission
CN103560851A
Transmission of multichannel speech signal and receiving process equipment and system
CN207676652U