CN111107296A - Audio data acquisition method and device, electronic equipment and readable storage medium - Google Patents

Audio data acquisition method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN111107296A
CN111107296A CN201911176202.0A CN201911176202A CN111107296A CN 111107296 A CN111107296 A CN 111107296A CN 201911176202 A CN201911176202 A CN 201911176202A CN 111107296 A CN111107296 A CN 111107296A
Authority
CN
China
Prior art keywords
audio
data acquisition
acquisition
data
equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911176202.0A
Other languages
Chinese (zh)
Other versions
CN111107296B (en
Inventor
王治军
赵广石
潘廷勇
王艳辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Visionvera Information Technology Co Ltd
Original Assignee
Visionvera Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Visionvera Information Technology Co Ltd filed Critical Visionvera Information Technology Co Ltd
Priority to CN201911176202.0A priority Critical patent/CN111107296B/en
Publication of CN111107296A publication Critical patent/CN111107296A/en
Application granted granted Critical
Publication of CN111107296B publication Critical patent/CN111107296B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/14Systems for two-way working
    • H04N7/141Systems for two-way working between two video terminals, e.g. videophone
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/14Systems for two-way working
    • H04N7/15Conference systems

Abstract

The embodiment of the application provides an audio data acquisition method, an audio data acquisition device, electronic equipment and a readable storage medium, wherein the method is applied to a terminal, the terminal is provided with a plurality of Universal Serial Bus (USB) interfaces, and the method comprises the following steps: when a USB interface of the terminal is accessed to data acquisition equipment with an audio data acquisition function, determining the data acquisition equipment as target equipment for executing audio data acquisition; detecting whether the plurality of USB interfaces are connected with new audio acquisition equipment or not; when the audio acquisition equipment is detected to be accessed, determining a first audio quality priority corresponding to the data acquisition equipment and a second audio quality priority corresponding to the audio acquisition equipment; and when the first audio quality priority is lower than the second audio quality priority, switching the target equipment for executing the audio data acquisition to the audio acquisition equipment. The method and the device can improve the quality of the audio data collected in the audio and video conference.

Description

Audio data acquisition method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of data acquisition technologies, and in particular, to an audio data acquisition method and apparatus, an electronic device, and a readable storage medium.
Background
With the continuous development of network communication technology, various instant messaging applications are widely applied, for example, a user can perform a video call or a voice call through the instant messaging application, and also perform a video conference and the like.
Taking a video conference as an example, for the requirement of keeping the content of some video conferences secret, a terminal which is often required to be used is externally connected with a camera device or a microphone, the camera device is connected when the terminal participates in the video conference, and the camera device is pulled out when the terminal quits the video conference. The terminal used by most users is a terminal provided with an android system, but when the existing android terminal adopts the camera equipment to collect audio and video, the audio collecting function of the camera equipment is poor, and the problems of unclear audio and noise at the bottom are caused. Therefore, the quality of the audio data collected by the existing android terminal needs to be improved.
Disclosure of Invention
In view of the above, embodiments of the present application are proposed to provide an audio data acquisition method, an apparatus, an electronic device and a readable storage medium that overcome or at least partially solve the above problems.
In a first aspect, an embodiment of the present application discloses an audio data acquisition method, where the method is applied to a terminal, and the terminal is configured with a plurality of USB interfaces, and the method includes:
when a USB interface of the terminal is accessed to data acquisition equipment with an audio data acquisition function, determining the data acquisition equipment as target equipment for executing audio data acquisition;
detecting whether the plurality of USB interfaces are connected with new audio acquisition equipment or not;
when the audio acquisition equipment is detected to be accessed, determining a first audio quality priority corresponding to the data acquisition equipment and a second audio quality priority corresponding to the audio acquisition equipment;
and when the first audio quality priority is lower than the second audio quality priority, switching the target equipment for executing the audio data acquisition to the audio acquisition equipment.
Optionally, after switching a target device performing the audio data acquisition to the audio acquisition device, the method further includes:
and when the audio acquisition device is determined to be removed, switching the target device for executing the audio data acquisition to the data acquisition device again.
Optionally, the data acquisition device further has a video data acquisition function, the terminal is in communication connection with a streaming media server, and the method further includes:
determining the data acquisition device as a video acquisition device performing video data acquisition;
while switching a target device that performs the audio data collection to the audio collection device, the method further includes:
acquiring video data acquired by the data acquisition equipment and acquiring audio data acquired by the audio acquisition equipment;
and mixing the audio data and the video data into audio and video data, and sending the audio and video data to the streaming media server.
Optionally, before detecting whether the plurality of USB interfaces are connected to a new audio capture device, the method further includes:
determining a first device ID corresponding to the data acquisition device, and adding the first device ID into a preset routing list;
determining a first audio quality priority corresponding to the data acquisition device and a second audio quality priority corresponding to the audio acquisition device, including:
determining a second device ID corresponding to the audio acquisition device, and acquiring the first device ID from the routing list;
and determining a first audio quality priority corresponding to the data acquisition device and a second audio quality priority corresponding to the audio acquisition device based on the first device ID and the second device ID.
Optionally, after determining the second device ID of the audio capture device, the method further comprises:
adding the second device ID to the routing list;
determining whether the audio capture device is removed and determining whether the data capture device is removed;
deleting the first device ID from the routing list upon determining that the data collection device is removed;
deleting the second device ID from the routing list upon determining that the audio capture device is removed.
In a second aspect, an embodiment of the present application discloses an audio data acquisition device, where the device is applied to a terminal, and the terminal is configured with a plurality of USB interfaces, and the device includes:
the audio acquisition determining module is used for determining the data acquisition equipment as target equipment for executing audio data acquisition when the USB interface of the terminal is accessed to the data acquisition equipment with the audio data acquisition function;
the audio equipment detection module is used for detecting whether the USB interfaces are connected with new audio acquisition equipment or not;
the priority determining module is used for determining a first audio quality priority corresponding to the data acquisition equipment and a second audio quality priority corresponding to the audio acquisition equipment when the audio acquisition equipment is detected to be accessed;
and the audio acquisition switching module is used for switching the target equipment for executing the audio data acquisition to the audio acquisition equipment when the first audio quality priority is lower than the second audio quality priority.
Optionally, the apparatus further comprises:
the device ID determining unit may be configured to determine a first device ID corresponding to the data acquisition device;
a device ID adding unit, configured to add the first device ID to a preset routing list;
the priority determination module may specifically include the following units:
the device ID determining unit may be configured to determine a second device ID corresponding to the audio capturing device;
the device ID acquisition unit is used for acquiring a first device ID corresponding to the data acquisition device from a preset routing list;
a priority determining unit, configured to determine, based on the first device ID and the second device ID, a first audio quality priority corresponding to the first audio capturing device and a second audio quality priority corresponding to the data capturing device.
Optionally, the data acquisition device further has a video data acquisition function, the terminal is in communication connection with a streaming media server, and the apparatus further includes:
a video data acquisition determining module for determining the data acquisition device as a video acquisition device for performing video data acquisition;
the audio and video data acquisition module is used for acquiring the video data acquired by the data acquisition equipment and acquiring the audio data acquired by the audio acquisition equipment;
and the audio and video data sending module is used for mixing the audio data and the video data into audio and video data and sending the audio and video data to the streaming media server.
In a third aspect, an embodiment of the present application provides an electronic device, including:
one or more processors; and
one or more machine readable media having instructions stored thereon, which when executed by the one or more processors, cause the apparatus to perform the audio data acquisition method of the first aspect.
In a fourth aspect, an embodiment of the present application is a computer-readable storage medium storing a computer program for causing a processor to execute the audio data acquisition method according to the first aspect.
The embodiment of the application has the following advantages:
in this embodiment of the application, when the USB interface of the terminal is connected to the data acquisition device, the data acquisition device may be determined as a target device for acquiring audio data, and it is detected whether a plurality of USB of the terminal are connected to a new audio acquisition device, when the new audio acquisition device is connected, a first audio quality priority of the data acquisition device and a second audio quality priority of the audio acquisition device are determined, and when the second audio quality priority of the audio acquisition device is higher than the first audio quality priority, the new audio acquisition device is determined as the target device for acquiring audio data, that is, the new audio acquisition device acquires audio data. The terminal is provided with the USB interfaces and can identify the newly accessed audio acquisition equipment, and when the audio quality priority of the newly accessed audio acquisition equipment is higher, the audio data can be acquired by the new audio acquisition equipment.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments of the present application will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a schematic diagram of a terminal to which an audio data acquisition method according to an embodiment of the present application is applied;
FIG. 2 is a flow chart illustrating steps of a method for audio data acquisition according to an embodiment of the present application;
FIG. 3 is a schematic view of a complete flow chart of a method for actually performing audio data acquisition according to an embodiment of the present application;
fig. 4 is a block diagram of an audio data acquisition apparatus according to an embodiment of the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description.
In order to solve the problem that the quality of audio data acquired by the existing terminal is not high, the applicant finds that the existing terminal mainly connects the camera device and the microphone through the USB, but the terminal can identify all devices (whether the camera device or the microphone) connected through the USB as an audio device, that is, only the audio device which is firstly plugged into the USB can be identified.
For example, the camera apparatus 1 (having an Audio capture function) is plugged into the USB1, the terminal recognizes USB-Audio and uses the apparatus, and when the USB2 is plugged into the high-quality microphone 2, the terminal continues to recognize USB-Audio and does not process the post-access apparatus. In this way, it results that audio data is still captured by the image pickup apparatus 1, but the audio capturing effect of the image pickup apparatus is not good, so that the quality of the audio data is not improved. In general, the microphone 2 can be used again to collect high-quality audio data only by unplugging the camera device 1 and the microphone 2 and then reinserting the microphone 2. Therefore, the camera device 1 cannot collect video data, and the user has to change the video conference into an audio conference, which affects the user experience. In addition, the process of pulling out all devices can cause a large amount of audio data to be lost, which causes the video conference to be inefficient.
Therefore, the applicant provides the audio data acquisition method in the embodiment of the application, so that in the process of acquiring the audio data, the acquisition of the audio data by using a new high-quality audio acquisition device can be switched to, the quality of the audio data in the video conference can be improved, the user experience can be optimized, and the efficiency of the video conference can be improved.
Referring to fig. 1, a schematic diagram of a terminal to which an audio data acquisition method according to an embodiment of the present invention is applied is shown, and as shown in fig. 1, a plurality of USB interfaces may be configured on the terminal, where the USB interfaces may be used to access devices with an audio data acquisition function, such as a microphone 11, a camera device 12 with an audio acquisition function, and the like. The terminal can be a terminal running an android system or a linux system, and the method can be particularly applied to an audio and video conference scene.
Referring to fig. 2, a flowchart illustrating steps of an audio data acquisition method according to an embodiment of the present application is shown, and the audio data acquisition method according to the embodiment of the present application is described in detail with reference to the terminal shown in fig. 1, where the method specifically includes the following steps:
and step S21, when the USB interface of the terminal is accessed to the data acquisition equipment with the audio data acquisition function, determining the data acquisition equipment as the target equipment for executing audio data acquisition.
In this embodiment, the data acquisition device may be a device having only an audio data acquisition function, such as a microphone, or may be a device having other data acquisition functions besides the audio data acquisition function, such as a camera device capable of acquiring audio. Wherein, other data acquisition functions can be used to refer to video data acquisition functions or image acquisition functions. When any one of the plurality of USB interfaces of the terminal is connected with the data acquisition device, it may be determined that the data acquisition device performs audio data acquisition. Furthermore, when the audio and video conference starts, the data acquisition equipment can acquire audio data.
In an optional example, after the USB interface of the terminal is connected to the data acquisition device, it may be determined that the data acquisition device performs audio data acquisition when the terminal performs an audio/video service, that is, the data acquisition device performs audio data acquisition when the terminal performs the audio/video service. If the terminal performs a video service, the data acquisition device may be a device having a video data acquisition function and an audio data acquisition function, and the data acquisition device may acquire audio data and video data. If the terminal performs the audio service, the data acquisition device may only acquire audio data.
Illustratively, as shown in fig. 1, when the terminal 100 is currently connected to the camera device 12 having an audio data acquisition function, the camera device 12 may be determined as a target device for performing audio data acquisition.
And step S22, detecting whether the USB interfaces are connected with new audio acquisition equipment.
In the embodiment of the application, because the terminal is configured with the plurality of USB interfaces, after the terminal is connected with the data acquisition device, the terminal can start scanning the plurality of USB interfaces to detect whether other USB interfaces are connected with new audio acquisition devices. Specifically, the new audio collecting device may be a device newly accessed after the data collecting device is accessed, and the audio collecting device and the data collecting device are respectively connected to different USB interfaces. The audio capture device may be used for audio data capture, such as a microphone.
Step S23, when it is detected that the audio capturing device is accessed, determining a first audio quality priority corresponding to the data capturing device and a second audio quality priority corresponding to the audio capturing device.
In practice, when it is detected that one USB interface of the terminal is connected to the audio acquisition device, the terminal may start an audio routing policy for the data acquisition device and the audio acquisition device to perform switching of audio data acquisition between the data acquisition device and the audio acquisition device, so that the audio data acquisition may be performed by a device with higher audio acquisition quality.
Specifically, since different devices perform audio data acquisition at different sampling rates, the quality of the finally acquired audio data is different. Thus, the respective audio quality priorities of the audio capture device and the data capture device may be determined first. The first audio quality priority may refer to a priority of audio quality of the audio data collected by the data collection device, and the second audio quality priority may refer to a priority of audio quality of the audio data collected by the data collection device.
In practice, the higher the sampling rate, the better the audio quality, and the higher the audio quality priority. Thus, a first audio quality priority may be determined based on the sampling rate of the data acquisition device and a second audio quality priority may be determined based on the sampling rate of the audio acquisition device.
For example, as shown in fig. 1, after accessing the camera device 12, the terminal 100 may detect whether other USB interfaces access a new audio capture device, for example, when detecting that other USB interfaces access the microphone 11 again, the audio quality priority of the microphone 11 and the audio quality priority of the camera device 12 may be determined.
Step S24, when the first audio quality priority is lower than the second audio quality priority, switching the target device that performs the audio data collection to the audio collection device.
In the embodiment of the application, when the second audio quality priority is higher than the first audio quality priority, it indicates that the sampling rate of the newly accessed audio acquisition device is higher, and compared with the data acquisition device, the acquired audio quality is better, and the audio acquisition device can be used as a target device for acquiring audio data.
In specific implementation, before the audio acquisition device is connected, the target device executing the audio data acquisition is the data acquisition device, and when the second audio quality priority of the audio acquisition device is determined to be higher, the routing policy can be executed to initialize the audio acquisition, so that the target device executing the audio data acquisition is switched to the audio acquisition device. Therefore, the data acquisition equipment does not execute audio data acquisition any more, and the audio acquisition equipment executes the audio data acquisition instead, so that the quality of the acquired audio is improved in the audio and video conference. And because this application switches as the target equipment of audio data acquisition between a plurality of equipment, then can keep the video data acquisition function of video data acquisition equipment, guaranteed that video data acquisition is not influenced in the video conference.
For example, as shown in fig. 1, if it is determined that the audio quality priority of the microphone 11 is higher than the audio quality priority of the image pickup apparatus 12, the microphone 11 may be determined instead as the target apparatus that performs audio data collection, and the image pickup apparatus 12 may no longer perform audio data collection.
In this embodiment of the application, when the terminal is connected to the data acquisition device, the data acquisition device may be determined as a target device for acquiring audio data, and it is detected whether a plurality of USB of the terminal are connected to a new audio acquisition device, when the new audio acquisition device is connected, a first audio quality priority of the data acquisition device and a second audio quality priority of the audio acquisition device are determined, and when the second audio quality priority of the audio acquisition device is higher than the first audio quality priority, the new audio acquisition device is determined as the target device for acquiring audio data, that is, the new audio acquisition device acquires audio data.
The terminal is provided with the USB interfaces and can identify the newly accessed audio acquisition equipment, and when the audio quality priority of the audio acquisition equipment is higher, the audio data can be acquired by the new audio acquisition equipment.
And the terminal can automatically detect whether a new audio acquisition device is accessed, and automatically switch to the audio acquisition device to acquire audio data when the audio quality priority of the accessed new audio acquisition device is higher, so that interruption of audio acquisition and video acquisition caused by reinsertion of the audio acquisition device after the audio acquisition device and the data acquisition device are completely pulled out is avoided, and normal operation of a video conference is ensured.
With reference to the foregoing embodiment, in order to ensure that the video conference is normally performed, and avoid the problem that the audio data cannot be acquired because the connection with the terminal is interrupted in the process of acquiring the audio data by the high-quality audio acquisition device, in an optional implementation manner, after step S24, the audio data acquisition method may further include the following steps:
and step S25, when the audio acquisition device is determined to be removed, the target device for executing the audio data acquisition is switched to the data acquisition device again.
In this optional example, when it is determined that audio data is captured by the audio capturing apparatus, it may be determined whether the audio capturing apparatus is removed by detecting a connection state of the audio capturing apparatus with the terminal. If the audio acquisition device is detected to be disconnected from the terminal, the audio acquisition device can be indicated to be removed. At this time, in order not to affect the normal acquisition of audio data, the data acquisition device may be newly determined as the device that performs the audio data acquisition, that is, the acquisition of audio data by the data acquisition device is resumed.
Illustratively, if the microphone 11 is disconnected from the terminal, the capturing of audio data may be performed by the camera device 12.
With the above embodiment, in order to ensure normal operation of the video conference performed by the user, the data acquisition device further has a video data acquisition function, so that the data acquisition device can not only acquire audio data but also acquire video data. In an optional example, the terminal is communicatively connected to a streaming media server, and the streaming media server may be configured to forward audio and video data in an audio and video conference in which the terminal currently participates. Specifically, the method may further include the steps of:
step S211, determining the data acquisition device as a video acquisition device performing video data acquisition.
In this alternative embodiment, this step S211 may be performed simultaneously with step S21, that is, when the data capture device is determined as the target device for performing audio data capture, the data capture device may also be determined as the device for performing video data capture. For example, when it is determined that audio data collection is performed, the image pickup apparatus 12 may also determine that video data collection is performed by the image pickup apparatus 12.
In step S24, while switching the target device that performs the audio data collection to the audio collection device, the following steps may also be performed:
and step S41, acquiring the video data acquired by the data acquisition equipment and acquiring the audio data acquired by the audio acquisition equipment.
In this optional embodiment, when the target device that executes the audio data acquisition is switched to the audio acquisition device, the audio data acquisition device may acquire the audio data and the video data acquisition device may acquire the video data in the currently performed audio/video conference. Furthermore, the terminal can acquire video data acquired by the data acquisition equipment and audio data acquired by the audio acquisition equipment.
And step S42, mixing the audio data and the video data into audio and video data, and sending the audio and video data to the streaming media server.
In this optional embodiment, since the audio data and the video data are respectively collected by different devices, the terminal may mix the audio data and the video data to obtain the audio and video data. Specifically, the audio data and the video data may be mixed into audio-video data according to a time stamp included in the audio data and a time stamp included in the video data, so as to achieve synchronization of a video picture and audio. And then, the audio and video data can be sent to the streaming media server.
The streaming media server can send the audio and video data of the terminal to other terminal devices participating in the currently-performed audio and video conference.
With the above embodiments, in order to implement unified management on the devices of the access terminal, the conditions of the devices of the access terminal can be monitored in real time. In an alternative example, before step S20, the following steps may also be performed:
step S00, determining a first device ID corresponding to the data acquisition device, and adding the first device ID to a preset routing list.
The routing list may be used to store the ID of the device that has accessed the terminal, that is, the terminal may add the ID of the device that has accessed itself to the routing list, so as to monitor the condition of the device that has accessed the terminal in real time through the routing list.
In the embodiment of the application, since the data acquisition device has access to the terminal, the ID of the data acquisition device may be added to the routing list. Specifically, a first device ID corresponding to the data acquisition may be determined first. The first device ID may refer to an ID corresponding to a device type of the data acquisition device, and the ID may be a character string or a numeric code. The device type refers to the device model of the data acquisition device, and if the device models of the two data acquisition devices are the same, the performance of the two data acquisition devices is the same. In this embodiment, two devices having the same device model may have the same device ID.
For example, as shown in fig. 1, a first device ID of the camera device 12 may be determined according to the device type of the camera device 12, and the first device ID may be added to the routing list to represent that the device of the current access terminal is the camera device 12.
Accordingly, the determination of the first audio quality priority of the data capture device and the second audio quality priority of the audio capture device in step S23 may be performed by:
step S231, determining a second device ID corresponding to the audio capture device, and acquiring the first device ID from the routing list.
When detecting that the audio acquisition device is accessed, a second device ID may be determined, where the second device ID may refer to an ID corresponding to a device type of the audio acquisition device. And may obtain the first device ID of the data collection device from the routing list. Since the terminal can acquire the first device ID of the data acquisition device from the routing list when determining the audio quality priority, it is practical to acquire the ID of the device already connected to the terminal. The newly accessed device may then be compared to the already accessed devices for audio quality priority.
Step S232, determining a first audio quality priority corresponding to the data acquisition device and a second audio quality priority corresponding to the audio acquisition device based on the first device ID and the second device ID.
In this optional embodiment, since the first device ID corresponds to the device type of the data acquisition device and the second device ID corresponds to the device type of the audio acquisition device, since the device types may reflect the performance of one device, the device types are different and the performances are different. And then can confirm first audio quality priority and second audio quality priority fast through first equipment ID and second equipment ID, and then can improve the switching efficiency of audio data collection.
Specifically, a priority comparison table may be pre-stored in the terminal, and the audio quality priority corresponding to each device ID may be written in the priority comparison table, so that the first audio quality priority corresponding to the first device ID and the second audio quality priority corresponding to the second device ID may be determined according to the priority comparison table.
Accordingly, in order to avoid that the removed device is also used as an audio data acquisition device for quality priority comparison during switching of audio data acquisition, and improve the efficiency of audio data acquisition of the present application, in an optional example, after determining the second device ID of the audio data acquisition device, the method may further include the following steps:
step S233, add the second device ID to the routing list.
In practice, step S233 may be performed while step S231 is executed, or may be performed after step S232. Specifically, after the second device ID is added to the routing list, it can be represented that the terminal currently has an audio capture device.
Step S26, determining whether the audio capture device is removed, and determining whether the data capture device is removed.
In this optional embodiment, after step S24 is completed, in order to implement real-time monitoring on the devices accessing the terminal, the connection states of the data acquisition device and the audio acquisition device with the terminal may be further detected to determine whether the audio acquisition device is removed and whether the data acquisition device is removed.
Specifically, if the disconnection of the connection state of the data acquisition device and the terminal is detected, it is determined that the data acquisition device is removed, and if the disconnection of the connection state of the audio acquisition device and the terminal is detected, it is determined that the audio acquisition device is removed.
Step S261, when it is determined that the data collection device is removed, delete the first device ID from the routing list.
Step S262, deleting the second device ID from the routing list when it is determined that the audio capture device is removed.
In practice, the first device ID may be deleted from the routing list upon determining that the data capture device is removed, and the second device ID may be deleted from the routing list upon determining that the audio capture device is removed. Therefore, the problem that the audio data cannot be collected when the newly accessed equipment is the equipment with low audio quality priority due to the fact that the removed equipment still exists in the equipment routing list and the audio quality priority is compared with the equipment which is newly accessed later is solved.
Referring to fig. 3, a complete flow diagram illustrating an actual execution of the audio data acquisition method is shown, in fig. 3, V2Vapp refers to an audio/video application APP installed on a terminal, where the APP may be applied to a video network, and a user may perform an audio/video call in the video network through the V2 Vapp. The video network adopts a real-time high-definition video exchange technology, can integrate required services such as dozens of services of videos, voices, pictures, characters, communication, data and the like on a system platform on a network platform, such as high-definition video conferences, video monitoring, intelligent monitoring analysis, emergency command, digital broadcast televisions, delay televisions, network teaching, live broadcast, VOD on demand, television mails, Personal Video Recorder (PVR), intranet (self-office) channels, intelligent video broadcast control, information distribution and the like, and realizes high-definition quality video playing through televisions or computers.
Specifically, the method comprises the following steps:
first, when the V2Vapp service is started, audio acquisition may be initialized, that is, the audio acquisition is initialized, so that the terminal may start acquiring audio data. Specifically, the terminal may collect the audio data by using a data collection device that has been accessed to the terminal, where the support device ID described in fig. 3 is a first device ID of the data collection device.
And then, scanning the audio equipment, and detecting whether other USB interfaces are connected with new audio acquisition equipment. When a new audio capture device is accessed, the ID of the new audio capture device may be obtained. In fig. 3, the insertion device ID refers to the second device ID of the new audio capture device.
Then, routing policy enforcement, that is, determination of the priority level between the support device and the plug-in device, is performed to determine whether switching of audio data acquisition is required. In fig. 3, whether the audio module needs to be restarted refers to determining whether audio data collection is switched to be performed by the insertion device. The audio module can be understood as a module for controlling audio data acquisition in the terminal.
And then, if the audio module does not need to be restarted, the acquisition is started, and the supporting equipment acquires audio data. And if the audio module needs to be restarted, reinitializing the audio acquisition to stop the current supporting equipment from acquiring the audio data, and switching to execute the audio data acquisition by the inserting equipment.
Finally, the acquired audio data is acquired, and in fig. 3, the use of the audio data means that the audio data is played or sent to an opposite-end user performing audio and video communication.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the embodiments. Further, those skilled in the art will also appreciate that the embodiments described in the specification are presently preferred and that no particular act is required of the embodiments of the application.
Referring to fig. 4, a block diagram of an audio data acquisition apparatus according to an embodiment of the present disclosure is shown, where the apparatus may be applied to a terminal, and the terminal may be configured with a plurality of USB interfaces, and the apparatus may specifically include the following modules:
the audio acquisition determining module 41 may be configured to determine, when the USB interface of the terminal is connected to a data acquisition device having an audio data acquisition function, the data acquisition device as a target device for performing audio data acquisition;
an audio device detecting module 42, configured to detect whether the multiple USB interfaces are connected to a new audio capturing device;
a priority determining module 43, configured to determine, when the access to the audio capturing device is detected, a first audio quality priority corresponding to the data capturing device and a second audio quality priority corresponding to the audio capturing device;
an audio capture switching module 44, configured to switch a target device that performs the audio data capture to the audio capture device when the first audio quality priority is lower than the second audio quality priority.
Optionally, the apparatus may further include the following modules:
and the audio equipment switching module is used for switching the target equipment for executing the audio data acquisition into the data acquisition equipment again when the audio acquisition equipment is determined to be removed.
Optionally, the apparatus may further include the following modules:
the device ID determining unit may be configured to determine a first device ID corresponding to the data acquisition device;
a device ID adding unit, configured to add the first device ID to a preset routing list;
the priority determining module 43 may specifically include the following units:
the device ID determining unit may be configured to determine a second device ID corresponding to the audio capturing device;
the device ID acquisition unit is used for acquiring a first device ID corresponding to the data acquisition device from a preset routing list;
a priority determining unit, configured to determine a first audio quality priority corresponding to the first audio capturing device and a second audio quality priority corresponding to the data capturing device based on the first device ID and the second device ID.
Accordingly, in an optional example, the device ID adding unit may be further specifically configured to add the second device ID to the routing list;
the device may further include the following modules:
a device removal determination module operable to determine whether the audio capture device is removed and to determine whether the data capture device is removed;
a device ID deletion module, configured to delete the first device ID from the routing list when it is determined that the data collection device is removed; and may be configured to delete the second device ID from the routing list upon determining that the audio capture device is removed.
Optionally, the data acquisition device further has a video data acquisition function, the terminal is in communication connection with the streaming media server, and the apparatus may further include the following modules:
a video data acquisition determination module operable to determine the data acquisition device as a video acquisition device to perform video data acquisition;
the audio and video data acquisition module can be used for acquiring the video data acquired by the data acquisition equipment and acquiring the audio data acquired by the audio acquisition equipment;
and the audio and video data sending module can be used for mixing the audio data and the video data into audio and video data and sending the audio and video data to the streaming media server.
For the embodiment of the audio data acquisition device, since it is basically similar to the embodiment of the audio data acquisition method, the description is relatively simple, and for relevant points, reference may be made to part of the description of the embodiment of the audio data acquisition method.
An embodiment of the present application further provides an electronic device, including:
one or more processors; and
one or more machine readable media having instructions stored thereon that, when executed by the one or more processors, cause the apparatus to perform one or more audio data acquisition methods as described in embodiments herein.
Embodiments of the present application further provide a computer-readable storage medium storing a computer program for enabling a processor to execute the audio data acquisition method according to the embodiments of the present application.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one of skill in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the true scope of the embodiments of the application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The foregoing detailed description has provided a method for collecting audio data, an apparatus for collecting audio data, an electronic device, and a computer-readable storage medium, and specific examples have been applied to illustrate the principles and embodiments of the present application, and the above description of the embodiments is only provided to help understand the method and its new ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. An audio data acquisition method is applied to a terminal, wherein the terminal is provided with a plurality of Universal Serial Bus (USB) interfaces, and the method comprises the following steps:
when a USB interface of the terminal is accessed to data acquisition equipment with an audio data acquisition function, determining the data acquisition equipment as target equipment for executing audio data acquisition;
detecting whether the plurality of USB interfaces are connected with new audio acquisition equipment or not;
when the audio acquisition equipment is detected to be accessed, determining a first audio quality priority corresponding to the data acquisition equipment and a second audio quality priority corresponding to the audio acquisition equipment;
and when the first audio quality priority is lower than the second audio quality priority, switching the target equipment for executing the audio data acquisition to the audio acquisition equipment.
2. The method of claim 1, wherein after switching a target device performing the audio data capture to the audio capture device, the method further comprises:
and when the audio acquisition device is determined to be removed, switching the target device for executing the audio data acquisition to the data acquisition device again.
3. The method of claim 1, wherein the data acquisition device further comprises a video data acquisition function, and the terminal is communicatively connected to a streaming server, and the method further comprises:
determining the data acquisition device as a video acquisition device performing video data acquisition;
while switching a target device that performs the audio data collection to the audio collection device, the method further includes:
acquiring video data acquired by the data acquisition equipment and acquiring audio data acquired by the audio acquisition equipment;
and mixing the audio data and the video data into audio and video data, and sending the audio and video data to the streaming media server.
4. The method of claim 1, wherein prior to detecting whether the plurality of USB interfaces are coupled to a new audio capture device, the method further comprises:
determining a first device ID corresponding to the data acquisition device, and adding the first device ID into a preset routing list;
determining a first audio quality priority corresponding to the data acquisition device and a second audio quality priority corresponding to the audio acquisition device, including:
determining a second device ID corresponding to the audio acquisition device, and acquiring the first device ID from the routing list;
and determining a first audio quality priority corresponding to the data acquisition device and a second audio quality priority corresponding to the audio acquisition device based on the first device ID and the second device ID.
5. The method of claim 4, wherein after determining the second device ID of the audio capture device, the method further comprises:
adding the second device ID to the routing list;
determining whether the audio capture device is removed and determining whether the data capture device is removed;
deleting the first device ID from the routing list upon determining that the data collection device is removed;
deleting the second device ID from the routing list upon determining that the audio capture device is removed.
6. An audio data acquisition device, wherein the device is applied to a terminal, the terminal is configured with a plurality of USB interfaces, the device comprises:
the audio acquisition determining module is used for determining the data acquisition equipment as target equipment for executing audio data acquisition when the USB interface of the terminal is accessed to the data acquisition equipment with the audio data acquisition function;
the audio equipment detection module is used for detecting whether the USB interfaces are connected with new audio acquisition equipment or not;
the priority determining module is used for determining a first audio quality priority corresponding to the data acquisition equipment and a second audio quality priority corresponding to the audio acquisition equipment when the audio acquisition equipment is detected to be accessed;
and the audio acquisition switching module is used for switching the target equipment for executing the audio data acquisition to the audio acquisition equipment when the first audio quality priority is lower than the second audio quality priority.
7. The apparatus of claim 6, further comprising:
the device ID determining unit may be configured to determine a first device ID corresponding to the data acquisition device;
a device ID adding unit, configured to add the first device ID to a preset routing list;
the priority determination module may specifically include the following units:
the device ID determining unit may be configured to determine a second device ID corresponding to the audio capturing device;
the device ID acquisition unit is used for acquiring a first device ID corresponding to the data acquisition device from a preset routing list;
a priority determining unit, configured to determine, based on the first device ID and the second device ID, a first audio quality priority corresponding to the first audio capturing device and a second audio quality priority corresponding to the data capturing device.
8. The apparatus according to claim 6, wherein the data acquisition device further has a video data acquisition function, the terminal is communicatively connected to a streaming media server, and the apparatus further comprises:
a video data acquisition determining module for determining the data acquisition device as a video acquisition device for performing video data acquisition;
the audio and video data acquisition module is used for acquiring the video data acquired by the data acquisition equipment and acquiring the audio data acquired by the audio acquisition equipment;
and the audio and video data sending module is used for mixing the audio data and the video data into audio and video data and sending the audio and video data to the streaming media server.
9. An electronic device, comprising:
one or more processors; and
one or more machine readable media having instructions stored thereon that, when executed by the one or more processors, cause the apparatus to perform one or more of the audio data acquisition methods of claims 1-5.
10. A computer-readable storage medium storing a computer program for causing a processor to execute the audio data acquisition method according to any one of claims 1 to 5.
CN201911176202.0A 2019-11-26 2019-11-26 Audio data acquisition method and device, electronic equipment and readable storage medium Active CN111107296B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911176202.0A CN111107296B (en) 2019-11-26 2019-11-26 Audio data acquisition method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911176202.0A CN111107296B (en) 2019-11-26 2019-11-26 Audio data acquisition method and device, electronic equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN111107296A true CN111107296A (en) 2020-05-05
CN111107296B CN111107296B (en) 2022-12-23

Family

ID=70421262

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911176202.0A Active CN111107296B (en) 2019-11-26 2019-11-26 Audio data acquisition method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN111107296B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114257572A (en) * 2020-09-11 2022-03-29 腾讯科技(深圳)有限公司 Data processing method and device, computer readable medium and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004248125A (en) * 2003-02-17 2004-09-02 Nippon Telegr & Teleph Corp <Ntt> Device and method for switching video, program for the method, and recording medium with the program recorded thereon
CN106255000A (en) * 2016-07-29 2016-12-21 维沃移动通信有限公司 A kind of audio signal sample method and mobile terminal
US20180139554A1 (en) * 2016-04-29 2018-05-17 Huawei Technologies Co., Ltd. Voice Input Exception Determining Method, Apparatus, Terminal, and Storage Medium
CN109257558A (en) * 2017-07-12 2019-01-22 中兴通讯股份有限公司 Audio/video acquisition method, device and the terminal device of video conferencing
CN109743524A (en) * 2018-12-03 2019-05-10 视联动力信息技术股份有限公司 A kind of data processing method that view is networked and a kind of view networked system
CN109743525A (en) * 2018-12-03 2019-05-10 视联动力信息技术股份有限公司 A kind of collecting method and device
CN110225195A (en) * 2019-05-30 2019-09-10 维沃移动通信有限公司 A kind of audio communication method and terminal

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004248125A (en) * 2003-02-17 2004-09-02 Nippon Telegr & Teleph Corp <Ntt> Device and method for switching video, program for the method, and recording medium with the program recorded thereon
US20180139554A1 (en) * 2016-04-29 2018-05-17 Huawei Technologies Co., Ltd. Voice Input Exception Determining Method, Apparatus, Terminal, and Storage Medium
CN106255000A (en) * 2016-07-29 2016-12-21 维沃移动通信有限公司 A kind of audio signal sample method and mobile terminal
CN109257558A (en) * 2017-07-12 2019-01-22 中兴通讯股份有限公司 Audio/video acquisition method, device and the terminal device of video conferencing
CN109743524A (en) * 2018-12-03 2019-05-10 视联动力信息技术股份有限公司 A kind of data processing method that view is networked and a kind of view networked system
CN109743525A (en) * 2018-12-03 2019-05-10 视联动力信息技术股份有限公司 A kind of collecting method and device
CN110225195A (en) * 2019-05-30 2019-09-10 维沃移动通信有限公司 A kind of audio communication method and terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114257572A (en) * 2020-09-11 2022-03-29 腾讯科技(深圳)有限公司 Data processing method and device, computer readable medium and electronic equipment
CN114257572B (en) * 2020-09-11 2023-11-24 腾讯科技(深圳)有限公司 Data processing method, device, computer readable medium and electronic equipment

Also Published As

Publication number Publication date
CN111107296B (en) 2022-12-23

Similar Documents

Publication Publication Date Title
CN108012161B (en) Video live broadcast method, system and terminal equipment
US9024999B2 (en) Information processing apparatus, conference system, and storage medium
WO2020248909A1 (en) Video decoding method and apparatus, computer device, and storage medium
EP2854342A1 (en) Multi-screen interaction method, apparatus, and terminal device
WO2020215453A1 (en) Video recording method and system
CN107484011B (en) Video resource decoding method and device
US20230144483A1 (en) Method for encoding video data, device, and storage medium
CN109155840B (en) Moving image dividing device and monitoring method
WO2021129830A1 (en) Video transmission method, apparatus, device and system
CN103702198A (en) Cross-terminal continuous playing method and device
CN110740386B (en) Live broadcast switching method and device and storage medium
CN108391089B (en) Monitoring flow pushing method and device of multi-path camera and monitoring system
CN107040825B (en) Terminal, television, multi-screen interaction system and screen capture parameter setting method
CN103747326A (en) Continuous playing method and device for multimedia file
CN107027064A (en) The processing method and processing device of video file in wireless screen transmission
CN111105521A (en) Data reading method and device
CN111107296B (en) Audio data acquisition method and device, electronic equipment and readable storage medium
WO2015035934A1 (en) Methods and systems for facilitating video preview sessions
CN111107387B (en) Video transcoding method and device and computer storage medium
CN104853234A (en) Data processing method, system thereof and mobile terminal
CN111314648A (en) Information processing method, processing device, first electronic equipment and server
CN103347212B (en) The playing method and device of VOD program
CN108933769B (en) Streaming media screenshot system, method and device
CN113132808B (en) Video generation method and device and computer readable storage medium
CN112449209B (en) Video storage method and device, cloud server and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant