[go: up one dir, main page]

CN111199743B - Audio coding format determining method and device, storage medium and electronic equipment - Google Patents

Audio coding format determining method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN111199743B
CN111199743B CN202010129474.1A CN202010129474A CN111199743B CN 111199743 B CN111199743 B CN 111199743B CN 202010129474 A CN202010129474 A CN 202010129474A CN 111199743 B CN111199743 B CN 111199743B
Authority
CN
China
Prior art keywords
audio
format
audio coding
encoding
coding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010129474.1A
Other languages
Chinese (zh)
Other versions
CN111199743A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202010129474.1A priority Critical patent/CN111199743B/en
Publication of CN111199743A publication Critical patent/CN111199743A/en
Application granted granted Critical
Publication of CN111199743B publication Critical patent/CN111199743B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/005Correction of errors induced by the transmission channel, if related to the coding algorithm
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/04Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
    • G10L19/16Vocoder architecture
    • G10L19/167Audio streaming, i.e. formatting and decoding of an encoded audio signal representation into a data stream for transmission or storage purposes
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/04Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
    • G10L19/16Vocoder architecture
    • G10L19/18Vocoders using multiple modes
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis
    • G10L19/04Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis using predictive techniques
    • G10L19/16Vocoder architecture
    • G10L19/18Vocoders using multiple modes
    • G10L19/22Mode decision, i.e. based on audio signal content versus external parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Communication Control (AREA)

Abstract

The embodiment of the application discloses a method, a device, a storage medium and electronic equipment for determining an audio coding format, wherein the method comprises the following steps: acquiring a first audio coding format supported by Bluetooth audio equipment under an audio coding protocol and a first coding parameter corresponding to the first audio coding format, and when the first audio coding format is not matched with a second audio coding format supported by the terminal under the audio coding protocol and/or the first coding parameter is not matched with a second audio coding parameter corresponding to the second audio coding format, switching the second audio coding format into a default audio coding format under the audio coding protocol, and controlling to perform audio coding by adopting the default audio coding format. By adopting the embodiment of the application, the stability of Bluetooth audio connection between the terminal and the Bluetooth audio equipment can be improved, and the normal use of the Bluetooth audio function is ensured.

Description

音频编码格式确定方法、装置、存储介质及电子设备Audio coding format determination method, device, storage medium and electronic equipment

技术领域technical field

本申请涉及计算机技术领域,尤其涉及一种音频编码格式确定方法、装置、存储介质及电子设备。The present application relates to the field of computer technology, and in particular to a method, device, storage medium and electronic equipment for determining an audio coding format.

背景技术Background technique

蓝牙通信技术作为一种短距离无线通信方式,被广泛应用于终端和蓝牙音频设备中。终端(如智能手机)与蓝牙音频设备(如蓝牙音箱、蓝牙耳机)通过音频传输协议建立蓝牙音频连接,可以实现在蓝牙音频设备上播放音频数据。Bluetooth communication technology, as a short-distance wireless communication method, is widely used in terminals and Bluetooth audio devices. The terminal (such as a smart phone) establishes a Bluetooth audio connection with a Bluetooth audio device (such as a Bluetooth speaker, a Bluetooth headset) through an audio transmission protocol, so that audio data can be played on the Bluetooth audio device.

目前,采用蓝牙通信技术进行通信之前,需要先确定两设备之间的音频编码格式。一旦蓝牙音频设备与终端上优先确定的音频编码格式相同,即建立音频连接。当两者音频编码参数(如比特率、采样率等)不匹配时,就会导致音频连接中断,从而无法播放终端发送的蓝牙音频数据。At present, before using the Bluetooth communication technology for communication, it is necessary to determine the audio encoding format between the two devices. Once the bluetooth audio device is in the same audio encoding format as determined by priority on the terminal, an audio connection is established. When the two audio encoding parameters (such as bit rate, sampling rate, etc.) do not match, the audio connection will be interrupted, so that the Bluetooth audio data sent by the terminal cannot be played.

发明内容Contents of the invention

本申请实施例提供了一种音频编码格式确定方法、装置、存储介质及电子设备,可以提高终端与蓝牙音频设备间蓝牙音频连接的稳定性,保证蓝牙音频功能正常使用。所述技术方案如下:Embodiments of the present application provide a method, device, storage medium and electronic equipment for determining an audio encoding format, which can improve the stability of a Bluetooth audio connection between a terminal and a Bluetooth audio device, and ensure normal use of the Bluetooth audio function. Described technical scheme is as follows:

第一方面,本申请实施例提供了一种音频编码格式确定方法,所述方法包括:In the first aspect, the embodiment of the present application provides a method for determining an audio coding format, the method comprising:

获取蓝牙音频设备在音频编码协议下所支持的第一音频编码格式以及所述第一音频编码格式对应的第一编码参数;Obtain the first audio encoding format supported by the Bluetooth audio device under the audio encoding protocol and the first encoding parameters corresponding to the first audio encoding format;

确定所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式不匹配,和/或所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数不匹配,将所述第二音频编码格式切换为所述音频编码协议下的默认音频编码格式;Determine that the first audio encoding format does not match the second audio encoding format supported by the terminal under the audio encoding protocol, and/or the first encoding parameter corresponds to the second audio encoding format corresponding to the second audio encoding format The two audio encoding parameters do not match, switching the second audio encoding format to the default audio encoding format under the audio encoding protocol;

控制采用所述默认音频编码格式进行音频编码。Controls the use of the default audio encoding format for audio encoding.

第二方面,本申请实施例提供了一种音频编码格式确定装置,所述装置包括:In the second aspect, the embodiment of the present application provides an audio coding format determining device, the device comprising:

格式参数获取模块,用于获取蓝牙音频设备在音频编码协议下所支持的第一音频编码格式以及所述第一音频编码格式对应的第一编码参数;A format parameter acquisition module, configured to acquire the first audio encoding format supported by the Bluetooth audio device under the audio encoding protocol and the first encoding parameter corresponding to the first audio encoding format;

编码格式切换模块,用于所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式不匹配,和/或所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数不匹配,将所述第二音频编码格式切换为所述音频编码协议下的默认音频编码格式;A coding format switching module, used for the first audio coding format not matching the second audio coding format supported by the terminal under the audio coding protocol, and/or the first coding parameter not matching the second audio coding format The second audio encoding parameter corresponding to the audio encoding format does not match, and the second audio encoding format is switched to the default audio encoding format under the audio encoding protocol;

音频编码控制模块,用于控制采用所述默认音频编码格式进行音频编码。第三方面,本申请实施例提供一种计算机存储介质,所述计算机存储介质存储有多条指令,所述指令适于由处理器加载并执行上述的方法步骤。The audio coding control module is used to control the audio coding using the default audio coding format. In a third aspect, an embodiment of the present application provides a computer storage medium, where a plurality of instructions are stored in the computer storage medium, and the instructions are adapted to be loaded by a processor and execute the above method steps.

第四方面,本申请实施例提供一种电子设备,可包括:处理器和存储器;其中,所述存储器存储有计算机程序,所述计算机程序适于由所述处理器加载并执行上述的方法步骤。In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein, the memory stores a computer program, and the computer program is adapted to be loaded by the processor and execute the above-mentioned method steps .

本申请一些实施例提供的技术方案带来的有益效果至少包括:The beneficial effects brought by the technical solutions provided by some embodiments of the present application at least include:

在本申请一个或多个实施例中,终端通过获取蓝牙音频设备在音频编码协议下所支持的第一音频编码格式和所述第一音频编码格式对应的第一编码参数,在所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式不匹配,和/或所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数不匹配时,将所述第二音频编码格式切换为所述音频编码协议下终端以及蓝牙音频设备均支持的默认音频编码格式,以默认音频编码格式进行音频编码。可以避免在终端与蓝牙音频设备支持的蓝牙音频格式相同而对应的音频编码参数不匹配的情况下导致蓝牙音频连接中断的问题,提高了终端与蓝牙音频设备间蓝牙音频连接的稳定性,从而保证了蓝牙音频功能正常使用。In one or more embodiments of the present application, the terminal obtains the first audio coding format supported by the Bluetooth audio device under the audio coding protocol and the first coding parameter corresponding to the first audio coding format, and in the first The audio encoding format does not match the second audio encoding format supported by the terminal under the audio encoding protocol, and/or the first encoding parameter does not match the second audio encoding parameter corresponding to the second audio encoding format When matching, switch the second audio encoding format to the default audio encoding format supported by both the terminal and the Bluetooth audio device under the audio encoding protocol, and perform audio encoding in the default audio encoding format. It can avoid the problem that the Bluetooth audio connection is interrupted when the Bluetooth audio formats supported by the terminal and the Bluetooth audio device are the same but the corresponding audio encoding parameters do not match, and the stability of the Bluetooth audio connection between the terminal and the Bluetooth audio device is improved, thereby ensuring The Bluetooth audio function works normally.

附图说明Description of drawings

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present application. Those skilled in the art can also obtain other drawings based on these drawings without creative work.

图1是本申请实施例提供的一种音频编码格式确定方法的流程示意图;FIG. 1 is a schematic flowchart of a method for determining an audio coding format provided in an embodiment of the present application;

图2是本申请实施例提供的另一种音频编码格式确定方法的流程示意图;FIG. 2 is a schematic flowchart of another audio coding format determination method provided by the embodiment of the present application;

图3是本申请实施例提供的一种音频编码格式确定方法涉及的终端蓝牙设置界面;FIG. 3 is a terminal Bluetooth setting interface involved in a method for determining an audio encoding format provided by an embodiment of the present application;

图4是本申请实施例提供的一种音频编码格式确定方法涉及的终端编码格式选择示意图;FIG. 4 is a schematic diagram of terminal encoding format selection involved in a method for determining an audio encoding format provided in an embodiment of the present application;

图5是本申请实施例提供的一种音频编码格式确定的场景架构示意图;FIG. 5 is a schematic diagram of a scene architecture for determining an audio coding format provided by an embodiment of the present application;

图6是本申请实施例提供的一种音频编码格式确定装置的结构示意图;FIG. 6 is a schematic structural diagram of an audio coding format determination device provided in an embodiment of the present application;

图7是本申请实施例提供的一种格式参数获取模块的结构示意图;FIG. 7 is a schematic structural diagram of a format parameter acquisition module provided by an embodiment of the present application;

图8是本申请实施例提供的一种编码格式切换模块的结构示意图Fig. 8 is a schematic structural diagram of an encoding format switching module provided by an embodiment of the present application

图9是本申请实施例提供的另一种音频编码格式确定装置的结构示意图;FIG. 9 is a schematic structural diagram of another device for determining an audio encoding format provided by an embodiment of the present application;

图10是本申请实施例提供的一种电子设备的结构示意图。FIG. 10 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the application with reference to the drawings in the embodiments of the application. Apparently, the described embodiments are only some of the embodiments of the application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.

在本申请的描述中,需要理解的是,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。在本申请的描述中,需要说明的是,除非另有明确的规定和限定,“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本申请中的具体含义。此外,在本申请的描述中,除非另有说明,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。In the description of the present application, it should be understood that the terms "first", "second" and so on are used for descriptive purposes only, and should not be understood as indicating or implying relative importance. In the description of the present application, it should be noted that, unless otherwise specified and limited, "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally further includes For other steps or units inherent in these processes, methods, products or devices. Those of ordinary skill in the art can understand the specific meanings of the above terms in this application in specific situations. In addition, in the description of the present application, unless otherwise specified, "plurality" means two or more. "And/or" describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B may indicate: A exists alone, A and B exist simultaneously, and B exists independently. The character "/" generally indicates that the contextual objects are an "or" relationship.

下面结合具体的实施例对本申请进行详细说明。The present application will be described in detail below in conjunction with specific embodiments.

在一个实施例中,如图1所示,特提出了一种音频编码格式确定方法,该方法可依赖于计算机程序实现,可运行于基于冯诺依曼体系的音频编码格式确定装置上。该计算机程序可集成在应用中,也可作为独立的工具类应用运行。In one embodiment, as shown in FIG. 1 , a method for determining an audio coding format is proposed. The method can be implemented relying on a computer program and can run on a device for determining an audio coding format based on the von Neumann system. The computer program can be integrated in the application, or run as an independent utility application.

具体的,该音频编码格式确定方法包括:Specifically, the method for determining the audio encoding format includes:

步骤101:获取蓝牙音频设备在音频编码协议下所支持的第一音频编码格式以及所述第一音频编码格式对应的第一编码参数。Step 101: Obtain a first audio encoding format supported by a Bluetooth audio device under an audio encoding protocol and a first encoding parameter corresponding to the first audio encoding format.

所述音频编码协议可以理解为蓝牙特别兴趣小组(Special Interest Group,SIG)制定的用于蓝牙音频发送端(Source)与蓝牙音频接收端(Sink)通过蓝牙连接进行音频数据发送的一种音频编码的协议。所述音频编码协议可以是蓝牙高级音频传输协议(Advanced Audio Distribution Profile,A2DP),在A2DP协议中,蓝牙音频发送端(Source)与蓝牙音频接收端(Sink)通过蓝牙A2DP连接可以实现高质量音频数据的传输。The audio encoding protocol can be understood as an audio encoding developed by the Bluetooth Special Interest Group (Special Interest Group, SIG) for the Bluetooth audio sender (Source) and the Bluetooth audio receiver (Sink) to transmit audio data through a Bluetooth connection agreement. The audio encoding protocol can be the Bluetooth Advanced Audio Distribution Profile (Advanced Audio Distribution Profile, A2DP). In the A2DP protocol, the Bluetooth audio sending end (Source) and the Bluetooth audio receiving end (Sink) can realize high-quality audio through the Bluetooth A2DP connection. transmission of data.

其中,A2DP协议中规定了蓝牙音频发送端和蓝牙音频接收端对音频编解码的支持,其中SBC(Sub-band Coding)音频编码格式是必选的,其它的音频编码格式都是可选的,如MP3(Moving Picture Experts Group Audio Layer III)、AAC(Advanced AudioCoding)、WMA(Windows Media Audio)和ATRAC(Adaptive Transform Acoustic Coding),等等。Among them, the A2DP protocol stipulates that the Bluetooth audio transmitter and the Bluetooth audio receiver support audio codecs. Among them, the SBC (Sub-band Coding) audio encoding format is mandatory, and other audio encoding formats are optional. Such as MP3 (Moving Picture Experts Group Audio Layer III), AAC (Advanced Audio Coding), WMA (Windows Media Audio) and ATRAC (Adaptive Transform Acoustic Coding), and so on.

所述第一音频编码格式可以理解为蓝牙音频设备在音频编码协议下所支持的音频编码格式,如MP3音频编码格式、AAC音频编码格式、WMA音频编码格式等格式中的至少一种。The first audio encoding format can be understood as an audio encoding format supported by the Bluetooth audio device under the audio encoding protocol, such as at least one of the formats such as MP3 audio encoding format, AAC audio encoding format, and WMA audio encoding format.

所述第一编码参数与所述第一音频编码格式相对应,可以理解为,蓝牙音频设备所支持的第一音频编码格式在进行音频数据编码时的工作状态参数,如第一编码参数可以是采样率、信噪比、总谐波失真、比特率等编码参数中的至少一种。The first encoding parameter corresponds to the first audio encoding format. It can be understood that the first audio encoding format supported by the Bluetooth audio device is a working state parameter when encoding audio data. For example, the first encoding parameter can be At least one of coding parameters such as sampling rate, signal-to-noise ratio, total harmonic distortion, and bit rate.

终端在与蓝牙音频设备建立蓝牙连接或在待使用所述蓝牙音频连接进行音频播放的场景下,终端可以获取蓝牙音频设备蓝牙音频信息,具体为获取蓝牙音频设备基于音频编码协议所支持的音频编码格式和音频编码格式所对应的第一编码参数。When the terminal establishes a Bluetooth connection with a Bluetooth audio device or in a scene where the Bluetooth audio connection is to be used for audio playback, the terminal can obtain Bluetooth audio information of the Bluetooth audio device, specifically to obtain the audio coding supported by the Bluetooth audio device based on the audio coding protocol format and the first encoding parameter corresponding to the audio encoding format.

在一种具体的实施场景中,终端获取的蓝牙音频设备的第一音频编码格式以及所述第一音频编码格式对应的第一编码参数可以是蓝牙音频设备主动推送的,具体为,终端在与蓝牙音频设备建立蓝牙连接完成后,蓝牙音频设备可以监测到蓝牙连接建立成功,蓝牙音频设备可以获取本端所支持的在音频编码协议下(如A2DP协议)的所有音频编码信息-第一音频编码格式以及所述第一音频编码格式对应的第一编码参数,如在蓝牙音频设备的本地存储空间中获取预先设置好的音频编码信息,然后蓝牙音频设备通过与终端的蓝牙连接将音频编码信息-第一音频编码格式以及所述第一音频编码格式对应的第一编码参数推送至终端,此时终端通过接收音频编码信息即可获取到第一音频编码格式以及第一编码参数。In a specific implementation scenario, the first audio encoding format of the Bluetooth audio device acquired by the terminal and the first encoding parameters corresponding to the first audio encoding format may be actively pushed by the Bluetooth audio device, specifically, the terminal communicates with After the Bluetooth audio device establishes the Bluetooth connection, the Bluetooth audio device can monitor that the Bluetooth connection is successfully established, and the Bluetooth audio device can obtain all the audio encoding information supported by the local end under the audio encoding protocol (such as the A2DP protocol) - the first audio encoding format and the first encoding parameters corresponding to the first audio encoding format, such as obtaining the pre-set audio encoding information in the local storage space of the Bluetooth audio device, and then the Bluetooth audio device connects the audio encoding information to the terminal through the Bluetooth- The first audio encoding format and the first encoding parameters corresponding to the first audio encoding format are pushed to the terminal, and at this time, the terminal can acquire the first audio encoding format and the first encoding parameters by receiving the audio encoding information.

在一种具体的实施场景中,终端作为Source端、蓝牙音频设备作为Sink端;终端通常可以预先定义一目标音频编码格式,目标音频编码格式可以理解为终端在与任一蓝牙音频设备建立蓝牙音频连接优先以该目标音频编码格式对本地音频数据或在线音频数据进行音频编码,在实际应用中,通常会根据音频编码格式所对应的音频品质选择一品质较高的高品质编码方式,如确定目标音频编码格式为一品质较高的高品质编码方式-AAC音频编码格式。在本申请实施例中,终端为了避免与蓝牙音频设备的音频编码格式及音频编码格式对应的音频编码参数不匹配造成蓝牙音频连接(如A2DP连接)断开或音频播放失败的问题,终端可以直接判断蓝牙音频设备是否支持目标音频编码格式以及目标音频编码格式对应的目标音频编码参数,具体如下:In a specific implementation scenario, the terminal acts as the Source end, and the Bluetooth audio device acts as the Sink end; the terminal can usually pre-define a target audio encoding format, and the target audio encoding format can be understood as the terminal establishing Bluetooth audio with any Bluetooth audio device. The connection preferentially uses the target audio encoding format to perform audio encoding on local audio data or online audio data. In practical applications, a higher-quality high-quality encoding method is usually selected according to the audio quality corresponding to the audio encoding format, such as determining the target The audio coding format is a high-quality high-quality coding method-AAC audio coding format. In the embodiment of this application, in order to avoid the problem that the terminal does not match the audio encoding format of the Bluetooth audio device and the audio encoding parameters corresponding to the audio encoding format, resulting in the disconnection of the Bluetooth audio connection (such as the A2DP connection) or the failure of audio playback, the terminal can directly Determine whether the Bluetooth audio device supports the target audio encoding format and the target audio encoding parameters corresponding to the target audio encoding format, as follows:

一种方式可以是直接向蓝牙音频设备获取目标音频编码格式,以及蓝牙音频设备所支持的目标音频编码参数。如:蓝牙音频设备支持AAC音频编码格式和其它A、B、C三种音频编码格式,终端可以直接向蓝牙音频设备发送获取目标音频编码格式(AAC音频编码格式),以及蓝牙音频设备所支持的目标音频编码参数的请求,蓝牙音频设备基于所述请求反馈第一音频编码格式(即AAC音频编码格式)以及第一编码参数(即AAC音频编码格式对应的音频编码参数)One way may be to directly obtain the target audio coding format and the target audio coding parameters supported by the Bluetooth audio device from the Bluetooth audio device. For example, the Bluetooth audio device supports the AAC audio encoding format and other three audio encoding formats A, B, and C. The terminal can directly send to the Bluetooth audio device to obtain the target audio encoding format (AAC audio encoding format), and the audio encoding format supported by the Bluetooth audio device. A request for target audio encoding parameters, and the Bluetooth audio device feeds back the first audio encoding format (ie, the AAC audio encoding format) and the first encoding parameters (ie, the audio encoding parameters corresponding to the AAC audio encoding format) based on the request

然后判断终端所支持的目标音频编码参数与蓝牙音频设备所支持的目标音频编码参数是否匹配。需要说明的是,在实际应用场景中,终端以及蓝牙音频设备在支持同一音频编码格式时,终端所支持的该“同一音频编码格式”对应的音频编码参数与蓝牙音频设备所支持的该“同一音频编码格式”对应的音频编码参数不匹配。例如:终端和蓝牙音频设备同时支持目标音频编码格式-AAC编码格式,以音频编码参数为比特率以及采样率为例,终端所支持的比特率为A、采样率为B;蓝牙音频设备支持的比特率为a、采样率为B;此时,终端所支持的该“同一AAC编码格式”对应的音频编码参数与蓝牙音频设备所支持的该“同一AAC编码格式”对应的音频编码参数即不匹配;Then it is judged whether the target audio coding parameters supported by the terminal match the target audio coding parameters supported by the Bluetooth audio device. It should be noted that, in an actual application scenario, when the terminal and the Bluetooth audio device support the same audio coding format, the audio coding parameters corresponding to the "same audio coding format" supported by the terminal are the same as the "same audio coding format" supported by the Bluetooth audio device. The audio encoding parameters corresponding to "Audio Encoding Format" do not match. For example: the terminal and the Bluetooth audio device support the target audio encoding format-AAC encoding format at the same time. Taking the audio encoding parameters as the bit rate and sampling rate as an example, the bit rate supported by the terminal is A and the sampling rate is B; the Bluetooth audio device supports The bit rate is a, and the sampling rate is B; at this time, the audio encoding parameters corresponding to the "same AAC encoding format" supported by the terminal and the audio encoding parameters corresponding to the "same AAC encoding format" supported by the Bluetooth audio device are different. match;

步骤102:确定所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式不匹配,和/或所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数不匹配,将所述第二音频编码格式切换为所述音频编码协议下的默认音频编码格式。Step 102: Determine that the first audio encoding format does not match the second audio encoding format supported by the terminal under the audio encoding protocol, and/or the first encoding parameter does not match the second audio encoding format The corresponding second audio coding parameters do not match, and the second audio coding format is switched to the default audio coding format under the audio coding protocol.

所述第二音频编码格式可以理解为终端在音频编码协议下所支持的音频编码格式,如MP3音频编码格式、AAC音频编码格式、WMA音频编码格式等格式中的至少一种,通常所述第二音频编码格式与默认音频编码格式不同。The second audio coding format can be understood as an audio coding format supported by the terminal under the audio coding protocol, such as at least one of MP3 audio coding format, AAC audio coding format, WMA audio coding format, etc., usually the first The second audio encoding format is different from the default audio encoding format.

所述第二编码参数与所述第二音频编码格式相对应,可以理解为,终端所支持的第二音频编码格式在进行音频数据编码时的工作状态参数,如第一编码参数可以理解为是采样率、信噪比、总谐波失真、比特率等编码参数中的一种或多种。The second encoding parameter corresponds to the second audio encoding format, which can be understood as the working state parameter of the second audio encoding format supported by the terminal when encoding audio data. For example, the first encoding parameter can be understood as One or more of coding parameters such as sampling rate, signal-to-noise ratio, total harmonic distortion, and bit rate.

所述默认音频编码格式通常为所有或大部分蓝牙音频设备所支持一种音频编码格式,可以理解的是通常终端音频编码的格式为默认音频编码格式编码时,蓝牙音频设备通常可基于该默认音频编码格式进行音频编解码;在实际应用中,优选以默认音频编码格式为音频编码协议中所约定的蓝牙音频发送端和蓝牙音频接收端对音频编解码的支持必选音频编码格式,如A2DP协议中规定了蓝牙音频发送端和蓝牙音频接收端对音频编解码的支持,其中SBC(Sub-band Coding)音频编码格式是必选的,所述默认音频编码格式即可以为SBC音频编码格式。需要说明的是,当终端和蓝牙音频设备以SBC音频编码格式在A2DP协议下对音频书进行音频编解码时,终端和蓝牙音频设备通常均支持SBC音频编码格式对应的音频编码参数。The default audio encoding format is usually an audio encoding format supported by all or most Bluetooth audio devices. It can be understood that when the terminal audio encoding format is usually encoded in the default audio encoding format, the Bluetooth audio device can usually be based on the default audio encoding format. Encoding format for audio encoding and decoding; in practical applications, it is preferable to use the default audio encoding format as the audio encoding format agreed in the audio encoding protocol. The audio encoding format must be selected by the Bluetooth audio transmitter and the Bluetooth audio receiver to support audio encoding and decoding, such as the A2DP protocol It stipulates the support of the Bluetooth audio transmitter and the Bluetooth audio receiver to the audio codec, wherein the SBC (Sub-band Coding) audio coding format is mandatory, and the default audio coding format can be the SBC audio coding format. It should be noted that when the terminal and the Bluetooth audio device encode and decode the audio book under the A2DP protocol in the SBC audio coding format, both the terminal and the Bluetooth audio device usually support the audio coding parameters corresponding to the SBC audio coding format.

具体的,以音频编码协议为A2DP协议为例,A2DP协议的音频编码通常有Apt-X音频编码格式、SBC音频编码格式、AAC音频编码格式,LDAC音频编码格式,通常Apt-X音频编码格式、AAC音频编码格式,LDAC音频编码格式相对于SBC音频编码格式对应音频音质要高,通常终端的第二音频编码格式可以是AAC音频编码格式,可以理解的是,终端在使用某一应用程序(如某音乐程序)或建立与蓝牙音频设备的蓝牙连接时,终端会以该AAC音频编码格式作为优选。Specifically, taking the audio coding protocol as the A2DP protocol as an example, the audio coding of the A2DP protocol usually includes Apt-X audio coding format, SBC audio coding format, AAC audio coding format, LDAC audio coding format, usually Apt-X audio coding format, The AAC audio coding format, the LDAC audio coding format is higher in audio quality than the SBC audio coding format, and usually the second audio coding format of the terminal can be the AAC audio coding format. It can be understood that the terminal is using a certain application program (such as A certain music program) or when establishing a Bluetooth connection with a Bluetooth audio device, the terminal will use the AAC audio encoding format as the preferred format.

具体的,终端在获取到蓝牙音频设备在音频编码协议下所支持的第一音频编码格式以及第一编码参数之后,终端可以获取所述音频编码协议下所支持的第二音频编码格式以及第二音频编码格式,如,通常终端的所支持的第二音频编码格式以及第二音频编码格式保存至音频编码配置文件中,终端可以在本地的音频编码配置文件中获取音频编码协议下所支持的第二音频编码格式以及第二编码参数。然后判断所述第一音频编码格式与第二音频编码格式是否匹配,以及所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数是否匹配。Specifically, after the terminal acquires the first audio encoding format and the first encoding parameters supported by the Bluetooth audio device under the audio encoding protocol, the terminal can acquire the second audio encoding format and the second encoding parameter supported under the audio encoding protocol. Audio coding format, for example, usually the second audio coding format supported by the terminal and the second audio coding format are stored in the audio coding configuration file, and the terminal can obtain the first audio coding format supported by the audio coding protocol in the local audio coding configuration file. Two audio encoding formats and second encoding parameters. Then judge whether the first audio encoding format matches the second audio encoding format, and whether the first encoding parameter matches the second audio encoding parameter corresponding to the second audio encoding format.

在一个具体的实施场景中,终端支持的第二音频编码格式为AAC音频编码格式;第二音频编码参数为:比特率165kbps、采样率:48khz;蓝牙音频设备支持的第一音频编码格式为AAC音频编码格式;第一音频编码参数为:比特率128kbps、采样率:48khz或44.1khz,经比对所述第一音频编码格式与第二音频编码格式为同一音频编码格式(AAC音频编码格式)、第一编码参数与第二音频编码参数的采样率一致、第一编码参数与第二音频编码参数的比特率不一致;此时,终端确定所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式匹配但所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数不匹配。In a specific implementation scenario, the second audio encoding format supported by the terminal is the AAC audio encoding format; the second audio encoding parameters are: bit rate 165kbps, sampling rate: 48khz; the first audio encoding format supported by the Bluetooth audio device is AAC Audio encoding format; the first audio encoding parameters are: bit rate 128kbps, sampling rate: 48khz or 44.1khz, the first audio encoding format and the second audio encoding format are compared to the same audio encoding format (AAC audio encoding format) , the sampling rate of the first encoding parameter is consistent with that of the second audio encoding parameter, and the bit rate of the first encoding parameter is inconsistent with that of the second audio encoding parameter; at this time, the terminal determines that the first audio encoding format is consistent with the The second audio encoding format supported under the audio encoding protocol matches but the first encoding parameter does not match the second audio encoding parameter corresponding to the second audio encoding format.

具体的,终端在确定所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式不匹配,和/或所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数不匹配之后,终端当前编码的音频编码格式从所述第二音频编码格式(如AAC音频编码格式)切换为所述音频编码协议下的默认音频编码格式(如A2DP协议下的SBC音频编码格式),从而在用户开启终端上的音频播放功能时,采用默认音频编码格式对本地或在线音频数据进行编码。Specifically, when the terminal determines that the first audio encoding format does not match the second audio encoding format supported by the terminal under the audio encoding protocol, and/or the first encoding parameter does not match the second audio encoding format After the second audio encoding parameters corresponding to the encoding format do not match, the audio encoding format currently encoded by the terminal is switched from the second audio encoding format (such as the AAC audio encoding format) to the default audio encoding format under the audio encoding protocol (such as SBC audio encoding format under the A2DP protocol), so that when the user turns on the audio playback function on the terminal, the default audio encoding format is used to encode local or online audio data.

其中,终端在确定所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式匹配,和/或所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数匹配之后,终端保持当前编码的音频编码格式-第二音频编码格式(如AAC音频编码格式),可以理解的是,由于当前编码的音频编码格式-第二音频编码格式(如AAC音频编码格式)与蓝牙音频设备所支持的相兼容,此时终端无需对第二音频编码格式进行切换。Wherein, when the terminal determines that the first audio encoding format matches the second audio encoding format supported by the terminal under the audio encoding protocol, and/or the first encoding parameter matches the second audio encoding format After the corresponding second audio encoding parameters are matched, the terminal maintains the currently encoded audio encoding format-the second audio encoding format (such as the AAC audio encoding format). It can be understood that because the currently encoded audio encoding format-the second audio encoding format (such as the AAC audio encoding format) is compatible with that supported by the Bluetooth audio device, and at this time, the terminal does not need to switch the second audio encoding format.

步骤103:控制采用所述默认音频编码格式进行音频编码。Step 103: Controlling the use of the default audio encoding format for audio encoding.

具体的,终端通过执行上述步骤在确定所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式不匹配,和/或所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数不匹配之后,从终端所支持的第二音频格式、默认音频编码格式中确定默认音频编码格式为在所述音频编码协议下(如A2DP协议)的当前音频编码格式。然后注册在所述音频编码协议下(如A2DP协议)的默认音频编码格式的SEP(Stream End Point),并通过该SEP与所述蓝牙音频设备协商以建立同样对应于音频编码协议下(如A2DP协议)的默认音频编码格式的SEP,从而完成蓝牙音频连接的建立。在完成蓝牙音频连接的建立之后,终端上的应用程序可以将本地音频数据或在线音频数据由对应的默认音频编码格式对应的音频编码器(如SBC音频编码)编码,然后终端可以通过这个接口提供Transport Services and AV capabilities来将编码之后的音频流数据传输至蓝牙音频设备。Specifically, by performing the above steps, the terminal determines that the first audio encoding format does not match the second audio encoding format supported by the terminal under the audio encoding protocol, and/or the first encoding parameter does not match the After the second audio encoding parameters corresponding to the second audio encoding format do not match, determine that the default audio encoding format is under the audio encoding protocol (such as the A2DP protocol) from the second audio format supported by the terminal and the default audio encoding format The current audio encoding format for . Then register the SEP (Stream End Point) of the default audio coding format under the audio coding protocol (such as the A2DP protocol), and negotiate with the Bluetooth audio device through the SEP to establish the same corresponding to the audio coding protocol (such as the A2DP Protocol) SEP of the default audio encoding format, thus completing the establishment of the Bluetooth audio connection. After the establishment of the Bluetooth audio connection is completed, the application program on the terminal can encode the local audio data or online audio data by the audio encoder (such as SBC audio encoding) corresponding to the corresponding default audio encoding format, and then the terminal can provide it through this interface. Transport Services and AV capabilities to transmit encoded audio stream data to Bluetooth audio devices.

在本申请实施例中,在本申请一个或多个实施例中,终端通过获取蓝牙音频设备在音频编码协议下所支持的第一音频编码格式和所述第一音频编码格式对应的第一编码参数,在所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式不匹配,和/或所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数不匹配时,将所述第二音频编码格式切换为所述音频编码协议下终端以及蓝牙音频设备均支持的默认音频编码格式,以默认音频编码格式进行音频编码。可以避免在终端与蓝牙音频设备支持的蓝牙音频格式相同而对应的音频编码参数不匹配的情况下导致蓝牙音频连接中断的问题,提高了终端与蓝牙音频设备间蓝牙音频连接的稳定性,从而保证了蓝牙音频功能正常使用。In the embodiment of the present application, in one or more embodiments of the present application, the terminal obtains the first audio coding format supported by the Bluetooth audio device under the audio coding protocol and the first coding format corresponding to the first audio coding format parameter, when the first audio encoding format does not match the second audio encoding format supported by the terminal under the audio encoding protocol, and/or the first encoding parameter corresponds to the second audio encoding format When the second audio encoding parameters do not match, switch the second audio encoding format to the default audio encoding format supported by both the terminal and the Bluetooth audio device under the audio encoding protocol, and perform audio encoding in the default audio encoding format. It can avoid the problem that the Bluetooth audio connection is interrupted when the Bluetooth audio formats supported by the terminal and the Bluetooth audio device are the same but the corresponding audio encoding parameters do not match, and the stability of the Bluetooth audio connection between the terminal and the Bluetooth audio device is improved, thereby ensuring The Bluetooth audio function works normally.

请参见图2,图2是本申请提出的一种音频编码格式确定方法的另一种实施例的流程示意图。具体的:Please refer to FIG. 2 . FIG. 2 is a schematic flowchart of another embodiment of a method for determining an audio coding format proposed in the present application. specific:

步骤201:向蓝牙音频设备发送在音频编码协议下的编码信息获取请求。Step 201: Send an encoding information acquisition request under the audio encoding protocol to the Bluetooth audio device.

所述请求可以理解为用于请求蓝牙音频设备工作的指示或要求,可以理解为请求蓝牙音频设备指定执行某种运算或功能实现的某种控制的代码。所述编码信息获取请求在本申请实施例中,可以理解为终端请求蓝牙音频设备的编码信息的代码,蓝牙音频设备可以通过执行所述代码可以获取本地所存储的音频编码信息-“所述音频编码协议下所支持的第一音频编码格式以及所述第一音频编码格式对应的第一编码参数”。The request can be understood as an instruction or requirement for requesting the Bluetooth audio device to work, and can be understood as a code for requesting the Bluetooth audio device to specify a certain operation or function realization. In the embodiment of this application, the encoding information acquisition request can be understood as the code for the terminal to request the encoding information of the Bluetooth audio device, and the Bluetooth audio device can obtain the locally stored audio encoding information by executing the code-"the audio The first audio encoding format supported under the encoding protocol and the first encoding parameters corresponding to the first audio encoding format".

具体的,终端在建立与蓝牙音频设备的蓝牙连接之后,基于所述蓝牙连接可以向蓝牙音频设备发送在音频编码协议下的编码信息获取请求,以询问蓝牙音频设备所支持的音频编码信息,如所支持的音频编码格式以及该音频编码格式所对应的音频编码参数。蓝牙音频设备在接收到所述编码信息获取请求之后,可以响应于所述编码信息获取请求,通过执行请求蓝牙音频设备的编码信息的代码,可以获取到本地所存储的音频编码信息-“所述音频编码协议下所支持的第一音频编码格式以及所述第一音频编码格式对应的第一编码参数”,然后将所述包含第一音频编码格式以及第一编码参数的编码信息通过蓝牙连接发送至所述终端。Specifically, after the terminal establishes a Bluetooth connection with the Bluetooth audio device, based on the Bluetooth connection, the terminal can send a coding information acquisition request under the audio coding protocol to the Bluetooth audio device to inquire about the audio coding information supported by the Bluetooth audio device, such as The supported audio encoding format and the audio encoding parameters corresponding to the audio encoding format. After the Bluetooth audio device receives the coded information acquisition request, it can respond to the coded information acquisition request by executing the code requesting the coded information of the Bluetooth audio device to obtain the locally stored audio coded information-"the The first audio encoding format supported under the audio encoding protocol and the first encoding parameter corresponding to the first audio encoding format", and then send the encoding information including the first audio encoding format and the first encoding parameter through the Bluetooth connection to the terminal.

步骤202:接收所述蓝牙音频设备发送的在所述音频编码协议下所支持的第一音频编码格式以及所述第一音频编码格式对应的第一编码参数。Step 202: Receive a first audio encoding format supported under the audio encoding protocol and a first encoding parameter corresponding to the first audio encoding format sent by the Bluetooth audio device.

具体的,当蓝牙音频设备响应于所述编码信息获取请求,蓝牙音频设备获取所述音频编码协议下所支持的编码信息,并将包含第一音频编码格式以及第一编码参数的编码信息通过蓝牙连接发送至所述终端。终端此时即可接收到蓝牙音频设备发送的所述蓝牙音频设备发送的在所述音频编码协议下所支持的第一音频编码格式以及所述第一音频编码格式对应的第一编码参数。Specifically, when the Bluetooth audio device responds to the encoding information acquisition request, the Bluetooth audio device acquires the encoding information supported under the audio encoding protocol, and passes the encoding information including the first audio encoding format and the first encoding parameters through the Bluetooth A connection is sent to the terminal. At this time, the terminal can receive the first audio encoding format supported by the audio encoding protocol and the first encoding parameter corresponding to the first audio encoding format sent by the Bluetooth audio device and sent by the Bluetooth audio device.

步骤203:判断所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式是否匹配,以及所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数是否匹配。Step 203: Determine whether the first audio encoding format matches the second audio encoding format supported by the terminal under the audio encoding protocol, and whether the first encoding parameter corresponds to the second audio encoding format Whether the second audio encoding parameters match.

具体的,终端判断所述第一音频编码格式与第二音频编码格式是否匹配,以及所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数是否匹配,通常存在4种情况:Specifically, the terminal judges whether the first audio encoding format matches the second audio encoding format, and whether the first encoding parameter matches the second audio encoding parameter corresponding to the second audio encoding format. Generally, there are four types: Condition:

1、所述第一音频编码格式与第二音频编码格式不匹配,以及所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数不匹配;1. The first audio encoding format does not match the second audio encoding format, and the first encoding parameter does not match the second audio encoding parameter corresponding to the second audio encoding format;

2、所述第一音频编码格式与第二音频编码格式不匹配,以及所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数匹配;2. The first audio encoding format does not match the second audio encoding format, and the first encoding parameter matches the second audio encoding parameter corresponding to the second audio encoding format;

3、所述第一音频编码格式与第二音频编码格式匹配,以及所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数不匹配;3. The first audio encoding format matches the second audio encoding format, and the first encoding parameter does not match the second audio encoding parameter corresponding to the second audio encoding format;

4、所述第一音频编码格式与第二音频编码格式匹配,以及所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数匹配。4. The first audio coding format matches the second audio coding format, and the first coding parameter matches the second audio coding parameter corresponding to the second audio coding format.

在上述4种情况中,第4种情况:当所述第一音频编码格式与第二音频编码格式匹配,以及所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数匹配时,终端即确定与蓝牙音频设备控制采用以第二音频编码格式进行音频编码;第1种情况、第2种情况以及第3种情况,终端可以执行步骤204所述的方法。In the above four cases, the fourth case: when the first audio encoding format matches the second audio encoding format, and the first encoding parameter corresponds to the second audio encoding parameter of the second audio encoding format When matching, the terminal determines that the Bluetooth audio device controls to use the second audio coding format for audio coding; in the first case, the second case and the third case, the terminal can execute the method described in step 204 .

其中,所述判断所述第一音频编码格式与第二音频编码格式是否匹配,可以是终端判断所述第一音频编码格式与第二音频编码格式是否为同一音频编码格式:1、当所述第一音频编码格式与第二音频编码格式为同一音频编码格式,则确定第一音频编码格式与第二音频编码格式匹配;2、当所述第一音频编码格式与第二音频编码格式为不同音频编码格式,则确定第一音频编码格式与第二音频编码格式不匹配。所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数是否匹配可以是基于预设的编码参数匹配规则进行判断;Wherein, the judging whether the first audio coding format matches the second audio coding format may be that the terminal judges whether the first audio coding format and the second audio coding format are the same audio coding format: 1. When the The first audio encoding format and the second audio encoding format are the same audio encoding format, then determine that the first audio encoding format matches the second audio encoding format; 2. When the first audio encoding format is different from the second audio encoding format audio encoding format, it is determined that the first audio encoding format does not match the second audio encoding format. Whether the first encoding parameter matches the second audio encoding parameter corresponding to the second audio encoding format may be judged based on a preset encoding parameter matching rule;

一种编码参数匹配规则可以是判断音频编码参数的数值是否一致:1、当第一编码参数与所述第二音频编码格式对应的第二音频编码参数的数值一致时,确定第一编码参数与第二音频编码参数匹配;2、当第一编码参数与所述第二音频编码格式对应的第二音频编码参数的数值不一致时,确定第一编码参数与第二音频编码参数不匹配。A coding parameter matching rule may be to judge whether the values of the audio coding parameters are consistent: 1. When the values of the first coding parameters and the second audio coding parameters corresponding to the second audio coding format are consistent, determine that the first coding parameters are consistent with the The second audio coding parameter matches; 2. When the first coding parameter is inconsistent with the value of the second audio coding parameter corresponding to the second audio coding format, determine that the first coding parameter does not match the second audio coding parameter.

一种编码参数匹配规则可以是基于音频编码参数的数值范围:如判断第一音频参数的数值或范围是否落入到第二音频参数的数值范围之内;1、当第一音频参数的数值或范围落入到第二音频参数的数值范围之内时,确定第一编码参数与第二音频编码参数匹配;2、当第一音频参数的数值或范围未落入到第二音频参数的数值范围之内时,确定第一编码参数与第二音频编码参数不匹配。A coding parameter matching rule may be based on the numerical range of the audio coding parameter: such as judging whether the numerical value or range of the first audio parameter falls within the numerical range of the second audio parameter; 1. When the numerical value or range of the first audio parameter is When the range falls within the value range of the second audio parameter, it is determined that the first encoding parameter matches the second audio encoding parameter; 2. When the value or range of the first audio parameter does not fall within the value range of the second audio parameter When within, it is determined that the first encoding parameter does not match the second audio encoding parameter.

在一个具体的实施场景中,终端支持的第二音频编码格式为AAC音频编码格式;第二音频编码参数为:比特率165kbps、采样率:48khz;蓝牙音频设备支持的第一音频编码格式为AAC音频编码格式;第一音频编码参数为:比特率128kbps、采样率:48khz或44.1khz,经比对所述第一音频编码格式与第二音频编码格式为同一音频编码格式(AAC音频编码格式)、第一编码参数与第二音频编码参数的采样率一致、第一编码参数与第二音频编码参数的比特率不一致;此时,终端确定所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式匹配但所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数不匹配。In a specific implementation scenario, the second audio encoding format supported by the terminal is the AAC audio encoding format; the second audio encoding parameters are: bit rate 165kbps, sampling rate: 48khz; the first audio encoding format supported by the Bluetooth audio device is AAC Audio encoding format; the first audio encoding parameters are: bit rate 128kbps, sampling rate: 48khz or 44.1khz, the first audio encoding format and the second audio encoding format are compared to the same audio encoding format (AAC audio encoding format) , the sampling rate of the first encoding parameter is consistent with that of the second audio encoding parameter, and the bit rate of the first encoding parameter is inconsistent with that of the second audio encoding parameter; at this time, the terminal determines that the first audio encoding format is consistent with the The second audio encoding format supported under the audio encoding protocol matches but the first encoding parameter does not match the second audio encoding parameter corresponding to the second audio encoding format.

可选的,所述蓝牙音频设备可以支持多个第一音频编码格式时,即终端可以获取到多个第一音频编码格式以及各第一音频编码格式对应的第一音频编码信息,则上述所述判断所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式是否匹配,以及所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数是否匹配,具体如下:Optionally, when the Bluetooth audio device can support multiple first audio coding formats, that is, the terminal can obtain multiple first audio coding formats and first audio coding information corresponding to each first audio coding format, then the above-mentioned The method of judging whether the first audio encoding format matches the second audio encoding format supported by the terminal under the audio encoding protocol, and the first encoding parameter corresponding to the second audio encoding format Whether the audio encoding parameters match, as follows:

终端可以对各第一音频编码格式进行编序,例如各第一音频编码格式为:a、b、c、d四种音频编码格式,排序顺序分别为:b、c、d、a。则终端根据各第一音频编码格式的排序顺序确定当前第一音频编码格式(即确定当前第一音频编码格式为b音频编码格式),执行所述判断所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式是否匹配,以及所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数是否匹配的步骤;The terminal can sequence the first audio coding formats, for example, the first audio coding formats are: a, b, c, d four audio coding formats, and the sorting order is: b, c, d, a respectively. Then the terminal determines the current first audio encoding format according to the sort order of each first audio encoding format (that is, determines that the current first audio encoding format is the b audio encoding format), and executes the determination of the first audio encoding format and the terminal Whether the second audio encoding format supported under the audio encoding protocol matches, and whether the first encoding parameter matches the second audio encoding parameter corresponding to the second audio encoding format;

当所述第一音频编码格式(如b音频编码格式)与所述终端在所述音频编码协议下所支持的第二音频编码格式不匹配,和/或所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数不匹配,根据多个所述第一音频编码格式的排序顺序,获取当前第一音频编码格式的下一个第一音频编码格式,将所述下一个第一音频编码格式作为当前第一音频编码格式,并执行判断所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式是否匹配,以及所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数是否匹配的步骤。When the first audio encoding format (such as b audio encoding format) does not match the second audio encoding format supported by the terminal under the audio encoding protocol, and/or the first encoding parameter is different from the second audio encoding format The second audio encoding parameters corresponding to the two audio encoding formats do not match, according to the sort order of the multiple first audio encoding formats, the next first audio encoding format of the current first audio encoding format is obtained, and the next first audio encoding format is obtained. An audio coding format is used as the current first audio coding format, and it is judged whether the first audio coding format matches the second audio coding format supported by the terminal under the audio coding protocol, and the first coding A step of determining whether the parameter matches the second audio encoding parameter corresponding to the second audio encoding format.

步骤204:确定所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式不匹配,和/或所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数不匹配。Step 204: Determine that the first audio encoding format does not match the second audio encoding format supported by the terminal under the audio encoding protocol, and/or the first encoding parameter does not match the second audio encoding format The corresponding second audio encoding parameters do not match.

具体可参见步骤102,此处不再赘述。For details, refer to step 102, which will not be repeated here.

可选的,当终端支持的所述第二音频编码格式为多个,步骤204中的所述第二音频编码格式可以是终端默认工作的目标音频编码格式,即在与蓝牙音频设备建立蓝牙音频连接进音频数据编码传输优选该目标音频编码格式,其中,所述目标音频编码格式可以是终端出厂时默认的,还可以是用户自定义的,即用户在终端的音频编码格式设置页面进行设置。Optionally, when there are multiple second audio encoding formats supported by the terminal, the second audio encoding format in step 204 may be the default target audio encoding format of the terminal, that is, when establishing a Bluetooth audio encoding format with a Bluetooth audio device The target audio encoding format for connecting to audio data encoding transmission is preferred, wherein the target audio encoding format can be the default when the terminal leaves the factory, or user-defined, that is, the user can set it on the audio encoding format setting page of the terminal.

例如:用户可以在开启终端的蓝牙功能时,在如图3所示的终端的蓝牙设置界面中,选中“蓝牙音频编码格式”选项向终端输入编码格式设置指令,此时,终端对用户所输入的编码格式设置指令作出响应,在当前显示界面上显示“蓝牙音频编码格式”相应显示窗口,如图4所示,图4是一种终端的编码格式选择示意图,在如图4所示的界面中,用户可以分别从多个音频编码格式选项中的选择目标音频编码格式,如用户可以通过手指触控的方式选中“AAC音频编码格式”。For example: when the user turns on the Bluetooth function of the terminal, in the Bluetooth setting interface of the terminal as shown in Figure 3, select the "Bluetooth audio encoding format" option to input encoding format setting instructions to the terminal. The encoding format setting command responds, and the corresponding display window of "Bluetooth audio encoding format" is displayed on the current display interface, as shown in Figure 4. Figure 4 is a schematic diagram of a terminal encoding format selection. In the interface shown in Figure 4 , the user can select the target audio encoding format from a plurality of audio encoding format options, for example, the user can select "AAC audio encoding format" by finger touch.

当经终端执行步骤204确定该目标音频编码格式不匹配时,终端执行下一步所述按照多个所述第二音频编码格式的优先级的高低顺序,获取当前第二音频编码格式的下一个第二音频编码格式的步骤。When the terminal performs step 204 to determine that the target audio encoding format does not match, the terminal executes the next step to obtain the next first audio encoding format of the current second audio encoding format according to the priority order of the multiple second audio encoding formats. Two audio encoding format steps.

步骤205:按照多个所述第二音频编码格式的优先级的高低顺序,获取当前第二音频编码格式的下一个第二音频编码格式。Step 205: Obtain the next second audio coding format of the current second audio coding format according to the priority order of the multiple second audio coding formats.

所述优先级可以理解为基于优先级确定策略确定的各第二音频编码格式的优先级。The priority may be understood as the priority of each second audio coding format determined based on a priority determination policy.

在一种具体的实施方式中,优先级确定策略可以是终端根据各第二音频编码格式对应的音频编码品质(如音质、音色)等确定各第二音频编码格式对应优先级。如以AAC音频编码格式、MP3音频编码格式、HWA音频编码格式aptX音频编码格式为例,在同等码率的情况下,音频编码品质通常HWA>aptX>AAC>MP3;则四种编码格式的优先级的高低顺序为:HWA>aptX>AAC>MP3。In a specific implementation manner, the priority determination strategy may be that the terminal determines the priority corresponding to each second audio encoding format according to the audio encoding quality (such as sound quality, timbre) corresponding to each second audio encoding format. For example, taking the AAC audio encoding format, MP3 audio encoding format, and HWA audio encoding format aptX audio encoding format as examples, under the same bit rate, the audio encoding quality is usually HWA>aptX>AAC>MP3; the priority of the four encoding formats is The order of levels is: HWA>aptX>AAC>MP3.

在一种具体的实施方式中,优先级确定策略可以是终端结合音频编码品质以及终端与蓝牙音频设备的蓝牙连接状态参数综合确定各第二音频编码格式的优先级。其中,所述蓝牙连接状态参数可以是接收信号强度指示(received signalstrength indication,RSSI)、接收信号码功率(received signal code power,RSCP)、接收信号的接收码片信号强度和噪声强度的比例(EcIo)/每调制比特功率和噪声频谱密度的比率(EcNo)/信噪比(signal-to-noise ratio,SNR)/参考信号接收质量(reference signalreceivingquality,RSRQ)、接收的蓝牙信号的误码率(bit error ratio,BER)/误块率(blockerror rate,BLER)/数据包差错率(packet error ratio,PER)等通信参数中的至少一种参数,需要说明的是,所述表征蓝牙连接状态的通信参数有多种,可以根据实际应用场景确定的上述提及的一种或多种的拟合,此处不作具体的限定。In a specific implementation manner, the priority determination strategy may be that the terminal comprehensively determines the priority of each second audio coding format in combination with the audio coding quality and the Bluetooth connection state parameters between the terminal and the Bluetooth audio device. Wherein, the bluetooth connection status parameter may be received signal strength indication (received signalstrength indication, RSSI), received signal code power (received signal code power, RSCP), the ratio (EcIo )/per modulation bit power and noise spectral density ratio (EcNo)/signal-to-noise ratio (signal-to-noise ratio, SNR)/reference signal receiving quality (reference signal receiving quality, RSRQ), received Bluetooth signal bit error rate ( bit error ratio, BER)/block error rate (blockerror rate, BLER)/data packet error rate (packet error ratio, PER) and other communication parameters at least one parameter, it should be noted that, the said Bluetooth connection status There are many kinds of communication parameters, and one or more of the above-mentioned fittings may be determined according to actual application scenarios, and no specific limitation is made here.

具体的,终端具有对蓝牙连接状态进行监测的功能,可以实时对终端与蓝牙音频设备间的蓝牙通信链路的通信参数进行实时监测,从而到获取与所述蓝牙音频设备的蓝牙连接状态参数,以及获取多个所述第二音频编码格式分别对应的编码系数,所述编码系数可以理解为根据各第二音频编码格式对应的音频编码品质确定的音频编码系数,例如根据各第二音频编码格式对应的音频编码品质,确定HWA格式为2.1,aptX为2.2,AAC为2.3,MP3为2.4。Specifically, the terminal has the function of monitoring the Bluetooth connection status, and can monitor the communication parameters of the Bluetooth communication link between the terminal and the Bluetooth audio device in real time, so as to obtain the Bluetooth connection status parameters with the Bluetooth audio device, and acquiring a plurality of encoding coefficients respectively corresponding to the second audio encoding formats, the encoding coefficients can be understood as audio encoding coefficients determined according to the audio encoding quality corresponding to each second audio encoding format, for example, according to each second audio encoding format The corresponding audio encoding quality is determined to be 2.1 for HWA format, 2.2 for aptX, 2.3 for AAC, and 2.4 for MP3.

然后将所述编码系数以及所述蓝牙连接状态参数输入至评分模型中,分别得到多个所述第二音频编码格式对应的编码分数。Then input the encoding coefficient and the Bluetooth connection state parameter into a scoring model to obtain a plurality of encoding scores corresponding to the second audio encoding format.

其中,通过预先获取实际蓝牙通信链路环境中的大量样本数据,提取特征信息,并对所述样本数据进行标注,所述特征信息包含信号接收指示信息中的至少一个通信参数(RSSI、SNR、RSCP等)和编码系数,创建评分模型。所述评分模型可以是使用大量的测试样本训练出来的,如评分模型可以是基于卷积神经网络(Convolutional Neural Network,CNN)模型,深度神经网络(Deep Neural Network,DNN)模型、循环神经网络(Recurrent NeuralNetworks,RNN)、模型、嵌入(embedding)模型、梯度提升决策树(Gradient BoostingDecision Tree,GBDT)模型、逻辑回归(Logistic Regression,LR)模型中的至少一种实现的,基于已经标注的样本数据对评分模型进行训练,可以得到训练好的评分模型。Wherein, by pre-acquiring a large amount of sample data in the actual Bluetooth communication link environment, extracting feature information, and marking the sample data, the feature information includes at least one communication parameter (RSSI, SNR, RSCP, etc.) and encoding coefficients to create scoring models. The scoring model can be trained using a large number of test samples, such as the scoring model can be based on a convolutional neural network (Convolutional Neural Network, CNN) model, a deep neural network (Deep Neural Network, DNN) model, a recurrent neural network ( Recurrent NeuralNetworks, RNN), model, embedding (embedding) model, gradient boosting decision tree (Gradient Boosting Decision Tree, GBDT) model, logistic regression (Logistic Regression, LR) model at least one implementation, based on the sample data that has been marked The scoring model is trained to obtain a trained scoring model.

终端然后可以基于各所述编码分数的大小顺序确定多个所述第二音频编码格式的优先级。按照多个所述第二音频编码格式的优先级的高低顺序,可以获取当前第二音频编码格式的下一个第二音频编码格式,例如:多个所述第二音频编码格式分别为A、B、C、D四种,A、B、C、D的优先级顺序依次为A>C>D>B。可以理解的是,在步骤204中,确定第二音频编码格式-A音频编码格式不匹配时,则根据优先级顺序获取当前第二音频编码格式下一个第二音频编码格式-C音频编码格式。然后执行下一步所述将将所述下一个第二音频编码格式作为当前第二音频编码格式的步骤。The terminal may then determine the priorities of the plurality of second audio encoding formats based on the order of the encoding scores. According to the priority order of the plurality of second audio encoding formats, the next second audio encoding format of the current second audio encoding format can be obtained, for example: the plurality of second audio encoding formats are A and B respectively , C, and D. The priority order of A, B, C, and D is A>C>D>B. It can be understood that, in step 204, when it is determined that the second audio coding format-A audio coding format does not match, the next second audio coding format-C audio coding format next to the current second audio coding format is obtained according to the order of priority. Then execute the step of using the next second audio coding format as the current second audio coding format described in the next step.

步骤206:将所述下一个第二音频编码格式作为当前第二音频编码格式,并判断所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式是否匹配,以及所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数是否匹配。Step 206: Use the next second audio encoding format as the current second audio encoding format, and determine whether the first audio encoding format and the second audio encoding format supported by the terminal under the audio encoding protocol are match, and whether the first encoding parameter matches the second audio encoding parameter corresponding to the second audio encoding format.

具体的,以步骤205的举例为例,终端在按照多个所述第二音频编码格式的优先级的高低顺序,获取当前第二音频编码格式的下一个第二音频编码格式-C音频编码格式,将C音频编码格式作为当前第二音频编码格式,并判断所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式(即C音频编码格式)是否匹配,以及所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数(即C音频编码格式对应的C音频编码参数)是否匹配;Specifically, taking the example of step 205 as an example, the terminal acquires the next second audio coding format of the current second audio coding format-C audio coding format according to the priority order of the multiple second audio coding formats. , using the C audio encoding format as the current second audio encoding format, and judging whether the first audio encoding format and the second audio encoding format (ie, the C audio encoding format) supported by the terminal under the audio encoding protocol are Matching, and whether the first encoding parameter matches the second audio encoding parameter corresponding to the second audio encoding format (ie, the C audio encoding parameter corresponding to the C audio encoding format);

当所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式(即C音频编码格式)匹配,以及所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数(即C音频编码格式对应的C音频编码参数)匹配时,终端确定以当前第二音频编码格式进行音频编码,即控制采用所述第二音频编码格式(即C音频编码格式)进行音频编码。When the first audio encoding format matches the second audio encoding format (ie C audio encoding format) supported by the terminal under the audio encoding protocol, and the first encoding parameter matches the second audio encoding format When the second audio coding parameter corresponding to the format (that is, the C audio coding parameter corresponding to the C audio coding format) matches, the terminal determines to perform audio coding in the current second audio coding format, that is, controls the use of the second audio coding format (that is, the C Audio encoding format) for audio encoding.

当所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式不匹配,和/或所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数不匹配时,终端执行所述按照多个所述第二音频编码格式的优先级的高低顺序,获取当前第二音频编码格式的下一个第二音频编码格式的步骤。When the first audio encoding format does not match the second audio encoding format supported by the terminal under the audio encoding protocol, and/or the first encoding parameter corresponds to the second audio encoding format corresponding to the second audio encoding format When the two audio coding parameters do not match, the terminal executes the step of obtaining the next second audio coding format of the current second audio coding format according to the order of priority of the multiple second audio coding formats.

步骤207:当不存在下一个第二音频编码格式时,将所述第二音频编码格式切换为所述音频编码协议下的默认音频编码格式。Step 207: When there is no next second audio coding format, switch the second audio coding format to a default audio coding format under the audio coding protocol.

具体的,当终端基于多个所述第二音频编码格式的优先级的高低顺序,对各第二音频编码格式进行判断,以确定在第二音频编码格式是否存在满足匹配要求的第二音频编码格式,当基于优先级的高低顺序,各优先级的高低顺序确定所述第一音频编码格式与所述终端在所述音频编码协议下所支持的最后一个第二音频编码格式均不匹配,和/或所述第一编码参数与最后一个所述第二音频编码格式对应的第二音频编码参数均不匹配。此时,终端可以确定在所述音频编码协议(如A2DP协议)下所支持的各第二音频编码格式不能满足匹配要求,可以理解的是终端若以第二音频编码格式进行编码,终端与蓝牙音频设备之间蓝牙音频连接(如蓝牙A2DP音频连接)无法保持正常的音频数据交互,蓝牙音频设备无法接收到完整的音频编码数据,即蓝牙音频设备无法播放音频。此时,终端通常确定不存在下一个第二音频编码格式,终端设备可以以默认音频编码格式进行音频编码。在实际应用中,优选以默认音频编码格式为音频编码协议中所约定的蓝牙音频发送端和蓝牙音频接收端对音频编解码的支持必选音频编码格式,如A2DP协议中规定了蓝牙音频发送端和蓝牙音频接收端对音频编解码的支持,其中SBC(Sub-band Coding)音频编码格式是必选的,所述默认音频编码格式即可以为SBC音频编码格式。需要说明的是,当终端和蓝牙音频设备以SBC音频编码格式在A2DP协议下对音频书进行音频编解码时,终端和蓝牙音频设备通常均支持SBC音频编码格式对应的音频编码参数。然后,终端控制当前编码的音频编码格式从所述第二音频编码格式(如AAC音频编码格式)切换为所述音频编码协议下的默认音频编码格式(如A2DP协议下的SBC音频编码格式),从而在用户开启终端上的音频播放功能时,可以控制采用默认音频编码格式对本地或在线音频数据进行音频编码。Specifically, when the terminal judges each second audio coding format based on the priority order of multiple second audio coding formats, to determine whether there is a second audio coding format that meets the matching requirements in the second audio coding format Format, when based on the order of priority, the order of each priority determines that the first audio encoding format does not match the last second audio encoding format supported by the terminal under the audio encoding protocol, and /or the first encoding parameter does not match the last second audio encoding parameter corresponding to the second audio encoding format. At this point, the terminal can determine that the second audio encoding formats supported under the audio encoding protocol (such as the A2DP protocol) cannot meet the matching requirements. It can be understood that if the terminal encodes in the second audio encoding format, the terminal and Bluetooth Bluetooth audio connections (such as Bluetooth A2DP audio connections) between audio devices cannot maintain normal audio data interaction, and Bluetooth audio devices cannot receive complete audio encoding data, that is, Bluetooth audio devices cannot play audio. At this time, the terminal generally determines that there is no next second audio encoding format, and the terminal device may perform audio encoding in a default audio encoding format. In practical applications, it is preferable to use the default audio encoding format as the audio encoding format agreed in the audio encoding protocol by the Bluetooth audio transmitter and the Bluetooth audio receiver to support audio codecs. For example, the Bluetooth audio transmitter is specified in the A2DP protocol And the Bluetooth audio receiving terminal supports the audio codec, wherein the SBC (Sub-band Coding) audio coding format is mandatory, and the default audio coding format can be the SBC audio coding format. It should be noted that when the terminal and the Bluetooth audio device encode and decode the audio book under the A2DP protocol in the SBC audio coding format, both the terminal and the Bluetooth audio device usually support the audio coding parameters corresponding to the SBC audio coding format. Then, the terminal controls the currently encoded audio coding format to switch from the second audio coding format (such as the AAC audio coding format) to the default audio coding format under the audio coding protocol (such as the SBC audio coding format under the A2DP protocol), Therefore, when the user starts the audio playback function on the terminal, it can control to use the default audio encoding format to perform audio encoding on the local or online audio data.

步骤208:向所述蓝牙音频设备发送格式确认信息,所述格式确认信息用于指示所述蓝牙音频设备采用所述默认音频编码格式进行音频编码。Step 208: Send format confirmation information to the Bluetooth audio device, where the format confirmation information is used to instruct the Bluetooth audio device to use the default audio coding format for audio coding.

具体的,终端通过执行上述步骤在确定所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式不匹配,和/或所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数不匹配之后,从终端所支持的第二音频格式、默认音频编码格式中确定默认音频编码格式为在所述音频编码协议下(如A2DP协议)的当前音频编码格式。然后注册在所述音频编码协议下(如A2DP协议)的默认音频编码格式的流端点(Stream End Point,SEP),并通过该SEP与所述蓝牙音频设备协商以建立同样对应于音频编码协议下(如A2DP协议)的默认音频编码格式的SEP,同时向所述蓝牙音频设备发送格式确认信息,所述格式确认信息中可以包含音频编码格式和/或音频编码格式对应的音频编码参数,如,所述格式确认信息中可以包含A2DP协议下的SBC音频编码格式和/或SBC音频编码格式对应的音频编码参数。蓝牙音频设备在接收到所述格式确认信息之后,对当前音频编码配置进行设置,如具体可以是将当前音频编码格式设置为A2DP协议下的SBC音频编码格式,将音频编码参数设置为SBC音频编码格式对应的音频编码参数,从而完成蓝牙音频连接以及蓝牙音频编解码的设置,此时,蓝牙音频设备可以控制采用以所述默认音频编码格式进行工作,接收终端通过音频编码连接发送的音频编码数据,并调用所述默认音频编码格式对应的音频解码器对音频编码数据进行解码,从而正常播放该音频编码数据对应的音频;或,蓝牙音频设备可以控制采用以所述默认音频编码格式进行工作,将本端的音频编码数据通过调用所述默认音频编码格式对应的音频编码器对音频数据进行编码,并将编码之后的音频编码数据通过与终端的蓝牙音频连接(如蓝牙A2DP连接)发送至终端。Specifically, by performing the above steps, the terminal determines that the first audio encoding format does not match the second audio encoding format supported by the terminal under the audio encoding protocol, and/or the first encoding parameter does not match the After the second audio encoding parameters corresponding to the second audio encoding format do not match, determine that the default audio encoding format is under the audio encoding protocol (such as the A2DP protocol) from the second audio format supported by the terminal and the default audio encoding format The current audio encoding format for . Then register the stream endpoint (Stream End Point, SEP) of the default audio coding format under the audio coding protocol (such as the A2DP protocol), and negotiate with the Bluetooth audio device through the SEP to establish the same corresponding audio coding protocol. (such as the SEP of the default audio encoding format of the A2DP protocol), and at the same time send format confirmation information to the Bluetooth audio device, the format confirmation information may include the audio encoding format and/or audio encoding parameters corresponding to the audio encoding format, such as, The format confirmation information may include the SBC audio encoding format under the A2DP protocol and/or the audio encoding parameters corresponding to the SBC audio encoding format. After the Bluetooth audio device receives the format confirmation information, it sets the current audio encoding configuration. For example, the current audio encoding format can be set to the SBC audio encoding format under the A2DP protocol, and the audio encoding parameter is set to SBC audio encoding. Format corresponding audio coding parameters, so as to complete the Bluetooth audio connection and Bluetooth audio codec settings, at this time, the Bluetooth audio device can control the use of the default audio coding format to work, and receive the audio coding data sent by the terminal through the audio coding connection , and call the audio decoder corresponding to the default audio encoding format to decode the audio encoding data, so as to normally play the audio corresponding to the audio encoding data; or, the Bluetooth audio device can be controlled to work in the default audio encoding format, Encode the audio encoded data at the local end by calling the audio encoder corresponding to the default audio encoding format, and send the encoded audio encoded data to the terminal through the Bluetooth audio connection (such as Bluetooth A2DP connection) with the terminal.

步骤209:控制采用所述默认音频编码格式进行音频编码。Step 209: Control the use of the default audio encoding format for audio encoding.

具体可参见步骤103,此处不再赘述。For details, refer to step 103, which will not be repeated here.

步骤210:获取所述蓝牙音频设备的设备标识,将所述设备标识保存至蓝牙黑名单中,并关闭所述第二音频编码格式。Step 210: Obtain the device identifier of the Bluetooth audio device, save the device identifier in a Bluetooth blacklist, and disable the second audio encoding format.

所述设备标识通常是用于表征蓝牙音频设备的类别、型号、规格等的指示信息。通常所述设备标识可以是表示蓝牙音频设备的id,例如1、2、3等表示id的数字;可以是表示蓝牙音频设备的MAC地址、IP地址;可以是表示蓝牙音频设备的关键字符,例如a,b,c等;可以是表示蓝牙音频设备的关键字符串,例如pth_a,pth_b,pth_c;等等。The device identifier is generally indication information used to characterize the type, model, specification, etc. of the Bluetooth audio device. Generally, the device identifier can be an id representing a Bluetooth audio device, such as 1, 2, 3, etc., representing id numbers; it can be a MAC address or an IP address representing a Bluetooth audio device; it can be a key character representing a Bluetooth audio device, such as a, b, c, etc.; can be key strings representing Bluetooth audio devices, such as pth_a, pth_b, pth_c; etc.

进一步的,所述设备标识还可以是蓝牙音频设备的芯片型号、出厂编码、蓝牙协议版本号等信息。Further, the device identifier may also be information such as the chip model, factory code, and Bluetooth protocol version number of the Bluetooth audio device.

具体的,终端通常可以控制所包含的蓝牙通信模块在蓝牙通信范围内扫描蓝牙设备,以搜索到所述蓝牙通信范围内的蓝牙音频设备,可以理解的是一旦终端扫描到蓝牙音频设备之后,就可以从蓝牙音频设备获取蓝牙音频设备的设备标识;或,在建立与蓝牙音频设备的蓝牙连接的过程中,终端通常可以扫描到蓝牙音频设备开启蓝牙功能广播的蓝牙广播包,终端可以对接收到的蓝牙广播包进行解析,以获取蓝牙广播包中的设备标识;由于该设备标识可以唯一标识一个蓝牙音频设备,所述终端可以根据蓝牙标识区分不同的蓝牙设备,使得在第二音频编码格式以及第二音频编码参数不满足于蓝牙音频设备的匹配要求时,可以对该蓝牙音频设备的蓝牙标识进行记录,终端可以在下次建立与蓝牙设备的蓝牙音频连接时避免控制采用第二音频编码格式进行编码,并关闭所述第二音频编码格式,所述关闭可以理解的对与第二音频编码格式相关的编码进程进行灭活。Specifically, the terminal can usually control the included Bluetooth communication module to scan for Bluetooth devices within the Bluetooth communication range to search for Bluetooth audio devices within the Bluetooth communication range. It can be understood that once the terminal scans the Bluetooth audio device, it will The device identifier of the Bluetooth audio device can be obtained from the Bluetooth audio device; or, during the process of establishing a Bluetooth connection with the Bluetooth audio device, the terminal can usually scan the Bluetooth broadcast packet broadcast by the Bluetooth audio device with the Bluetooth function enabled, and the terminal can respond to the received The Bluetooth broadcast packet is parsed to obtain the device identifier in the Bluetooth broadcast packet; since the device identifier can uniquely identify a Bluetooth audio device, the terminal can distinguish different Bluetooth devices according to the Bluetooth identifier, so that in the second audio encoding format and When the second audio coding parameter does not meet the matching requirements of the Bluetooth audio device, the Bluetooth identification of the Bluetooth audio device can be recorded, and the terminal can avoid controlling the use of the second audio coding format when establishing a Bluetooth audio connection with the Bluetooth device next time. encoding, and closing the second audio encoding format, where the closing can understandably inactivate an encoding process related to the second audio encoding format.

在一种可行的实施方式中,终端可以对所支持的各第二蓝牙音频编码格式建立对应的蓝牙黑名单,例如终端支持A、B、C、D 4种蓝牙音频编码格式,分别对应蓝牙黑名单A、蓝牙黑名单B、蓝牙黑名单C、蓝牙黑名单D。终端通过执行本申请实施例的所述音频编码格式确定方法,在确定某一第二蓝牙音频编码格式与蓝牙音频设备所支持的不匹配时,即确定该“某一第二蓝牙音频编码格式”对应的目标蓝牙黑名单,将设备标识加入至目标蓝牙黑名单,终端可以在下次建立与蓝牙设备的蓝牙音频连接时避免控制采用“某一第二蓝牙音频编码格式”进行编码。In a feasible implementation manner, the terminal can establish a corresponding Bluetooth blacklist for each supported second Bluetooth audio encoding format, for example, the terminal supports four Bluetooth audio encoding formats A, B, C, and D, which correspond to Bluetooth blacklists respectively. List A, Bluetooth Blacklist B, Bluetooth Blacklist C, Bluetooth Blacklist D. By executing the method for determining the audio coding format in the embodiment of the present application, the terminal determines that "a certain second Bluetooth audio coding format" does not match when it is determined that a certain second Bluetooth audio coding format does not match the one supported by the Bluetooth audio device. The corresponding target bluetooth blacklist, adding the device identification to the target bluetooth blacklist, the terminal can avoid controlling to use "a certain second bluetooth audio encoding format" for encoding when establishing a bluetooth audio connection with the bluetooth device next time.

在一种可行的实施方式,终端可以根据所支持的各第二蓝牙音频编码格式对应的音频编码品质分级,如分为一级音频编码格式和二级音频编码格式,其中,一级音频编码方式可以至少包括LDAC编码格式、APT-X编码格式,二级音频编码方式可以至少包括AAC编码格式、SBC(sub band code)。可以理解的,需要说明的是,上述的音频编码方式仅为举例需要,并不限制音频编码方式的种类,具体地,可以自定义一规则,将所有的音频编码方式划分一级音频编码格式和二级音频编码,则一级音频编码对应蓝牙黑名单1,二级音频编码对应蓝牙黑名单2。当蓝牙音频设备不支持一级音频编码时,即将设备标识加入至蓝牙黑名单1;以及当蓝牙音频设备不支持二级音频编码时,即将设备标识加入至蓝牙黑名单2;其中,在实际操作中,若蓝牙音频设备的设备标识在蓝牙黑名单1中,即不采用蓝牙黑名单1对应的蓝牙音频编码方式进行编码。In a feasible implementation manner, the terminal can be classified according to the audio coding quality corresponding to each second Bluetooth audio coding format supported, such as divided into a primary audio coding format and a secondary audio coding format, wherein the primary audio coding format It may include at least LDAC encoding format and APT-X encoding format, and the secondary audio encoding method may at least include AAC encoding format and SBC (sub band code). Understandably, it should be noted that the above-mentioned audio coding methods are only examples, and do not limit the types of audio coding methods. Specifically, a rule can be defined to divide all audio coding methods into one-level audio coding format and Level 2 audio encoding, the first level audio encoding corresponds to Bluetooth blacklist 1, and the second level audio encoding corresponds to Bluetooth blacklist 2. When the Bluetooth audio device does not support the first-level audio encoding, the device identification is added to the Bluetooth blacklist 1; and when the Bluetooth audio device does not support the second-level audio encoding, the device identification is added to the Bluetooth blacklist 2; wherein, in actual operation Among them, if the device identifier of the Bluetooth audio device is in the Bluetooth blacklist 1, the Bluetooth audio encoding method corresponding to the Bluetooth blacklist 1 is not used for encoding.

在本申请实施例中,在本申请一个或多个实施例中,终端通过获取蓝牙音频设备在音频编码协议下所支持的第一音频编码格式和所述第一音频编码格式对应的第一编码参数,在所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式不匹配,和/或所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数不匹配时,将所述第二音频编码格式切换为所述音频编码协议下终端以及蓝牙音频设备均支持的默认音频编码格式,以默认音频编码格式进行音频编码。可以避免在终端与蓝牙音频设备支持的蓝牙音频格式相同而对应的音频编码参数不匹配的情况下导致蓝牙音频连接中断的问题,提高了终端与蓝牙音频设备间蓝牙音频连接的稳定性,从而保证了蓝牙音频功能正常使用;以及,当第一音频编码格式与第二音频编码格式不匹配,和/或第一音频参数与第二音频参数不匹配时,将设备标识保存至蓝牙黑名单,终端可以在下一次与蓝牙音频设备的匹配音频编码格式时基于蓝牙黑名单中的设备标识进行匹配,可以节省下一次与蓝牙音频设备的匹配音频编码格式的时间;以及,当终端所支持的第二音频格式为多个时,基于蓝牙连接状态参数与第二音频编码格式分别对应的编码系数确定多个所述第二音频编码格式的优先级的高低顺序,根据优先级的高低顺序进行音频编码格式匹配,可以提高音频编码格式匹配的准确性。In the embodiment of the present application, in one or more embodiments of the present application, the terminal obtains the first audio coding format supported by the Bluetooth audio device under the audio coding protocol and the first coding format corresponding to the first audio coding format parameter, when the first audio encoding format does not match the second audio encoding format supported by the terminal under the audio encoding protocol, and/or the first encoding parameter corresponds to the second audio encoding format When the second audio encoding parameters do not match, switch the second audio encoding format to the default audio encoding format supported by both the terminal and the Bluetooth audio device under the audio encoding protocol, and perform audio encoding in the default audio encoding format. It can avoid the problem that the Bluetooth audio connection is interrupted when the Bluetooth audio formats supported by the terminal and the Bluetooth audio device are the same but the corresponding audio encoding parameters do not match, and the stability of the Bluetooth audio connection between the terminal and the Bluetooth audio device is improved, thereby ensuring and, when the first audio encoding format does not match the second audio encoding format, and/or when the first audio parameter does not match the second audio parameter, save the device identification to the Bluetooth blacklist, and the terminal It can be matched based on the device identification in the Bluetooth blacklist when matching the audio encoding format with the Bluetooth audio device next time, which can save the time for matching the audio encoding format with the Bluetooth audio device next time; and, when the second audio encoding format supported by the terminal When there are multiple formats, the priority order of multiple second audio encoding formats is determined based on the encoding coefficients corresponding to the bluetooth connection status parameters and the second audio encoding format, and the audio encoding format is matched according to the priority order , which can improve the accuracy of audio encoding format matching.

请参见图5,为本申请实施例提供的一种音频编码格式确定系统的场景示意图。如图5所示,所述音频编码格式确定系统可以包括终端100以及蓝牙音频设备集群。所述蓝牙音频设备集群可以包括多个蓝牙音频设备,如图1所示,具体包括蓝牙音频设备1、蓝牙音频设备2、…、蓝牙音频设备n,n为大于0的整数;为便于理解,本发明实施例以图1中的终端100和蓝牙音频设备1为例进行描述。Please refer to FIG. 5 , which is a schematic diagram of a scene of a system for determining an audio coding format provided by an embodiment of the present application. As shown in FIG. 5 , the system for determining an audio encoding format may include a terminal 100 and a Bluetooth audio device cluster. The Bluetooth audio device cluster can include a plurality of Bluetooth audio devices, as shown in Figure 1, specifically including Bluetooth audio device 1, Bluetooth audio device 2, ..., Bluetooth audio device n, n is an integer greater than 0; for ease of understanding, The embodiment of the present invention is described by taking the terminal 100 and the Bluetooth audio device 1 in FIG. 1 as examples.

所述蓝牙音频设备集群中的各蓝牙音频设备可以是具有蓝牙音频功能的电子设备,该电子设备包括但不限于:蓝牙耳机、蓝牙音箱、智能手环、个人电脑、平板电脑、车载设备、计算设备或连接到无线调制解调器的其它处理设备等。Each Bluetooth audio device in the Bluetooth audio device cluster can be an electronic device with a Bluetooth audio function, and the electronic device includes but is not limited to: a Bluetooth headset, a Bluetooth speaker, a smart bracelet, a personal computer, a tablet computer, a vehicle device, a computer device or other processing equipment connected to the wireless modem, etc.

所述终端100包括但不限于移动台(MS,Mobile Station)、移动终端(MobileTerminal)、移动电话(Mobile Telephone)、手机(handset)及便携设备(portableequipment)等,该终端可以经无线接入网(RAN,Radio Access Network)与一个或多个核心网进行通信,例如,终端可以是移动电话(或称为“蜂窝”电话)、具有无线通信功能的计算机等,终端还可以是便携式、袖珍式、手持式、计算机内置的或者车载的移动装置或设备。The terminal 100 includes, but is not limited to, a mobile station (MS, Mobile Station), a mobile terminal (MobileTerminal), a mobile phone (Mobile Telephone), a mobile phone (handset), and a portable equipment (portable equipment). (RAN, Radio Access Network) communicates with one or more core networks. For example, the terminal can be a mobile phone (or called a "cellular" phone), a computer with wireless communication functions, etc., and the terminal can also be a portable, pocket-sized , handheld, computer built-in, or vehicle-mounted mobile devices or equipment.

终端100建立与蓝牙音频设备1的蓝牙连接。The terminal 100 establishes a Bluetooth connection with the Bluetooth audio device 1 .

具体的,终端100可以监听用户所输入的蓝牙配对指令,获取针对所述蓝牙配对指令输入的蓝牙配对信息。Specifically, the terminal 100 may monitor the Bluetooth pairing instruction input by the user, and acquire Bluetooth pairing information input for the Bluetooth pairing instruction.

所述蓝牙配对指令是指计算机执行蓝牙配对操作的代码,在本实施例可以理解为所述终端100执行建立与蓝牙音频设备1进行蓝牙配对操作的代码。The Bluetooth pairing instruction refers to a code for a computer to execute a Bluetooth pairing operation. In this embodiment, it can be understood that the terminal 100 executes a code for establishing a Bluetooth pairing operation with the Bluetooth audio device 1 .

具体的,所述终端100可以具有触摸屏,当用户通过触控笔或手指触控的方式触控终端100显示界面上的目标蓝夜音频设备的选项时,终端100通过检测到蓝牙图标位置的电容参数发生变化,监听到用户输入的蓝牙配对指令,同时基于用户所输入的蓝牙配对信息,所述蓝牙配对信息可以理解为蓝牙音频设备1的设备标识,具体可以是用户在终端100的蓝牙配对设备列表中选中蓝牙音频设备1的设备标识。此时,终端100即获取到用户针对所述蓝牙配对指令输入的蓝牙配对信息。然后终端100开始建立与与蓝牙音频设备1的蓝牙连接,其中,所述建立蓝牙连接的详细步骤可参考相关技术,此处不在具体赘述。Specifically, the terminal 100 may have a touch screen. When the user touches the option of the target blue night audio device on the display interface of the terminal 100 by means of a stylus or finger touch, the terminal 100 detects the capacitance of the position of the Bluetooth icon. The parameter changes, and the Bluetooth pairing command input by the user is monitored, and based on the Bluetooth pairing information input by the user, the Bluetooth pairing information can be understood as the device identification of the Bluetooth audio device 1, specifically, the Bluetooth pairing device of the user on the terminal 100 Select the device ID of Bluetooth audio device 1 in the list. At this point, the terminal 100 acquires the Bluetooth pairing information input by the user for the Bluetooth pairing instruction. Then the terminal 100 starts to establish a Bluetooth connection with the Bluetooth audio device 1 , wherein, for detailed steps of establishing the Bluetooth connection, reference may be made to related technologies, which will not be repeated here.

终端100终端在建立与蓝牙音频设备1的蓝牙连接之后,可以基于所述蓝牙连接可以向蓝牙音频设备1发送在音频编码协议下的编码信息获取请求,以询问蓝牙音频设备1所支持的音频编码信息,如所支持的音频编码格式以及该音频编码格式所对应的音频编码参数。After the terminal 100 establishes the Bluetooth connection with the Bluetooth audio device 1, based on the Bluetooth connection, it can send a coding information acquisition request under the audio coding protocol to the Bluetooth audio device 1 to inquire about the audio coding supported by the Bluetooth audio device 1. Information, such as the supported audio encoding format and the audio encoding parameters corresponding to the audio encoding format.

蓝牙音频设备1在接收到终端100发送的所述编码信息获取请求之后,可以响应于所述编码信息获取请求,通过执行请求蓝牙音频设备1的编码信息的代码,可以获取到本地所存储的音频编码信息-“所述音频编码协议下所支持的第一音频编码格式以及所述第一音频编码格式对应的第一编码参数”,然后将所述包含第一音频编码格式以及第一编码参数的编码信息通过蓝牙连接发送至所述终端100。After the Bluetooth audio device 1 receives the coded information acquisition request sent by the terminal 100, it can respond to the coded information acquisition request by executing the code requesting the coded information of the Bluetooth audio device 1 to obtain the locally stored audio. Encoding information - "the first audio encoding format supported under the audio encoding protocol and the first encoding parameter corresponding to the first audio encoding format", and then the information containing the first audio encoding format and the first encoding parameter The coded information is sent to the terminal 100 via a Bluetooth connection.

终端100即可接收到蓝牙音频设备1发送的在所述音频编码协议下所支持的第一音频编码格式以及所述第一音频编码格式对应的第一编码参数。The terminal 100 can then receive the first audio encoding format supported under the audio encoding protocol and the first encoding parameters corresponding to the first audio encoding format sent by the Bluetooth audio device 1 .

终端100获取在所述音频编码协议(如A2DP协议)下所支持的第二音频编码格式以及第二音频编码格式,如,通常终端100的所支持的第二音频编码格式以及第二音频编码格式保存至音频编码配置文件中,终端100可以在本地的音频编码配置文件中获取音频编码协议下所支持的第二音频编码格式以及第二编码参数。然后判断所述第一音频编码格式与第二音频编码格式是否匹配,以及所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数是否匹配。The terminal 100 acquires the second audio encoding format and the second audio encoding format supported under the audio encoding protocol (such as the A2DP protocol), for example, the second audio encoding format and the second audio encoding format generally supported by the terminal 100 Save to the audio encoding configuration file, and the terminal 100 can obtain the second audio encoding format and the second encoding parameters supported under the audio encoding protocol from the local audio encoding configuration file. Then judge whether the first audio encoding format matches the second audio encoding format, and whether the first encoding parameter matches the second audio encoding parameter corresponding to the second audio encoding format.

具体的,终端100判断所述第一音频编码格式与第二音频编码格式是否匹配,以及所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数是否匹配,通常存在4种情况:Specifically, the terminal 100 judges whether the first audio encoding format matches the second audio encoding format, and whether the first encoding parameter matches the second audio encoding parameter corresponding to the second audio encoding format. Generally, there are 4 Cases:

1、所述第一音频编码格式与第二音频编码格式匹配,以及所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数匹配;1. The first audio encoding format matches the second audio encoding format, and the first encoding parameter matches the second audio encoding parameter corresponding to the second audio encoding format;

2、所述第一音频编码格式与第二音频编码格式不匹配,以及所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数匹配;2. The first audio encoding format does not match the second audio encoding format, and the first encoding parameter matches the second audio encoding parameter corresponding to the second audio encoding format;

3、所述第一音频编码格式与第二音频编码格式匹配,以及所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数不匹配;3. The first audio encoding format matches the second audio encoding format, and the first encoding parameter does not match the second audio encoding parameter corresponding to the second audio encoding format;

4、所述第一音频编码格式与第二音频编码格式匹配,以及所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数匹配。4. The first audio coding format matches the second audio coding format, and the first coding parameter matches the second audio coding parameter corresponding to the second audio coding format.

在上述4种情况中,第4种情况:当所述第一音频编码格式与第二音频编码格式匹配,以及所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数匹配时,终端100即确定与蓝牙音频设备1控制采用以第二音频编码格式进行音频编码;第1种情况、第2种情况以及第3种情况,终端确定所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式不匹配,和/或所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数不匹配,此时,终端100将所述第二音频编码格式切换为所述音频编码协议下的默认音频编码格式。In the above four cases, the fourth case: when the first audio encoding format matches the second audio encoding format, and the first encoding parameter corresponds to the second audio encoding parameter of the second audio encoding format When matching, the terminal 100 determines that the Bluetooth audio device 1 controls to use the second audio coding format for audio coding; in the first case, the second case and the third case, the terminal determines that the first audio coding format is compatible with the The second audio encoding format supported by the terminal under the audio encoding protocol does not match, and/or the first encoding parameter does not match the second audio encoding parameter corresponding to the second audio encoding format. At this time, The terminal 100 switches the second audio encoding format to a default audio encoding format under the audio encoding protocol.

在实际应用中,终端100优选以默认音频编码格式为音频编码协议中所约定的蓝牙音频发送端和蓝牙音频接收端对音频编解码的支持必选音频编码格式,如A2DP协议中规定了蓝牙音频发送端和蓝牙音频接收端对音频编解码的支持,其中SBC(Sub-band Coding)音频编码格式是必选的,所述默认音频编码格式即可以为SBC音频编码格式。需要说明的是,当终端100和蓝牙音频设备1以SBC音频编码格式在A2DP协议下对音频书进行音频编解码时,终端100和蓝牙音频设备1通常均支持SBC音频编码格式对应的音频编码参数。In practical applications, the terminal 100 preferably uses the default audio encoding format as the audio encoding format agreed in the audio encoding agreement by the Bluetooth audio transmitter and the Bluetooth audio receiver to support audio codecs. For example, the Bluetooth audio encoding format is specified in the A2DP protocol. The audio coding and decoding supported by the sending end and the Bluetooth audio receiving end, wherein the SBC (Sub-band Coding) audio coding format is mandatory, and the default audio coding format can be the SBC audio coding format. It should be noted that when the terminal 100 and the Bluetooth audio device 1 perform audio coding and decoding on the audio book under the A2DP protocol in the SBC audio coding format, the terminal 100 and the Bluetooth audio device 1 generally support the audio coding parameters corresponding to the SBC audio coding format .

终端100通过执行上述步骤在确定所述第一音频编码格式与所述终端100在所述音频编码协议下所支持的第二音频编码格式不匹配,和/或所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数不匹配之后,从终端100所支持的第二音频格式、默认音频编码格式中确定默认音频编码格式为在所述音频编码协议下(如A2DP协议)的当前音频编码格式,终端100同时向所述蓝牙音频设备1发送格式确认信息,所述格式确认信息中可以包含音频编码格式和/或音频编码格式对应的音频编码参数.The terminal 100 determines that the first audio encoding format does not match the second audio encoding format supported by the terminal 100 under the audio encoding protocol by performing the above steps, and/or the first encoding parameter does not match the After the second audio encoding parameters corresponding to the second audio encoding format do not match, determine that the default audio encoding format is under the audio encoding protocol (such as the A2DP protocol) from the second audio format supported by the terminal 100 and the default audio encoding format. The terminal 100 sends format confirmation information to the Bluetooth audio device 1 at the same time, and the format confirmation information may include the audio coding format and/or the audio coding parameters corresponding to the audio coding format.

例如,所述格式确认信息中可以包含A2DP协议下的SBC音频编码格式和/或SBC音频编码格式对应的音频编码参数。蓝牙音频设备1在接收到所述格式确认信息之后,对当前音频编码配置进行设置,如具体可以是将当前音频编码格式设置为A2DP协议下的SBC音频编码格式,将音频编码参数设置为SBC音频编码格式对应的音频编码参数,从而完成蓝牙音频连接以及蓝牙音频编解码的设置,此时,蓝牙音频设备1可以控制采用以所述默认音频编码格式进行工作。For example, the format confirmation information may include the SBC audio encoding format under the A2DP protocol and/or the audio encoding parameters corresponding to the SBC audio encoding format. After receiving the format confirmation information, the Bluetooth audio device 1 sets the current audio encoding configuration. For example, the current audio encoding format can be set as the SBC audio encoding format under the A2DP protocol, and the audio encoding parameter is set as the SBC audio encoding format. The audio encoding parameters corresponding to the encoding format, so as to complete the Bluetooth audio connection and the Bluetooth audio encoding and decoding settings. At this time, the Bluetooth audio device 1 can be controlled to use the default audio encoding format to work.

终端100可以通过音频编码连接向蓝牙音频设备1发送的音频编码数据;The terminal 100 can connect the audio encoding data sent to the Bluetooth audio device 1 through the audio encoding connection;

蓝牙音频设备1接收终端100通过音频编码连接发送的音频编码数据,并调用所述默认音频编码格式对应的音频解码器对音频编码数据进行解码,从而正常播放该音频编码数据对应的音频;或,The Bluetooth audio device 1 receives the audio encoded data sent by the terminal 100 through the audio encoding connection, and calls the audio decoder corresponding to the default audio encoding format to decode the audio encoded data, so as to normally play the audio corresponding to the audio encoded data; or,

蓝牙音频设备1可以控制采用以所述默认音频编码格式进行工作,将本端的音频编码数据通过调用所述默认音频编码格式对应的音频编码器对音频数据进行编码,并将编码之后的音频编码数据通过与终端100的蓝牙音频连接(如蓝牙A2DP连接)发送至终端100。The Bluetooth audio device 1 can be controlled to work with the default audio encoding format, encode the audio encoding data of the local end by calling the audio encoder corresponding to the default audio encoding format, and encode the encoded audio encoding data It is sent to the terminal 100 through a Bluetooth audio connection (such as a Bluetooth A2DP connection) with the terminal 100 .

在本申请实施例中,在本申请一个或多个实施例中,终端通过获取蓝牙音频设备在音频编码协议下所支持的第一音频编码格式和所述第一音频编码格式对应的第一编码参数,在所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式不匹配,和/或所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数不匹配时,将所述第二音频编码格式切换为所述音频编码协议下终端以及蓝牙音频设备均支持的默认音频编码格式,以默认音频编码格式进行音频编码。可以避免在终端与蓝牙音频设备支持的蓝牙音频格式相同而对应的音频编码参数不匹配的情况下导致蓝牙音频连接中断的问题,提高了终端与蓝牙音频设备间蓝牙音频连接的稳定性,从而保证了蓝牙音频功能正常使用。In the embodiment of the present application, in one or more embodiments of the present application, the terminal obtains the first audio coding format supported by the Bluetooth audio device under the audio coding protocol and the first coding format corresponding to the first audio coding format parameter, when the first audio encoding format does not match the second audio encoding format supported by the terminal under the audio encoding protocol, and/or the first encoding parameter corresponds to the second audio encoding format When the second audio encoding parameters do not match, switch the second audio encoding format to the default audio encoding format supported by both the terminal and the Bluetooth audio device under the audio encoding protocol, and perform audio encoding in the default audio encoding format. It can avoid the problem that the Bluetooth audio connection is interrupted when the Bluetooth audio formats supported by the terminal and the Bluetooth audio device are the same but the corresponding audio encoding parameters do not match, and the stability of the Bluetooth audio connection between the terminal and the Bluetooth audio device is improved, thereby ensuring The Bluetooth audio function works normally.

下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.

请参见图6,其示出了本申请一个示例性实施例提供的音频编码格式确定装置的结构示意图。该音频编码格式确定装置可以通过软件、硬件或者两者的结合实现成为装置的全部或一部分。该装置1包括格式参数获取模块11、编码格式切换模块12和音频编码控制模块13。Please refer to FIG. 6 , which shows a schematic structural diagram of an apparatus for determining an audio coding format provided by an exemplary embodiment of the present application. The device for determining the audio coding format can be implemented as all or a part of the device through software, hardware or a combination of the two. The device 1 includes a format parameter acquisition module 11 , a coding format switching module 12 and an audio coding control module 13 .

格式参数获取模块11,用于获取蓝牙音频设备在音频编码协议下所支持的第一音频编码格式以及所述第一音频编码格式对应的第一编码参数;The format parameter obtaining module 11 is used to obtain the first audio coding format supported by the Bluetooth audio device under the audio coding protocol and the first coding parameter corresponding to the first audio coding format;

编码格式切换模块12,用于确定所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式不匹配,和/或所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数不匹配,将所述第二音频编码格式切换为所述音频编码协议下的默认音频编码格式;An encoding format switching module 12, configured to determine that the first audio encoding format does not match the second audio encoding format supported by the terminal under the audio encoding protocol, and/or the first encoding parameter is inconsistent with the The second audio encoding parameters corresponding to the second audio encoding format do not match, switching the second audio encoding format to the default audio encoding format under the audio encoding protocol;

音频编码控制模块13,用于控制采用所述默认音频编码格式进行音频编码。The audio coding control module 13 is configured to control audio coding using the default audio coding format.

可选的,如图7所示,所述格式参数获取模块11,包括:Optionally, as shown in Figure 7, the format parameter acquisition module 11 includes:

获取请求发送单元111,用于向蓝牙音频设备发送在音频编码协议下的编码信息获取请求;An acquisition request sending unit 111, configured to send an encoding information acquisition request under the audio encoding protocol to the Bluetooth audio device;

格式参数获取单元112,用于接收所述蓝牙音频设备发送的在所述音频编码协议下所支持的第一音频编码格式以及所述第一音频编码格式对应的第一编码参数。The format parameter acquisition unit 112 is configured to receive the first audio encoding format supported under the audio encoding protocol and the first encoding parameter corresponding to the first audio encoding format sent by the Bluetooth audio device.

可选的,如图9所示,所述装置1,还包括:Optionally, as shown in Figure 9, the device 1 further includes:

编码格式匹配模块14,用于判断所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式是否匹配,以及所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数是否匹配。An encoding format matching module 14, configured to determine whether the first audio encoding format matches a second audio encoding format supported by the terminal under the audio encoding protocol, and whether the first encoding parameter matches the second audio encoding format. Whether the second audio encoding parameter corresponding to the audio encoding format matches.

可选的,所述第二音频编码格式包括多个,如图8所示,所述编码格式切换模块12,还包括:Optionally, the second audio encoding format includes multiple formats, as shown in FIG. 8, the encoding format switching module 12 further includes:

编码格式获取单元121,用于按照多个所述第二音频编码格式的优先级的高低顺序,获取当前第二音频编码格式的下一个第二音频编码格式;The encoding format acquisition unit 121 is configured to acquire the next second audio encoding format of the current second audio encoding format according to the order of priority of the plurality of second audio encoding formats;

音频编码匹配单元122,用于将所述下一个第二音频编码格式作为当前第二音频编码格式,并执行判断所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式是否匹配,以及所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数是否匹配的步骤;The audio coding matching unit 122 is configured to use the next second audio coding format as the current second audio coding format, and perform judgment on the first audio coding format and the audio coding format supported by the terminal under the audio coding protocol. Whether the second audio encoding format matches, and whether the first encoding parameter matches the second audio encoding parameter corresponding to the second audio encoding format;

编码格式切换单元123,用于当不存在下一个第二音频编码格式时,将所述第二音频编码格式切换为所述音频编码协议下的默认音频编码格式。The encoding format switching unit 123 is configured to switch the second audio encoding format to a default audio encoding format under the audio encoding protocol when there is no next second audio encoding format.

可选的,如图9所示,所述装置1,还包括:Optionally, as shown in Figure 9, the device 1 further includes:

优先级确定模块15,用于获取与所述蓝牙音频设备的蓝牙连接状态参数,以及获取多个所述第二音频编码格式分别对应的编码系数;A priority determination module 15, configured to obtain a Bluetooth connection state parameter with the Bluetooth audio device, and obtain a plurality of coding coefficients respectively corresponding to the second audio coding format;

所述优先级确定模块15,还用于将所述编码系数以及所述蓝牙连接状态参数输入至评分模型中,分别得到多个所述第二音频编码格式对应的编码分数;The priority determination module 15 is further configured to input the encoding coefficient and the Bluetooth connection status parameter into the scoring model, and respectively obtain a plurality of encoding scores corresponding to the second audio encoding format;

所述优先级确定模块15,还用于基于各所述编码分数的大小顺序确定多个所述第二音频编码格式的优先级。The priority determination module 15 is further configured to determine the priority of multiple second audio encoding formats based on the order of the encoding scores.

可选的,如图9所示,所述装置1,还包括:Optionally, as shown in Figure 9, the device 1 further includes:

设备标识保存模块16,用于获取所述蓝牙音频设备的设备标识,将所述设备标识保存至蓝牙黑名单中,并关闭所述第二音频编码格式。The device identification saving module 16 is configured to obtain the device identification of the Bluetooth audio device, save the device identification in the Bluetooth blacklist, and close the second audio encoding format.

可选的,如图9所示,所述装置1,还包括:Optionally, as shown in Figure 9, the device 1 further includes:

格式信息发送模块17,用于向所述蓝牙音频设备发送格式确认信息,所述格式确认信息用于指示所述蓝牙音频设备采用所述默认音频编码格式进行音频编码。The format information sending module 17 is configured to send format confirmation information to the Bluetooth audio device, and the format confirmation information is used to instruct the Bluetooth audio device to use the default audio coding format for audio coding.

需要说明的是,上述实施例提供的音频编码格式确定装置在执行音频编码格式确定方法时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的音频编码格式确定装置与音频编码格式确定方法实施例属于同一构思,其体现实现过程详见方法实施例,这里不再赘述。It should be noted that, when the audio coding format determining device provided in the above-mentioned embodiments executes the audio coding format determining method, the division of the above-mentioned functional modules is used as an example for illustration. In practical applications, the above-mentioned functions can be assigned by different The functional modules are completed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device for determining the audio encoding format provided by the above embodiment and the embodiment of the method for determining the audio encoding format belong to the same concept, and the implementation process thereof is detailed in the method embodiment, and will not be repeated here.

上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above embodiments of the present application are for description only, and do not represent the advantages and disadvantages of the embodiments.

在本实施例中,在本申请一个或多个实施例中,终端通过获取蓝牙音频设备在音频编码协议下所支持的第一音频编码格式和所述第一音频编码格式对应的第一编码参数,在所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式不匹配,和/或所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数不匹配时,将所述第二音频编码格式切换为所述音频编码协议下终端以及蓝牙音频设备均支持的默认音频编码格式,以默认音频编码格式进行音频编码。可以避免在终端与蓝牙音频设备支持的蓝牙音频格式相同而对应的音频编码参数不匹配的情况下导致蓝牙音频连接中断的问题,提高了终端与蓝牙音频设备间蓝牙音频连接的稳定性,从而保证了蓝牙音频功能正常使用;以及,当第一音频编码格式与第二音频编码格式不匹配,和/或第一音频参数与第二音频参数不匹配时,将设备标识保存至蓝牙黑名单,终端可以在下一次与蓝牙音频设备的匹配音频编码格式时基于蓝牙黑名单中的设备标识进行匹配,可以节省下一次与蓝牙音频设备的匹配音频编码格式的时间;以及,当终端所支持的第二音频格式为多个时,基于蓝牙连接状态参数与第二音频编码格式分别对应的编码系数确定多个所述第二音频编码格式的优先级的高低顺序,根据优先级的高低顺序进行音频编码格式匹配,可以提高音频编码格式匹配的准确性。In this embodiment, in one or more embodiments of the present application, the terminal obtains the first audio coding format supported by the Bluetooth audio device under the audio coding protocol and the first coding parameter corresponding to the first audio coding format , when the first audio encoding format does not match the second audio encoding format supported by the terminal under the audio encoding protocol, and/or the first encoding parameter corresponds to the second audio encoding format When the second audio encoding parameters do not match, switch the second audio encoding format to a default audio encoding format supported by both the terminal and the Bluetooth audio device under the audio encoding protocol, and perform audio encoding in the default audio encoding format. It can avoid the problem that the Bluetooth audio connection is interrupted when the Bluetooth audio formats supported by the terminal and the Bluetooth audio device are the same but the corresponding audio encoding parameters do not match, and the stability of the Bluetooth audio connection between the terminal and the Bluetooth audio device is improved, thereby ensuring and, when the first audio encoding format does not match the second audio encoding format, and/or when the first audio parameter does not match the second audio parameter, save the device identification to the Bluetooth blacklist, and the terminal It can be matched based on the device identification in the Bluetooth blacklist when matching the audio encoding format with the Bluetooth audio device next time, which can save the time for matching the audio encoding format with the Bluetooth audio device next time; and, when the second audio encoding format supported by the terminal When there are multiple formats, the priority order of multiple second audio encoding formats is determined based on the encoding coefficients corresponding to the bluetooth connection status parameters and the second audio encoding format, and the audio encoding format is matched according to the priority order , which can improve the accuracy of audio encoding format matching.

本申请实施例还提供了一种计算机存储介质,所述计算机存储介质可以存储有多条指令,所述指令适于由处理器加载并执行如上述图1-图5所示实施例的所述音频编码格式确定方法,具体执行过程可以参见图1-图5所示实施例的具体说明,在此不进行赘述。The embodiment of the present application also provides a computer storage medium, the computer storage medium can store a plurality of instructions, and the instructions are suitable for being loaded and executed by a processor as described in the above-mentioned embodiments shown in FIGS. 1-5 . For the method for determining the audio coding format, the specific execution process can refer to the specific descriptions of the embodiments shown in FIGS. 1-5 , and details are not repeated here.

本申请还提供了一种计算机程序产品,该计算机程序产品存储有至少一条指令,所述至少一条指令由所述处理器加载并执行如上述图1-图5所示实施例的所述音频编码格式确定方法,具体执行过程可以参见图1-图5所示实施例的具体说明,在此不进行赘述。The present application also provides a computer program product, the computer program product stores at least one instruction, and the at least one instruction is loaded by the processor and executes the audio coding in the embodiment shown in the above-mentioned Fig. 1-Fig. 5 For the format determining method and the specific execution process, refer to the specific descriptions of the embodiments shown in FIGS. 1-5 , and details are not repeated here.

请参见图10,为本申请实施例提供了一种电子设备的结构示意图。如图10所示,所述电子设备1000可以包括:至少一个处理器1001,至少一个网络接口1004,用户接口1003,存储器1005,至少一个通信总线1002。Please refer to FIG. 10 , which provides a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in FIG. 10 , the electronic device 1000 may include: at least one processor 1001 , at least one network interface 1004 , a user interface 1003 , a memory 1005 , and at least one communication bus 1002 .

其中,通信总线1002用于实现这些组件之间的连接通信。Wherein, the communication bus 1002 is used to realize connection and communication between these components.

其中,用户接口1003可以包括显示屏(Display)、摄像头(Camera),可选用户接口1003还可以包括标准的有线接口、无线接口。Wherein, the user interface 1003 may include a display screen (Display) and a camera (Camera), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.

其中,网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。Wherein, the network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).

其中,处理器1001可以包括一个或者多个处理核心。处理器1001利用各种借口和线路连接整个服务器1000内的各个部分,通过运行或执行存储在存储器1005内的指令、程序、代码集或指令集,以及调用存储在存储器1005内的数据,执行服务器1000的各种功能和处理数据。可选的,处理器1001可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器1001可集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示屏所需要显示的内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器1001中,单独通过一块芯片进行实现。Wherein, the processor 1001 may include one or more processing cores. The processor 1001 uses various interfaces and lines to connect various parts in the entire server 1000, and executes the server by running or executing instructions, programs, code sets or instruction sets stored in the memory 1005, and calling data stored in the memory 1005. 1000's of various functions and processing data. Optionally, the processor 1001 may use at least one of Digital Signal Processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). implemented in the form of hardware. The processor 1001 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), a modem, and the like. Among them, the CPU mainly handles the operating system, user interface and application programs, etc.; the GPU is used to render and draw the content that needs to be displayed on the display screen; the modem is used to handle wireless communication. It can be understood that the above modem may also not be integrated into the processor 1001, but implemented by a single chip.

其中,存储器1005可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。可选的,该存储器1005包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器1005可用于存储指令、程序、代码、代码集或指令集。存储器1005可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现上述各个方法实施例的指令等;存储数据区可存储上面各个方法实施例中涉及到的数据等。存储器1005可选的还可以是至少一个位于远离前述处理器1001的存储装置。如图10所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及音频编码格式确定应用程序。Wherein, the memory 1005 may include random access memory (Random Access Memory, RAM), and may also include read-only memory (Read-Only Memory). Optionally, the storage 1005 includes a non-transitory computer-readable storage medium (non-transitory computer-readable storage medium). The memory 1005 may be used to store instructions, programs, codes, sets of codes or sets of instructions. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), Instructions, etc. used to implement the above method embodiments; the storage data area can store data, etc. involved in the above method embodiments. Optionally, the memory 1005 may also be at least one storage device located away from the aforementioned processor 1001 . As shown in FIG. 10 , the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an audio encoding format determining application program.

在图10所示的电子设备1000中,用户接口1003主要用于为用户提供输入的接口,获取用户输入的数据;而处理器1001可以用于调用存储器1005中存储的音频编码格式确定应用程序,并具体执行以下操作:In the electronic device 1000 shown in FIG. 10 , the user interface 1003 is mainly used to provide the user with an input interface to obtain the data input by the user; and the processor 1001 can be used to call the audio coding format determination application program stored in the memory 1005, And specifically do the following:

获取蓝牙音频设备在音频编码协议下所支持的第一音频编码格式以及所述第一音频编码格式对应的第一编码参数;Obtain the first audio encoding format supported by the Bluetooth audio device under the audio encoding protocol and the first encoding parameters corresponding to the first audio encoding format;

确定所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式不匹配,和/或所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数不匹配,将所述第二音频编码格式切换为所述音频编码协议下的默认音频编码格式;Determine that the first audio encoding format does not match the second audio encoding format supported by the terminal under the audio encoding protocol, and/or the first encoding parameter corresponds to the second audio encoding format corresponding to the second audio encoding format The two audio encoding parameters do not match, switching the second audio encoding format to the default audio encoding format under the audio encoding protocol;

控制采用所述默认音频编码格式进行音频编码。Controls the use of the default audio encoding format for audio encoding.

在一个实施例中,所述处理器1001在执行所述获取蓝牙音频设备在音频编码协议下所支持的第一音频编码格式以及所述第一音频编码格式对应的第一编码参数时,具体执行以下操作:In one embodiment, when the processor 1001 executes the acquisition of the first audio encoding format supported by the Bluetooth audio device under the audio encoding protocol and the first encoding parameter corresponding to the first audio encoding format, specifically execute Do the following:

向蓝牙音频设备发送在音频编码协议下的编码信息获取请求;Send an encoding information acquisition request under the audio encoding protocol to the Bluetooth audio device;

接收所述蓝牙音频设备发送的在所述音频编码协议下所支持的第一音频编码格式以及所述第一音频编码格式对应的第一编码参数。Receive the first audio encoding format supported under the audio encoding protocol and the first encoding parameter corresponding to the first audio encoding format sent by the Bluetooth audio device.

在一个实施例中,所述处理器1001在执行确定所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式不匹配,和/或所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数不匹配之前,还执行以下操作:In one embodiment, the processor 1001 determines that the first audio coding format does not match the second audio coding format supported by the terminal under the audio coding protocol, and/or the first Before the encoding parameter does not match the second audio encoding parameter corresponding to the second audio encoding format, the following operations are also performed:

判断所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式是否匹配,以及所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数是否匹配。Judging whether the first audio encoding format matches the second audio encoding format supported by the terminal under the audio encoding protocol, and determining whether the first encoding parameter matches the second audio encoding format corresponding to the second audio encoding format Whether the encoding parameters match.

在一个实施例中,所述处理器1001在执行所述第二音频编码格式包括多个,所述将所述第二音频编码格式切换为所述音频编码协议下的默认音频编码格式时,具体执行以下操作:In one embodiment, when the processor 1001 executes the second audio encoding format, it includes multiple, and when switching the second audio encoding format to the default audio encoding format under the audio encoding protocol, specifically Do the following:

按照多个所述第二音频编码格式的优先级的高低顺序,获取当前第二音频编码格式的下一个第二音频编码格式;Acquiring the next second audio coding format of the current second audio coding format according to the priority order of the plurality of second audio coding formats;

将所述下一个第二音频编码格式作为当前第二音频编码格式,并执行判断所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式是否匹配,以及所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数是否匹配的步骤;Using the next second audio encoding format as the current second audio encoding format, and performing a judgment on whether the first audio encoding format matches the second audio encoding format supported by the terminal under the audio encoding protocol, And a step of whether the first encoding parameter matches the second audio encoding parameter corresponding to the second audio encoding format;

当不存在下一个第二音频编码格式时,将所述第二音频编码格式切换为所述音频编码协议下的默认音频编码格式。When there is no next second audio coding format, switch the second audio coding format to a default audio coding format under the audio coding protocol.

在一个实施例中,所述处理器1001在执行所述按照多个所述第二音频编码格式的优先级的高低顺序之前,还执行以下操作:In one embodiment, before the processor 1001 executes the order of priority of the multiple second audio coding formats, the following operations are further performed:

获取与所述蓝牙音频设备的蓝牙连接状态参数,以及获取多个所述第二音频编码格式分别对应的编码系数;Acquiring Bluetooth connection state parameters with the Bluetooth audio device, and obtaining a plurality of encoding coefficients respectively corresponding to the second audio encoding format;

将所述编码系数以及所述蓝牙连接状态参数输入至评分模型中,分别得到多个所述第二音频编码格式对应的编码分数;Inputting the encoding coefficient and the Bluetooth connection state parameter into the scoring model to obtain a plurality of encoding scores corresponding to the second audio encoding format;

基于各所述编码分数的大小顺序确定多个所述第二音频编码格式的优先级。Priorities of the plurality of second audio coding formats are determined sequentially based on the magnitude of each of the coding scores.

在一个实施例中,所述处理器1001在执行所述音频编码格式确定方法时,还执行以下操作:In one embodiment, when the processor 1001 executes the method for determining the audio encoding format, it further performs the following operations:

获取所述蓝牙音频设备的设备标识,将所述设备标识保存至蓝牙黑名单中,并关闭所述第二音频编码格式。Obtain the device identification of the Bluetooth audio device, save the device identification in the Bluetooth blacklist, and close the second audio encoding format.

在一个实施例中,所述处理器1001在执行所述将所述第二音频编码格式切换为所述音频编码协议下的默认音频编码格式之后,还执行以下操作:In one embodiment, after the processor 1001 performs the switching of the second audio encoding format to the default audio encoding format under the audio encoding protocol, the following operations are further performed:

向所述蓝牙音频设备发送格式确认信息,所述格式确认信息用于指示所述蓝牙音频设备采用所述默认音频编码格式进行音频编码。Send format confirmation information to the Bluetooth audio device, where the format confirmation information is used to instruct the Bluetooth audio device to use the default audio coding format for audio coding.

在本实施例中,在本申请一个或多个实施例中,终端通过获取蓝牙音频设备在音频编码协议下所支持的第一音频编码格式和所述第一音频编码格式对应的第一编码参数,在所述第一音频编码格式与所述终端在所述音频编码协议下所支持的第二音频编码格式不匹配,和/或所述第一编码参数与所述第二音频编码格式对应的第二音频编码参数不匹配时,将所述第二音频编码格式切换为所述音频编码协议下终端以及蓝牙音频设备均支持的默认音频编码格式,以默认音频编码格式进行音频编码。可以避免在终端与蓝牙音频设备支持的蓝牙音频格式相同而对应的音频编码参数不匹配的情况下导致蓝牙音频连接中断的问题,提高了终端与蓝牙音频设备间蓝牙音频连接的稳定性,从而保证了蓝牙音频功能正常使用;以及,当第一音频编码格式与第二音频编码格式不匹配,和/或第一音频参数与第二音频参数不匹配时,将设备标识保存至蓝牙黑名单,终端可以在下一次与蓝牙音频设备的匹配音频编码格式时基于蓝牙黑名单中的设备标识进行匹配,可以节省下一次与蓝牙音频设备的匹配音频编码格式的时间;以及,当终端所支持的第二音频格式为多个时,基于蓝牙连接状态参数与第二音频编码格式分别对应的编码系数确定多个所述第二音频编码格式的优先级的高低顺序,根据优先级的高低顺序进行音频编码格式匹配,可以提高音频编码格式匹配的准确性。In this embodiment, in one or more embodiments of the present application, the terminal obtains the first audio coding format supported by the Bluetooth audio device under the audio coding protocol and the first coding parameter corresponding to the first audio coding format , when the first audio encoding format does not match the second audio encoding format supported by the terminal under the audio encoding protocol, and/or the first encoding parameter corresponds to the second audio encoding format When the second audio encoding parameters do not match, switch the second audio encoding format to a default audio encoding format supported by both the terminal and the Bluetooth audio device under the audio encoding protocol, and perform audio encoding in the default audio encoding format. It can avoid the problem that the Bluetooth audio connection is interrupted when the Bluetooth audio formats supported by the terminal and the Bluetooth audio device are the same but the corresponding audio encoding parameters do not match, and the stability of the Bluetooth audio connection between the terminal and the Bluetooth audio device is improved, thereby ensuring and, when the first audio encoding format does not match the second audio encoding format, and/or when the first audio parameter does not match the second audio parameter, save the device identification to the Bluetooth blacklist, and the terminal It can be matched based on the device identification in the Bluetooth blacklist when matching the audio encoding format with the Bluetooth audio device next time, which can save the time for matching the audio encoding format with the Bluetooth audio device next time; and, when the second audio encoding format supported by the terminal When there are multiple formats, the priority order of multiple second audio encoding formats is determined based on the encoding coefficients corresponding to the bluetooth connection status parameters and the second audio encoding format, and the audio encoding format is matched according to the priority order , which can improve the accuracy of audio encoding format matching.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体或随机存储记忆体等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented through computer programs to instruct related hardware, and the programs can be stored in a computer-readable storage medium. During execution, it may include the processes of the embodiments of the above-mentioned methods. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory or a random access memory, and the like.

以上所揭露的仅为本申请较佳实施例而已,当然不能以此来限定本申请之权利范围,因此依本申请权利要求所作的等同变化,仍属本申请所涵盖的范围。The above disclosures are only preferred embodiments of the present application, which certainly cannot limit the scope of the present application. Therefore, equivalent changes made according to the claims of the present application still fall within the scope of the present application.

Claims (10)

1. An audio coding format determining method applied to a terminal, the method comprising:
acquiring a first audio coding format supported by Bluetooth audio equipment under an audio coding protocol and a first coding parameter corresponding to the first audio coding format, wherein the terminal supports a second audio coding format under the audio coding protocol, and the audio coding protocol is the Bluetooth audio coding protocol;
when the first audio coding format is not matched with a second audio coding format and the first coding parameter is not matched with a second audio coding parameter corresponding to the second audio coding format, or when the first audio coding format is not matched with the second audio coding format and the first coding parameter is matched with the second audio coding parameter corresponding to the second audio coding format, or when the first audio coding format is matched with the second audio coding format and the first coding parameter is not matched with the second audio coding parameter corresponding to the second audio coding format, the second audio coding format is switched to a default audio coding format under the audio coding protocol, and audio coding is conducted by using the default audio coding format;
And when the first audio coding format is matched with a second audio coding format and the first coding parameters are matched with the second audio coding parameters corresponding to the second audio coding format, determining to perform audio coding in the second audio coding format.
2. The method of claim 1, wherein the obtaining a first audio encoding format supported by the bluetooth audio device under the audio encoding protocol and a first encoding parameter corresponding to the first audio encoding format comprises:
transmitting a coded information acquisition request under an audio coding protocol to Bluetooth audio equipment;
and receiving a first audio coding format supported by the audio coding protocol and a first coding parameter corresponding to the first audio coding format, which are sent by the Bluetooth audio equipment.
3. The method of claim 1, wherein when the first audio encoding format does not match a second audio encoding format and the first encoding parameter does not match a second audio encoding parameter corresponding to the second audio encoding format, or when the first audio encoding format does not match a second audio encoding format and the first encoding parameter does match a second audio encoding parameter corresponding to the second audio encoding format, or when the first audio encoding format does match a second audio encoding format and the first encoding parameter does not match a second audio encoding parameter corresponding to the second audio encoding format, switching the second audio encoding format to a default audio encoding format under the audio encoding protocol is preceded by:
And judging whether the first audio coding format is matched with a second audio coding format supported by the terminal under the audio coding protocol, and judging whether the first coding parameters are matched with second audio coding parameters corresponding to the second audio coding format.
4. A method according to claim 3, wherein the second audio coding format comprises a plurality, and said switching the second audio coding format to a default audio coding format under the audio coding protocol comprises:
acquiring the next second audio coding format of the current second audio coding format according to the high-low order of the priorities of the plurality of second audio coding formats;
taking the next second audio coding format as a current second audio coding format, and executing the steps of judging whether the first audio coding format is matched with a second audio coding format supported by the terminal under the audio coding protocol, and judging whether the first coding parameter is matched with a second audio coding parameter corresponding to the second audio coding format;
when the next second audio coding format does not exist, the second audio coding format is switched to a default audio coding format under the audio coding protocol.
5. The method of claim 4, further comprising, prior to said prioritizing a plurality of said second audio encoding formats:
acquiring Bluetooth connection state parameters of the Bluetooth audio equipment and acquiring a plurality of coding coefficients respectively corresponding to the second audio coding formats;
inputting the coding coefficients and the Bluetooth connection state parameters into a scoring model to respectively obtain a plurality of coding scores corresponding to the second audio coding formats;
a priority of a plurality of the second audio encoding formats is determined based on a size order of each of the encoding scores.
6. The method according to claim 1, wherein the method further comprises:
and acquiring the equipment identifier of the Bluetooth audio equipment, storing the equipment identifier into a Bluetooth blacklist, and closing the second audio coding format.
7. The method of claim 1, further comprising, after said switching said second audio encoding format to a default audio encoding format under said audio encoding protocol:
and sending format confirmation information to the Bluetooth audio equipment, wherein the format confirmation information is used for indicating the Bluetooth audio equipment to perform audio coding by adopting the default audio coding format.
8. An audio coding format determining apparatus, the apparatus comprising:
the device comprises a format parameter acquisition module, a format parameter acquisition module and a data processing module, wherein the format parameter acquisition module is used for acquiring a first audio coding format supported by Bluetooth audio equipment under an audio coding protocol and a first coding parameter corresponding to the first audio coding format, the device supports a second audio coding format under the audio coding protocol, and the audio coding protocol is the Bluetooth audio coding protocol;
an encoding format switching module, configured to switch the second audio encoding format to a default audio encoding format under the audio encoding protocol when the first audio encoding format does not match a second audio encoding format and the first encoding parameter does not match a second audio encoding parameter corresponding to the second audio encoding format, or when the first audio encoding format does match a second audio encoding format and the first encoding parameter does not match a second audio encoding parameter corresponding to the second audio encoding format;
The audio coding control module is used for controlling the audio coding by adopting the default audio coding format;
the device is further configured to: and when the first audio coding format is matched with a second audio coding format and the first coding parameters are matched with the second audio coding parameters corresponding to the second audio coding format, determining to perform audio coding in the second audio coding format.
9. A computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the method steps of any one of claims 1 to 7.
10. An electronic device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1-7.
CN202010129474.1A 2020-02-28 2020-02-28 Audio coding format determining method and device, storage medium and electronic equipment Active CN111199743B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010129474.1A CN111199743B (en) 2020-02-28 2020-02-28 Audio coding format determining method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010129474.1A CN111199743B (en) 2020-02-28 2020-02-28 Audio coding format determining method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN111199743A CN111199743A (en) 2020-05-26
CN111199743B true CN111199743B (en) 2023-08-18

Family

ID=70747666

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010129474.1A Active CN111199743B (en) 2020-02-28 2020-02-28 Audio coding format determining method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111199743B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111970665B (en) * 2020-07-23 2022-07-29 南京邮电大学 Point-to-multipoint wireless audio transmission system based on Bluetooth
CN114093376B (en) * 2020-08-24 2025-04-11 浙江宇视科技有限公司 Method, device, storage medium and equipment for identifying audio data packaging format
CN112135279B (en) * 2020-09-21 2022-03-18 珠海格力电器股份有限公司 Audio transmission method and device of multi-channel Bluetooth
CN114698031B (en) * 2020-12-31 2025-09-19 Oppo广东移动通信有限公司 Code rate determining method and device, bluetooth playing equipment and storage medium
CN115085769A (en) * 2021-03-10 2022-09-20 深圳市万普拉斯科技有限公司 Configuration method, device, terminal and storage medium of coding and decoding format
CN115348567B (en) * 2021-05-13 2025-07-15 北京小米移动软件有限公司 Bluetooth communication method, Bluetooth communication device and storage medium
CN115701700A (en) * 2021-08-02 2023-02-10 北京小米移动软件有限公司 Bluetooth communication method, Bluetooth communication device and storage medium
CN114420143A (en) * 2022-01-14 2022-04-29 天津天地伟业智能安全防范科技有限公司 Multi-audio-frequency superposition output method and device based on Haisi platform
CN114783452B (en) * 2022-06-17 2022-12-13 荣耀终端有限公司 Audio playing method, device and storage medium
CN116132958A (en) * 2023-01-13 2023-05-16 麒麟软件有限公司 Optimization method based on Bluetooth hfp coding selection
CN116013334B (en) * 2023-01-28 2023-08-18 荣耀终端有限公司 Audio data processing method, electronic device and storage medium
WO2025097318A1 (en) * 2023-11-07 2025-05-15 北京小米移动软件有限公司 Audio signal encoding method and apparatus, audio signal decoding method and apparatus, communication system, communication device, and storage medium
CN117939475A (en) * 2023-12-30 2024-04-26 广东辰奕智能科技股份有限公司 A Bluetooth remote control control method and system based on BLE

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0934499A (en) * 1995-07-17 1997-02-07 Kokusai Electric Co Ltd Voice coding communication system
EP1587327A2 (en) * 2004-04-15 2005-10-19 Microsoft Corporation Video transcoding
CN101286770A (en) * 2007-04-09 2008-10-15 艾威梯软件技术(北京)有限公司 Method and system for automatically configuring audio encoding format transmitted by bluetooth A2DP
EP2180664A1 (en) * 2008-10-22 2010-04-28 Vivendi Mobile Entertainment System and method for accessing multi-media content via a mobile terminal
CN105812705A (en) * 2014-12-31 2016-07-27 华为终端(东莞)有限公司 Video communication method, terminal and system
CN107404339A (en) * 2017-08-14 2017-11-28 青岛海信电器股份有限公司 A method and device for adjusting Bluetooth A2DP encoding settings
CN107770759A (en) * 2017-10-17 2018-03-06 广东欧珀移动通信有限公司 Method for building up, device, storage medium and the mobile terminal of blue tooth voice link
CN109003618A (en) * 2018-08-14 2018-12-14 Oppo广东移动通信有限公司 Encoding control method, encoding control device, electronic device, and storage medium
CN109273017A (en) * 2018-08-14 2019-01-25 Oppo广东移动通信有限公司 Coding control method, device and electronic device
CN110770824A (en) * 2017-07-07 2020-02-07 高通股份有限公司 Multi-stream audio coding

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1947407A (en) * 2004-04-09 2007-04-11 日本电气株式会社 Audio communication method and device
JP4445515B2 (en) * 2007-04-27 2010-04-07 株式会社東芝 Information processing device
US8224247B2 (en) * 2007-05-16 2012-07-17 Texas Instruments Incorporated Controller integrated audio codec for advanced audio distribution profile audio streaming applications
JP6088444B2 (en) * 2011-03-16 2017-03-01 ディーティーエス・インコーポレイテッドDTS,Inc. 3D audio soundtrack encoding and decoding
EP2830064A1 (en) * 2013-07-22 2015-01-28 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Apparatus and method for decoding and encoding an audio signal using adaptive spectral tile selection
CN105898318A (en) * 2015-12-21 2016-08-24 乐视云计算有限公司 Offline transcoding method and system
US10304468B2 (en) * 2017-03-20 2019-05-28 Qualcomm Incorporated Target sample generation
CN108093287A (en) * 2017-12-27 2018-05-29 江苏惠通集团有限责任公司 The switching method and device of audio decoder algorithm, storage medium, terminal
CN108737658B (en) * 2018-05-22 2020-06-05 Oppo(重庆)智能科技有限公司 Mobile terminal, switching method of Bluetooth audio coding mode of mobile terminal and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0934499A (en) * 1995-07-17 1997-02-07 Kokusai Electric Co Ltd Voice coding communication system
EP1587327A2 (en) * 2004-04-15 2005-10-19 Microsoft Corporation Video transcoding
CN101286770A (en) * 2007-04-09 2008-10-15 艾威梯软件技术(北京)有限公司 Method and system for automatically configuring audio encoding format transmitted by bluetooth A2DP
EP2180664A1 (en) * 2008-10-22 2010-04-28 Vivendi Mobile Entertainment System and method for accessing multi-media content via a mobile terminal
CN105812705A (en) * 2014-12-31 2016-07-27 华为终端(东莞)有限公司 Video communication method, terminal and system
CN110770824A (en) * 2017-07-07 2020-02-07 高通股份有限公司 Multi-stream audio coding
CN107404339A (en) * 2017-08-14 2017-11-28 青岛海信电器股份有限公司 A method and device for adjusting Bluetooth A2DP encoding settings
CN107770759A (en) * 2017-10-17 2018-03-06 广东欧珀移动通信有限公司 Method for building up, device, storage medium and the mobile terminal of blue tooth voice link
CN109003618A (en) * 2018-08-14 2018-12-14 Oppo广东移动通信有限公司 Encoding control method, encoding control device, electronic device, and storage medium
CN109273017A (en) * 2018-08-14 2019-01-25 Oppo广东移动通信有限公司 Coding control method, device and electronic device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
吴长树 .蓝牙高级音频应用系统设计与实现.中国优秀硕士学位论文全文数据库.2008,第23-35页 . *

Also Published As

Publication number Publication date
CN111199743A (en) 2020-05-26

Similar Documents

Publication Publication Date Title
CN111199743B (en) Audio coding format determining method and device, storage medium and electronic equipment
EP3629561B1 (en) Data transmission method and system, and bluetooth headphone
CN109246671B (en) Data transmission method, device and system
CN109445741B (en) Data transmission method and device, electronic equipment and storage medium
CN107170460B (en) Sound quality adjustment method, system, host, and storage medium
CN109450851B (en) Device connection method, electronic device, and computer-readable medium
US20180190279A1 (en) Content streaming system
CN106936987B (en) Method and device capable of identifying voice source of Bluetooth headset
US20160337501A1 (en) Duplex audio for mobile communication device and accessory
US7860458B2 (en) Audio transmitting apparatus and mobile communication terminal
CN106452512A (en) A method and device for role switching based on Bluetooth connection
CN109102816B (en) Code control method, device and electronic device
CN109150399A (en) Data transmission method and device, electronic equipment and computer readable medium
JP5973289B2 (en) Portable terminal, voice control program, and voice control method
CN109107158B (en) Sound effect processing method and device, electronic equipment and computer readable storage medium
CN106126172A (en) A sound effect processing method and mobile terminal
CN116527810B (en) Method for outputting audio, electronic device and storage medium
CN107785013A (en) Sound control method and device
CN105703806B (en) Bluetooth module control method, device and the audio-video frequency playing system of playback equipment
US11581002B2 (en) Communication method, apparatus, and system for digital enhanced cordless telecommunications (DECT) base station
CN113132440B (en) Audio transmission method, audio transmission system and electronic equipment
CN109150400B (en) Data transmission method, apparatus, electronic device and computer readable medium
KR20090027817A (en) Background sound output method and mobile communication terminal using same
CN106850847A (en) Voice messaging sharing method and its intelligent earphone based on cloud platform
CN105812903A (en) Bluetooth module control method and device of playback device, and audio and video playback system

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