WO2022042773A1 - Audio push method and audio push system - Google Patents

Audio push method and audio push system Download PDF

Info

Publication number
WO2022042773A1
WO2022042773A1 PCT/CN2021/125915 CN2021125915W WO2022042773A1 WO 2022042773 A1 WO2022042773 A1 WO 2022042773A1 CN 2021125915 W CN2021125915 W CN 2021125915W WO 2022042773 A1 WO2022042773 A1 WO 2022042773A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
bluetooth
type
audio
correspondence
Prior art date
Application number
PCT/CN2021/125915
Other languages
French (fr)
Chinese (zh)
Inventor
徐蓓
赵永杰
房帅磊
Original Assignee
荣耀终端有限公司
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 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Publication of WO2022042773A1 publication Critical patent/WO2022042773A1/en

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path
    • H04B5/48
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup

Abstract

Disclosed are an audio push method and an audio push system, comprising: when an electronic device detects that an application needs to output audio data, the electronic device determines the scenario in which the electronic device is currently located. According to a corresponding relationship, the electronic device determines an audio output device of the application in the current scenario. In different scenarios, the same application may have different audio output devices; in the same scenario, different applications may also have different audio output devices. The corresponding relationship stored in the electronic device may be set by a user, and the user only needs to set up once, then the electronic device automatically monitors audio data, and automatically selects the audio output device without needing manual intervention from the user. Automatic audio push is achieved, and the user experience is improved.

Description

一种音频推送方法及音频推送系统A kind of audio push method and audio push system
本申请要求于2020年08月31日提交中国专利局、申请号为202010899554.5、申请名称为“一种音频推送方法及音频推送系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202010899554.5 and the application title "An audio push method and audio push system" filed with the China Patent Office on August 31, 2020, the entire contents of which are incorporated herein by reference Applying.
技术领域technical field
本申请涉及通信技术领域,尤其涉及一种音频推送方法及音频推送系统。The present application relates to the field of communication technologies, and in particular, to an audio push method and an audio push system.
背景技术Background technique
在目前的蓝牙技术下,一个主(master)设备可以接多个附属(slave)设备。一个人可以拥有一个手机,同时有蓝牙耳机,蓝牙手环,蓝牙手表,车载蓝牙,家里还有蓝牙音箱。Under the current Bluetooth technology, a master (master) device can connect to multiple slave (slave) devices. A person can have a mobile phone, a bluetooth headset, a bluetooth bracelet, a bluetooth watch, a car bluetooth, and a bluetooth speaker at home.
当手机和多个蓝牙设备同时连接时,对于不同的场合,不同的应用,不同的人可以选择当前最合适的蓝牙设备输出音频。例如在开车的时候,蓝牙手表,蓝牙耳机和车载蓝牙都和手机连接着。当手机来电时,有人希望只推送耳机,有人希望推送车载。当用手机播放音乐/有声故事时,有人希望只通过车载播放,而不通过蓝牙手表播放。When the mobile phone and multiple Bluetooth devices are connected at the same time, for different occasions and different applications, different people can choose the most suitable Bluetooth device to output audio. For example, while driving, the Bluetooth watch, Bluetooth headset and car Bluetooth are all connected to the mobile phone. When the phone calls, some people want to push only the headset, and some people want to push the car. When playing music/audio stories from the phone, someone wants to play only from the car and not from the bluetooth watch.
目前,手机可以通过系统设置蓝牙设备的配对。当需要在多个设备进行选择时,可以通过手动断开连接的方式,只保留一个蓝牙设备进行通信。然而切换多蓝牙设备连接不是自动的,需要人工操作;无法动态根据客户需求在不同的场景下进行不同蓝牙设备连接。At present, the mobile phone can set the pairing of Bluetooth devices through the system. When multiple devices need to be selected, only one Bluetooth device can be reserved for communication by manually disconnecting. However, switching multiple Bluetooth device connections is not automatic and requires manual operation; it is impossible to dynamically connect different Bluetooth devices in different scenarios according to customer needs.
发明内容SUMMARY OF THE INVENTION
本申请实施例提供了一种音频推送方法及音频推送系统,可以在连接了多个支持音频输出的蓝牙设备的情况下,自动选择音频输出设备,不需要用户手动干预,提升用户体验。Embodiments of the present application provide an audio push method and an audio push system, which can automatically select an audio output device when multiple Bluetooth devices supporting audio output are connected, without requiring manual intervention by a user, thereby improving user experience.
第一方面,本申请提供了一种音频推送方法,应用于音频推送系统,音频推送系统包括电子设备,第一蓝牙设备和第二蓝牙设备,方法包括:电子设备与第一蓝牙设备、第二蓝牙设备建立蓝牙连接;电子设备检测到第一应用的第一播放指令;电子设备检测到电子设备处于第一场景;电子设备基于第一对应关系确定出音频输出设备为第一蓝牙设备,第一对应关系指示了第一场景、第一应用和第一设备类型对应,第一蓝牙设备的设备类型为第一设备类型;当电子设备检测到电子设备处于第二场景时,电子设备基于第二对应关系确定出音频输出设备为第二蓝牙设备,第二对应关系指示了第二场景、第一应用和第二设备类型对应,第二蓝牙设备的设备类型为第二设备类型,第二设备类型与第一设备类型不同。In a first aspect, the present application provides an audio push method, which is applied to an audio push system. The audio push system includes an electronic device, a first Bluetooth device and a second Bluetooth device. The method includes: an electronic device, a first Bluetooth device, a second Bluetooth device, and a The Bluetooth device establishes a Bluetooth connection; the electronic device detects the first play instruction of the first application; the electronic device detects that the electronic device is in the first scene; the electronic device determines that the audio output device is the first Bluetooth device based on the first correspondence, and the first The correspondence relationship indicates that the first scene, the first application and the first device type correspond, and the device type of the first Bluetooth device is the first device type; when the electronic device detects that the electronic device is in the second scene, the electronic device is based on the second correspondence. The relationship determines that the audio output device is the second Bluetooth device, the second correspondence indicates that the second scene, the first application and the second device type correspond, the device type of the second Bluetooth device is the second device type, and the second device type is the same as the second device type. The first device type is different.
实施第一方面提供的方法,当电子设备检测到有应用软件(第一应用)需要输出音频数据,确定电子设备当前所处的场景。电子设备根据对应关系,确定出在当前场景下该应用软件的推送设备类型。电子设备基于该推送设备类型,在已连接的蓝牙设备(第一蓝牙设备和第二蓝牙设备)中确定出音频输出设备。在不同的场景下,同一个应用软件的音频 输出设备可能不同;例如在第一场景下,第一应用的音频输出设备为第一蓝牙设备,在第二场景下,第一应用的音频输出设备为第二蓝牙设备。By implementing the method provided in the first aspect, when the electronic device detects that there is application software (a first application) that needs to output audio data, the scene in which the electronic device is currently located is determined. The electronic device determines the push device type of the application software in the current scenario according to the corresponding relationship. Based on the push device type, the electronic device determines an audio output device among the connected Bluetooth devices (the first Bluetooth device and the second Bluetooth device). In different scenarios, the audio output devices of the same application software may be different; for example, in the first scenario, the audio output device of the first application is the first Bluetooth device, and in the second scenario, the audio output device of the first application for the second bluetooth device.
举例来说,当用户在家里,用户的智能手机(电子设备)与蓝牙耳机(第一蓝牙设备)建立了蓝牙连接,当用户使用音乐软件(第一应用)播放音乐时,智能手机检测到当前的场景为家里(第一场景),根据对应关系(第一对应关系),蓝牙耳机播放音乐;当用户戴着蓝牙耳机从家里出来,进入到车内,用户的智能手机与车载设备(第二蓝牙设备)建立了连接,并且智能手机检测到当前的场景为车内(第二场景),根据对应关系(第二对应关系),智能手机调用车载设备播放音乐,蓝牙耳机不再播放音乐。For example, when the user is at home, the user's smartphone (electronic device) establishes a Bluetooth connection with the Bluetooth headset (the first Bluetooth device), and when the user uses the music software (the first application) to play music, the smartphone detects that the current The scene is home (the first scene), according to the corresponding relationship (the first corresponding relationship), the Bluetooth headset plays music; when the user comes out of the home wearing the Bluetooth headset and enters the car, the user's smartphone and the vehicle equipment (the second Bluetooth device) has established a connection, and the smartphone detects that the current scene is in the car (second scene), according to the correspondence (second correspondence), the smartphone calls the vehicle-mounted device to play music, and the Bluetooth headset no longer plays music.
其中,电子设备中存储的对应关系可以是用户设置的,用户只需要一次设置,后续电子设备自动监测音频数据,以及自动选择音频输出设备,不需要用户手动干预。实现了对音频的自动推送的效果,提升用户体验。The corresponding relationship stored in the electronic device may be set by the user, and the user only needs to set it once, and the subsequent electronic device automatically monitors the audio data and automatically selects the audio output device without manual intervention by the user. The effect of automatic audio push is realized, which improves the user experience.
结合第一方面,在一些实施例中,电子设备基于第一对应关系确定出音频输出设备为第一蓝牙设备之后,还包括:电子设备向第一蓝牙设备发送第一指令和第一应用的音频数据,第一指令用于指示第一蓝牙设备输出第一应用的音频数据。With reference to the first aspect, in some embodiments, after the electronic device determines that the audio output device is the first Bluetooth device based on the first correspondence, the method further includes: the electronic device sends the first instruction and the audio of the first application to the first Bluetooth device data, and the first instruction is used to instruct the first Bluetooth device to output the audio data of the first application.
结合第一方面,在一些实施例中,音频推送系统还包括第三蓝牙设备,方法还包括:电子设备与第三蓝牙设备建立蓝牙连接;当电子设备检测到第二应用的第二播放指令且电子设备处于第一场景时,电子设备基于第三对应关系确定出音频输出设备为第三蓝牙设备,第三对应关系指示了第一场景、第二应用和第三设备类型对应,第三蓝牙设备的设备类型为第三设备类型,第三设备类型与第一设备类型不同;第三对应关系是用户配置的。这种实现方式指示了在相同的场景下,不同应用软件的音频输出设备也可能不同。例如在第一场景下,第一应用的音频输出设备为第一蓝牙设备,而在第一场景下第二应用的音频输出设备为第二蓝牙设备。举例来说,当用户坐在车上,蓝牙设备1为车载设备,蓝牙设备2为蓝牙耳机,用户的智能手机(电子设备)与车载设备(第一蓝牙设备)、蓝牙耳机(第三蓝牙设备)均建立了蓝牙连接;当用户使用音乐软件(第一应用)播放音乐时,智能手机检测到当前的场景为车内(第一场景),根据对应关系(第三对应关系),智能手机调用车载设备播放音乐,当有来电(第二应用)时,蓝牙耳机优先输出来电铃声;而车载设备不会输出来电铃声,避免车上的所有人都听到了来电铃声的情况,提升用户体验。With reference to the first aspect, in some embodiments, the audio push system further includes a third Bluetooth device, and the method further includes: establishing a Bluetooth connection between the electronic device and the third Bluetooth device; when the electronic device detects the second play instruction of the second application and When the electronic device is in the first scene, the electronic device determines that the audio output device is the third Bluetooth device based on the third correspondence, the third correspondence indicates that the first scene, the second application and the third device type correspond, and the third Bluetooth device The device type is the third device type, and the third device type is different from the first device type; the third correspondence is configured by the user. This implementation indicates that in the same scenario, the audio output devices of different application software may also be different. For example, in the first scenario, the audio output device of the first application is the first Bluetooth device, and in the first scenario, the audio output device of the second application is the second Bluetooth device. For example, when the user is sitting in the car, the Bluetooth device 1 is the in-vehicle device, the Bluetooth device 2 is the Bluetooth headset, the user's smartphone (electronic device) is connected to the in-vehicle device (the first Bluetooth device), the Bluetooth headset (the third Bluetooth device ) have established a Bluetooth connection; when the user uses the music software (the first application) to play music, the smartphone detects that the current scene is in the car (the first scene), and according to the correspondence (the third correspondence), the smartphone calls The in-vehicle device plays music. When there is an incoming call (second application), the Bluetooth headset will output the incoming call ringtone first; while the in-vehicle device will not output the incoming call ringtone, so as to avoid the situation where everyone in the car hears the incoming call ringtone and improve the user experience.
结合第一方面,在一些实施例中,音频推送系统还包括第四蓝牙设备,第四蓝牙设备的设备类型为第四设备类型,电子设备与第四蓝牙设备建立蓝牙连接;电子设备基于第一对应关系确定出音频输出设备为第一蓝牙设备,包括:第一对应关系还指示了第一场景、第一应用和第四设备类型对应,第一设备类型的优先级高于第四设备类型的优先级;电子设备基于第一对应关系确定出音频输出设备为第一蓝牙设备。这种实现方式描述了在第一场景和第一应用对应了第一设备类型和第四设备类型的情况下,且第一蓝牙设备和第四蓝牙设备均与电子设备建立了蓝牙连接,由于第一设备类型的优先级更高,则根据优先级信息,确定音频输出设备为第一蓝牙设备。With reference to the first aspect, in some embodiments, the audio push system further includes a fourth Bluetooth device, the device type of the fourth Bluetooth device is the fourth device type, and the electronic device establishes a Bluetooth connection with the fourth Bluetooth device; the electronic device is based on the first Bluetooth device. The correspondence relationship determines that the audio output device is the first Bluetooth device, including: the first correspondence relationship also indicates that the first scene, the first application and the fourth device type correspond, and the priority of the first device type is higher than that of the fourth device type. priority; the electronic device determines that the audio output device is the first Bluetooth device based on the first correspondence. This implementation describes the situation that the first scenario and the first application correspond to the first device type and the fourth device type, and both the first Bluetooth device and the fourth Bluetooth device have established a Bluetooth connection with the electronic device. If a device type has a higher priority, the audio output device is determined as the first Bluetooth device according to the priority information.
结合第一方面,在一些实施例中,第一设备类型的优先级和第四设备类型的优先级是用户配置的;或者第一设备类型的优先级与第一设备类型的历史推送次数对应,第四设备类型的优先级与第四设备类型的历史推送次数对应。其中,历史推送次数越多,优先级越 高。With reference to the first aspect, in some embodiments, the priority of the first device type and the priority of the fourth device type are configured by the user; or the priority of the first device type corresponds to the historical push times of the first device type, The priority of the fourth device type corresponds to the historical push times of the fourth device type. The higher the number of historical pushes, the higher the priority.
结合第一方面,在一些实施例中,第一对应关系和第二对应关系是用户配置的。In conjunction with the first aspect, in some embodiments, the first correspondence and the second correspondence are user-configured.
结合第一方面,在一些实施例中,当电子设备检测到电子设备处于第三场景时,电子设备基于第四对应关系,确定出音频输出设备为电子设备,第四对应关系指示了第三场景、第一应用和第五设备类型对应,第五设备类型和第一设备类型、第二设备类型不同。其中,若电子设备的已连接设备中没有第五设备类型的设备,则电子设备作为音频输出设备;或者电子设备的设备类型为第五设备类型,则电子设备作为音频输出设备。With reference to the first aspect, in some embodiments, when the electronic device detects that the electronic device is in the third scene, the electronic device determines that the audio output device is the electronic device based on the fourth correspondence, and the fourth correspondence indicates the third scene , the first application corresponds to the fifth device type, and the fifth device type is different from the first device type and the second device type. Wherein, if there is no device of the fifth device type in the connected devices of the electronic device, the electronic device is used as the audio output device; or the device type of the electronic device is the fifth device type, the electronic device is used as the audio output device.
在一些实施例中,电子设备基于第一对应关系确定出音频输出设备为第一蓝牙设备,之前还包括:电子设备输出提示信息,提示信息用于提示用户确定第一蓝牙设备为音频输出设备;电子设备接收到针对提示信息的用户操作;电子设备响应于用户操作,确定音频输出设备为第一蓝牙设备。当电子设备基于对应关系确定出音频输出设备,电子设备可以输出提示信息,向用户进行音频输出设备的确认,若接收到用户触发的确认指令,则电子设备确定音频输出设备。这种实现方式,为用户推荐了音频输出设备,在得到确认后再输出音频,提升用户体验。In some embodiments, the electronic device determines that the audio output device is the first Bluetooth device based on the first correspondence, and further includes: the electronic device outputs prompt information, where the prompt information is used to prompt the user to determine that the first Bluetooth device is the audio output device; The electronic device receives a user operation for the prompt information; the electronic device determines that the audio output device is the first Bluetooth device in response to the user operation. When the electronic device determines the audio output device based on the corresponding relationship, the electronic device can output prompt information to confirm the audio output device to the user. If a confirmation instruction triggered by the user is received, the electronic device determines the audio output device. In this implementation, an audio output device is recommended for the user, and audio is output after confirmation to improve user experience.
结合第一方面,在一些实施例中,电子设备检测到电子设备处于第一场景,包括:电子设备根据电子设备的地理位置信息确定电子设备处于第一场景;或者电子设备根据已连接的蓝牙设备的设备信息确定电子设备处于第一场景。With reference to the first aspect, in some embodiments, the electronic device detecting that the electronic device is in the first scene includes: the electronic device determines that the electronic device is in the first scene according to geographic location information of the electronic device; or the electronic device determines that the electronic device is in the first scene according to the connected Bluetooth device The device information determines that the electronic device is in the first scene.
结合第一方面,在一些实施例中,电子设备基于第一对应关系确定出音频输出设备为第一蓝牙设备,之后还包括:电子设备检测当前的环境音量;电子设备基于当前的环境音量,确定第一蓝牙设备的输出音量,环境音量和输出音量相关联。这种实现方式提供了输出音量的确定方式,电子设备通过环境音量确定音频输出音量,在一定的音量范围内,其中环境音量越吵闹(分贝越大),输出音量越大。With reference to the first aspect, in some embodiments, the electronic device determines that the audio output device is the first Bluetooth device based on the first correspondence, and then further includes: the electronic device detects the current ambient volume; the electronic device determines based on the current ambient volume The output volume of the first Bluetooth device, the ambient volume and the output volume are associated. This implementation provides a way of determining the output volume. The electronic device determines the audio output volume through the ambient volume. Within a certain volume range, the louder the ambient volume (the greater the decibel), the greater the output volume.
第二方面,本申请提供了一种音频推送系统,包括:电子设备、第一蓝牙设备和第二蓝牙设备;其中,电子设备,用于与第一蓝牙设备、第二蓝牙设备建立蓝牙连接;电子设备,还用于检测到第一应用的第一播放指令;电子设备,还用于检测到电子设备处于第一场景;电子设备,还用于基于第一对应关系确定出音频输出设备为第一蓝牙设备,第一对应关系指示了第一场景、第一应用和第一设备类型对应,第一蓝牙设备的设备类型为第一设备类型;电子设备,还用于当电子设备检测到电子设备处于第二场景时,基于第二对应关系确定出音频输出设备为第二蓝牙设备,第二对应关系指示了第二场景、第一应用和第二设备类型对应,第二蓝牙设备的设备类型为第二设备类型,第二设备类型与第一设备类型不同。In a second aspect, the present application provides an audio push system, including: an electronic device, a first Bluetooth device, and a second Bluetooth device; wherein the electronic device is used to establish a Bluetooth connection with the first Bluetooth device and the second Bluetooth device; The electronic device is also used to detect the first play instruction of the first application; the electronic device is also used to detect that the electronic device is in the first scene; the electronic device is also used to determine that the audio output device is the first scene based on the first correspondence a Bluetooth device, the first correspondence indicates that the first scene, the first application and the first device type correspond, and the device type of the first Bluetooth device is the first device type; the electronic device is also used when the electronic device detects the electronic device. When in the second scene, it is determined based on the second correspondence that the audio output device is the second Bluetooth device, the second correspondence indicates that the second scene, the first application and the second device type correspond, and the device type of the second Bluetooth device is A second device type, the second device type is different from the first device type.
基于第二方面提供的系统,当电子设备检测到有应用软件(第一应用)需要输出音频数据,确定电子设备当前所处的场景。电子设备根据对应关系,确定出在当前场景下该应用软件的推送设备类型。电子设备基于该推送设备类型,在已连接的蓝牙设备(第一蓝牙设备和第二蓝牙设备)中确定出音频输出设备。在不同的场景下,同一个应用软件的音频输出设备可能不同;例如在第一场景下,第一应用的音频输出设备为第一蓝牙设备,在第二场景下,第一应用的音频输出设备为第二蓝牙设备。Based on the system provided in the second aspect, when the electronic device detects that there is application software (a first application) that needs to output audio data, the scene in which the electronic device is currently located is determined. The electronic device determines the push device type of the application software in the current scenario according to the corresponding relationship. Based on the push device type, the electronic device determines an audio output device among the connected Bluetooth devices (the first Bluetooth device and the second Bluetooth device). In different scenarios, the audio output devices of the same application software may be different; for example, in the first scenario, the audio output device of the first application is the first Bluetooth device, and in the second scenario, the audio output device of the first application for the second bluetooth device.
举例来说,当用户在家里,用户的智能手机(电子设备)与蓝牙耳机(第一蓝牙设备) 建立了蓝牙连接,当用户使用音乐软件(第一应用)播放音乐时,智能手机检测到当前的场景为家里(第一场景),根据对应关系(第一对应关系),蓝牙耳机播放音乐;当用户戴着蓝牙耳机从家里出来,进入到车内,用户的智能手机与车载设备(第二蓝牙设备)建立了连接,并且智能手机检测到当前的场景为车内(第二场景),根据对应关系(第二对应关系),智能手机调用车载设备播放音乐,蓝牙耳机不再播放音乐。For example, when the user is at home, the user's smartphone (electronic device) establishes a Bluetooth connection with the Bluetooth headset (first Bluetooth device), and when the user uses the music software (first application) to play music, the smartphone detects that the current The scene is home (the first scene), according to the corresponding relationship (the first corresponding relationship), the Bluetooth headset plays music; when the user comes out of the home wearing the Bluetooth headset and enters the car, the user's smartphone and the vehicle equipment (the second Bluetooth device) has established a connection, and the smartphone detects that the current scene is in the car (second scene), according to the correspondence (second correspondence), the smartphone calls the vehicle-mounted device to play music, and the Bluetooth headset no longer plays music.
其中,电子设备中存储的对应关系可以是用户设置的,用户只需要一次设置,后续电子设备自动监测音频数据,以及自动选择音频输出设备,不需要用户手动干预。实现了对音频的自动推送的效果,提升用户体验。The corresponding relationship stored in the electronic device may be set by the user, and the user only needs to set it once, and the subsequent electronic device automatically monitors the audio data and automatically selects the audio output device without manual intervention by the user. The effect of automatic audio push is realized, which improves the user experience.
结合第二方面,在一些实施例中,电子设备还用于基于第一对应关系确定出音频输出设备为第一蓝牙设备之后,向第一蓝牙设备发送第一指令和第一应用的音频数据,第一指令用于指示第一蓝牙设备输出第一应用的音频数据。With reference to the second aspect, in some embodiments, the electronic device is further configured to send the first instruction and the audio data of the first application to the first Bluetooth device after determining that the audio output device is the first Bluetooth device based on the first correspondence, The first instruction is used to instruct the first Bluetooth device to output audio data of the first application.
结合第二方面,在一些实施例中,音频推送系统还包括第三蓝牙设备,电子设备,还用于与第三蓝牙设备建立蓝牙连接;电子设备,还用于当检测到第二应用的第二播放指令且电子设备处于第一场景时,基于第三对应关系确定出音频输出设备为第三蓝牙设备,第三对应关系指示了第一场景、第二应用和第三设备类型对应,第三蓝牙设备的设备类型为第三设备类型,第三设备类型与第一设备类型不同;第三对应关系是用户配置的。这种实现方式指示了在相同的场景下,不同应用软件的音频输出设备也可能不同。例如在第一场景下,第一应用的音频输出设备为第一蓝牙设备,而在第一场景下第二应用的音频输出设备为第二蓝牙设备。举例来说,当用户坐在车上,蓝牙设备1为车载设备,蓝牙设备2为蓝牙耳机,用户的智能手机(电子设备)与车载设备(第一蓝牙设备)、蓝牙耳机(第三蓝牙设备)均建立了蓝牙连接;当用户使用音乐软件(第一应用)播放音乐时,智能手机检测到当前的场景为车内(第一场景),根据对应关系(第三对应关系),智能手机调用车载设备播放音乐,当有来电(第二应用)时,蓝牙耳机优先输出来电铃声;而车载设备不会输出来电铃声,避免车上的所有人都听到了来电铃声的情况,提升用户体验。With reference to the second aspect, in some embodiments, the audio push system further includes a third Bluetooth device, an electronic device, which is further configured to establish a Bluetooth connection with the third Bluetooth device; When the second play instruction and the electronic device is in the first scene, it is determined that the audio output device is the third Bluetooth device based on the third correspondence. The third correspondence indicates that the first scene, the second application and the third device type correspond, and the third The device type of the Bluetooth device is a third device type, and the third device type is different from the first device type; the third corresponding relationship is configured by the user. This implementation indicates that in the same scenario, the audio output devices of different application software may also be different. For example, in the first scenario, the audio output device of the first application is the first Bluetooth device, and in the first scenario, the audio output device of the second application is the second Bluetooth device. For example, when the user is sitting in the car, the Bluetooth device 1 is the in-vehicle device, the Bluetooth device 2 is the Bluetooth headset, the user's smartphone (electronic device) is connected to the in-vehicle device (the first Bluetooth device), the Bluetooth headset (the third Bluetooth device ) have established a Bluetooth connection; when the user uses the music software (the first application) to play music, the smartphone detects that the current scene is in the car (the first scene), and according to the correspondence (the third correspondence), the smartphone calls The in-vehicle device plays music. When there is an incoming call (second application), the Bluetooth headset will output the incoming call ringtone first; while the in-vehicle device will not output the incoming call ringtone, so as to avoid the situation where everyone in the car hears the incoming call ringtone and improve the user experience.
结合第二方面,在一些实施例中,音频推送系统还包括第四蓝牙设备,第四蓝牙设备的设备类型为第四设备类型,电子设备,还用于与第四蓝牙设备建立蓝牙连接;电子设备,还用于基于第一对应关系确定出音频输出设备为第一蓝牙设备,包括:第一对应关系还指示了第一场景、第一应用和第四设备类型对应,第一设备类型的优先级高于第四设备类型的优先级;电子设备,还用于基于第一对应关系确定出音频输出设备为第一蓝牙设备。这种实现方式描述了在第一场景和第一应用对应了第一设备类型和第四设备类型的情况下,且第一蓝牙设备和第四蓝牙设备均与电子设备建立了蓝牙连接,由于第一设备类型的优先级更高,则根据优先级信息,确定音频输出设备为第一蓝牙设备。With reference to the second aspect, in some embodiments, the audio push system further includes a fourth Bluetooth device, and the device type of the fourth Bluetooth device is the fourth device type, and the electronic device is further configured to establish a Bluetooth connection with the fourth Bluetooth device; electronic The device is further configured to determine that the audio output device is the first Bluetooth device based on the first correspondence relationship, including: the first correspondence relationship also indicates that the first scene, the first application and the fourth device type correspond, and the priority of the first device type The level is higher than the priority of the fourth device type; the electronic device is further configured to determine that the audio output device is the first Bluetooth device based on the first correspondence. This implementation describes the situation that the first scenario and the first application correspond to the first device type and the fourth device type, and both the first Bluetooth device and the fourth Bluetooth device have established a Bluetooth connection with the electronic device. If a device type has a higher priority, the audio output device is determined as the first Bluetooth device according to the priority information.
结合第二方面,在一些实施例中,第一设备类型的优先级和第四设备类型的优先级是用户配置的;或者第一设备类型的优先级与第一设备类型的历史推送次数对应,第四设备类型的优先级与第四设备类型的历史推送次数对应。其中,历史推送次数越多,优先级越高。With reference to the second aspect, in some embodiments, the priority of the first device type and the priority of the fourth device type are configured by the user; or the priority of the first device type corresponds to the historical push times of the first device type, The priority of the fourth device type corresponds to the historical push times of the fourth device type. The higher the number of historical pushes, the higher the priority.
结合第二方面,在一些实施例中,第一对应关系和第二对应关系是用户配置的。In conjunction with the second aspect, in some embodiments, the first correspondence and the second correspondence are user-configured.
结合第二方面,在一些实施例中,电子设备,还用于当检测到电子设备处于第三场景 时,基于第四对应关系确定出音频输出设备为电子设备,第四对应关系指示了第三场景、第一应用和第五设备类型对应,第五设备类型和第一设备类型、第二设备类型不同。其中,若电子设备的已连接设备中没有第五设备类型的设备,则电子设备作为音频输出设备;或者电子设备的设备类型为第五设备类型,则电子设备作为音频输出设备。With reference to the second aspect, in some embodiments, the electronic device is further configured to, when it is detected that the electronic device is in the third scene, determine that the audio output device is an electronic device based on a fourth correspondence, and the fourth correspondence indicates that the third The scene, the first application corresponds to the fifth device type, and the fifth device type is different from the first device type and the second device type. Wherein, if there is no device of the fifth device type in the connected devices of the electronic device, the electronic device is used as the audio output device; or the device type of the electronic device is the fifth device type, the electronic device is used as the audio output device.
在一些实施例中,电子设备,还用于基于第一对应关系确定出音频输出设备为第一蓝牙设备之前,输出提示信息,提示信息用于提示用户确定第一蓝牙设备为音频输出设备;电子设备,还用于接收到针对提示信息的用户操作;电子设备,还用于响应于用户操作,确定音频输出设备为第一蓝牙设备。当电子设备基于对应关系确定出音频输出设备,电子设备可以输出提示信息,向用户进行音频输出设备的确认,若接收到用户触发的确认指令,则电子设备确定音频输出设备。这种实现方式,为用户推荐了音频输出设备,在得到确认后再输出音频,提升用户体验。In some embodiments, the electronic device is further configured to output prompt information before determining that the audio output device is the first Bluetooth device based on the first correspondence, where the prompt information is used to prompt the user to determine that the first Bluetooth device is the audio output device; The device is further configured to receive a user operation for the prompt information; the electronic device is further configured to determine that the audio output device is the first Bluetooth device in response to the user operation. When the electronic device determines the audio output device based on the corresponding relationship, the electronic device can output prompt information to confirm the audio output device to the user. If a confirmation instruction triggered by the user is received, the electronic device determines the audio output device. In this implementation, an audio output device is recommended for the user, and audio is output after confirmation to improve user experience.
结合第二方面,在一些实施例中,电子设备,还用于检测到电子设备处于第一场景,包括:电子设备,还用于根据电子设备的地理位置信息确定电子设备处于第一场景;或者电子设备,还用于根据已连接的蓝牙设备的设备信息确定电子设备处于第一场景。With reference to the second aspect, in some embodiments, the electronic device is further configured to detect that the electronic device is in the first scene, including: the electronic device is further configured to determine that the electronic device is in the first scene according to geographic location information of the electronic device; or The electronic device is further configured to determine that the electronic device is in the first scene according to the device information of the connected Bluetooth device.
结合第二方面,在一些实施例中,电子设备,还用于基于第一对应关系确定出音频输出设备为第一蓝牙设备之后,检测当前的环境音量;电子设备,还用于基于当前的环境音量,确定第一蓝牙设备的输出音量,环境音量和输出音量相关联。这种实现方式提供了输出音量的确定方式,电子设备通过环境音量确定音频输出音量,在一定的音量范围内,其中环境音量越吵闹(分贝越大),输出音量越大。With reference to the second aspect, in some embodiments, the electronic device is further configured to detect the current ambient volume after determining that the audio output device is the first Bluetooth device based on the first correspondence; the electronic device is further configured to detect the current ambient volume based on the current environment Volume, determine the output volume of the first Bluetooth device, and the ambient volume is associated with the output volume. This implementation provides a way of determining the output volume. The electronic device determines the audio output volume through the ambient volume. Within a certain volume range, the louder the ambient volume (the greater the decibel), the greater the output volume.
第三方面,本申请提供了一种电子设备,该电子设备可包括:一个或多个处理器、存储器;存储器与一个或多个处理器耦合,存储器用于存储计算机程序代码,该计算机程序代码包括计算机指令,一个或多个处理器调用该计算机指令以使得电子设备执行第二方面或第三方面的任意一种实施例中执行的方法。In a third aspect, the present application provides an electronic device, the electronic device may include: one or more processors and a memory; the memory is coupled to the one or more processors, and the memory is used for storing computer program code, the computer program code Comprising computer instructions that are invoked by one or more processors to cause the electronic device to perform the method performed in any one of the embodiments of the second aspect or the third aspect.
第四方面,本申请实施例提供了一种计算机可读存储介质,包括计算机指令,当该计算机指令在电子设备上运行时,使得该电子设备执行本申请实施例第二方面或第三方面的任意一种实施例中提供的音频推送的方法。In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, including computer instructions, when the computer instruction is executed on an electronic device, the electronic device is made to perform the second or third aspect of the embodiments of the present application. The method for audio push provided in any one of the embodiments.
第五方面,本申请实施例提供了一种计算机程序产品,当该计算机程序产品在电子设备上运行时,使得该电子设备执行本申请实施例第二方面或第三方面的任意一种实施例中提供的音频推送的方法。In a fifth aspect, an embodiment of the present application provides a computer program product that, when the computer program product runs on an electronic device, enables the electronic device to execute any one of the second aspect or the third aspect of the embodiments of the present application The method of audio push provided in .
第六方面,本申请提供了一种芯片系统,该芯片系统包括处理器,用于支持电子设备实现上述第一方面或第二方面或第三方面中所涉及的功能,例如,生成或处理上述音频推送方法中所涉及的信息。在一种可能的设计中,所述芯片系统还包括存储器,所述存储器,用于保存数据发送设备必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包含芯片和其他分立器件。In a sixth aspect, the present application provides a chip system, the chip system includes a processor for supporting an electronic device to implement the functions involved in the first aspect or the second aspect or the third aspect, for example, generating or processing the above Information involved in the audio push method. In a possible design, the chip system further includes a memory for storing necessary program instructions and data of the data sending device. The chip system may be composed of chips, or may include chips and other discrete devices.
附图说明Description of drawings
图1为本申请实施例提供的一种系统架构图;FIG. 1 is a system architecture diagram provided by an embodiment of the present application;
图2为本申请实施例提供的一种应用场景示意图;2 is a schematic diagram of an application scenario provided by an embodiment of the present application;
图3为本申请实施例提供的一种电子设备的结构示意图;3 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
图4为本申请实施例提供的一种软件架构示意图;4 is a schematic diagram of a software architecture provided by an embodiment of the present application;
图5为本申请实施例提供的又一种电子设备的结构示意图;FIG. 5 is a schematic structural diagram of another electronic device provided by an embodiment of the present application;
图6A-图6C为本申请实施例提供的一组应用界面图;6A-6C are a set of application interface diagrams provided by an embodiment of the present application;
图7为本申请实施例提供的一种音频推送方法的流程示意图;7 is a schematic flowchart of an audio push method provided by an embodiment of the present application;
图8为本申请实施例提供的一种蓝牙通信系统原理图。FIG. 8 is a schematic diagram of a Bluetooth communication system according to an embodiment of the present application.
具体实施方式detailed description
下面将结合附图对本申请实施例中的技术方案进行清楚、详尽地描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;文本中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,另外,在本申请实施例的描述中,“多个”是指两个或多于两个。The technical solutions in the embodiments of the present application will be described clearly and in detail below with reference to the accompanying drawings. Wherein, in the description of the embodiments of the present application, unless otherwise specified, “/” means or, for example, A/B can mean A or B; “and/or” in the text is only a description of an associated object The association relationship indicates that there can be three kinds of relationships, for example, A and/or B can indicate that A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of this application , "plurality" means two or more than two.
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。Hereinafter, the terms "first" and "second" are only used for descriptive purposes, and should not be construed as implying or implying relative importance or implying the number of indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise specified, the "multiple" The meaning is two or more.
目前,蓝牙5.0支持piconet,piconet是指用蓝牙(Blue tooth)技术把小范围(10-100m)内装有蓝牙单元(即在支持蓝牙技术的各种电器设备中嵌入的蓝牙模块)的各种电器组成的微型网络,俗称微微网。在蓝牙5.0技术下,一个主(master)设备可以连接多个附属(slave)设备。一个人可以拥有一个手机,同时有蓝牙耳机,蓝牙手环,蓝牙手表,车载蓝牙,家里还有蓝牙音箱。At present, Bluetooth 5.0 supports piconet, which refers to the use of Bluetooth (Bluetooth) technology to connect a small range (10-100m) with a Bluetooth unit (that is, a Bluetooth module embedded in various electrical equipment that supports Bluetooth technology). A micro-network, commonly known as a piconet. Under the Bluetooth 5.0 technology, a master (master) device can connect to multiple slave (slave) devices. A person can have a mobile phone, a bluetooth headset, a bluetooth bracelet, a bluetooth watch, a car bluetooth, and a bluetooth speaker at home.
当手机和多个蓝牙设备同时连接时,对于不同的场合,不同的应用,用户对当前最合适输出音频的蓝牙设备有不同的选择。例如在开车的时候,蓝牙耳机和车载蓝牙都和手机连接着。当手机来电时,用户希望只推送耳机,不通过车载播放;当用手机播放音乐/有声故事时,用户希望只通过车载播放,而不通过耳机播放。在家的时候,蓝牙耳机,蓝牙音箱都和手机连接着。当手机来电时,用户希望只推送耳机,不通过音箱播放;当用手机播放音乐/有声故事时,用户希望只推送音箱,不通过耳机播放。When the mobile phone and multiple Bluetooth devices are connected at the same time, for different occasions and different applications, the user has different choices for the current most suitable Bluetooth device to output audio. For example, when driving, the Bluetooth headset and car Bluetooth are connected to the mobile phone. When the mobile phone calls, the user hopes to only push the headset, not to play through the car; when using the mobile phone to play music/audio stories, the user hopes to only play through the car, not through the headset. At home, bluetooth headphones and bluetooth speakers are connected to the mobile phone. When the phone calls, the user wants to push only the earphones, not through the speakers; when playing music/audio stories on the phone, the user wants to only push the speakers, not through the earphones.
本申请提供了一种针对于音频的动态推送方法,当电子设备检测到应用程序需要推送音频时,电子设备根据预先配置的推送策略,基于用户当前的场景,以及与蓝牙设备的连接状态,选择适合当前场景的蓝牙设备进行音频推送。The present application provides a dynamic push method for audio. When an electronic device detects that an application program needs to push audio, the electronic device selects a pre-configured push strategy based on the user's current scene and the connection status with the Bluetooth device. The Bluetooth device suitable for the current scene performs audio push.
本申请实施例中涉及的应用程序(或应用软件)包括第三方应用程序,例如,即时通信APP、音乐APP、视频APP或者游戏类APP等;还包括电子设备的系统程序,例如短信、闹钟、备忘录等。The applications (or application software) involved in the embodiments of this application include third-party applications, such as instant messaging APPs, music APPs, video APPs, or game APPs, etc.; and also include system programs of electronic devices, such as text messages, alarm clocks, memo etc.
本申请实施例中涉及的电子设备/蓝牙设备可以是手机、平板电脑、桌面型、膝上型、笔记本电脑、超级移动个人计算机(Ultra-mobile Personal Computer,UMPC)、手持计算机、上网本、个人数字助理(Personal Digital Assistant,PDA)、虚拟现实设备、智能电视、智能音响、智能家居设备、智能车载设备、车机、PDA(Personal Digital Assistant,个人数字助 手,又称为掌上电脑)、便携式互联网设备、音乐播放器、数据存储设备、相机或可穿戴设备(例如,智能手表、智能手环、智能眼镜、无线耳机、头戴式设备(HMD)、电子衣物、电子手镯、电子项链、电子配件、电子文身和智能镜子)等具有蓝牙连接功能和媒体播放功能的电子设备。The electronic device/Bluetooth device involved in the embodiments of the present application may be a mobile phone, a tablet computer, a desktop type, a laptop type, a notebook computer, an Ultra-mobile Personal Computer (UMPC), a handheld computer, a netbook, a personal digital Assistant (Personal Digital Assistant, PDA), virtual reality equipment, smart TV, smart audio, smart home equipment, smart car equipment, car machine, PDA (Personal Digital Assistant, also known as PDA), portable Internet equipment , music players, data storage devices, cameras, or wearable devices (e.g., smart watches, smart bracelets, smart glasses, wireless headphones, head-mounted devices (HMDs), electronic clothing, electronic bracelets, electronic necklaces, electronic accessories, Electronic tattoos and smart mirrors) and other electronic devices with Bluetooth connectivity and media playback capabilities.
首先介绍本申请实施例提供的一种系统架构。First, a system architecture provided by an embodiment of the present application is introduced.
如图1所示,图1示例性示出了本申请提供的一种系统10的架构示意图。该系统10可包括:电子设备100和一个或多个蓝牙设备200。As shown in FIG. 1 , FIG. 1 exemplarily shows a schematic diagram of the architecture of a system 10 provided by the present application. The system 10 may include an electronic device 100 and one or more Bluetooth devices 200 .
其中,电子设备100与蓝牙设备200可以通过蓝牙(blue tooth,BT),近场通信(near field communication,NFC),无线保真(wireless fidelity,WiFi)和WiFi直连等无线通信方式进行通信。在本申请实施例中,以蓝牙通信为例进行示意。Wherein, the electronic device 100 and the Bluetooth device 200 may communicate through wireless communication methods such as Bluetooth (bluetooth, BT), near field communication (near field communication, NFC), wireless fidelity (wireless fidelity, WiFi), and WiFi direct connection. In the embodiments of the present application, Bluetooth communication is used as an example for illustration.
具体的,电子设备100与蓝牙设备200通过蓝牙技术(包括经典蓝牙、低功耗蓝牙(bluetooth low energy,BLE)、蓝牙5.0)进行通信。电子设备100可以是智能手机、平板电脑、个人电脑等终端设备。蓝牙设备200可以包括蓝牙耳机201、智能手表202、蓝牙音箱203、智能电视204、车载设备205等支持蓝牙功能的设备。Specifically, the electronic device 100 communicates with the Bluetooth device 200 through Bluetooth technology (including classic Bluetooth, Bluetooth low energy (BLE), and Bluetooth 5.0). The electronic device 100 may be a terminal device such as a smart phone, a tablet computer, and a personal computer. The Bluetooth device 200 may include a Bluetooth headset 201 , a smart watch 202 , a Bluetooth speaker 203 , a smart TV 204 , a vehicle-mounted device 205 and other devices that support the Bluetooth function.
图2示例性的提供了本申请的一个具体场景,如图2所示,电子设备100与蓝牙耳机201、蓝牙音箱203和车载设备205进行连接。在T1时刻,电子设备100检测到来电,需要输出来电音频,电子设备100根据预先配置的推送策略、用户当前的场景(室内)、多个蓝牙设备的连接状态,选择蓝牙耳机201输出来电音频;在T2时刻,电子设备100检测到音乐软件需要输出音频,电子设备100根据预先配置的推送策略、用户当前的场景(室内)、多个蓝牙设备的连接状态,选择蓝牙音箱203输出该音乐软件的音频;在T3时刻,电子设备100检测到音乐软件需要输出音频,电子设备100根据预先配置的推送策略、用户当前的场景(开车)、多个蓝牙设备的连接状态,选择车载设备205输出该音乐软件的音频。本申请实施例,在不同的场景下,根据应用软件与音频设备的映射关系,确定最适合输出音频的音频设备,实现了每个应用和多个蓝牙设备之间的动态消息推送,提高了用户体验。FIG. 2 exemplarily provides a specific scenario of the present application. As shown in FIG. 2 , the electronic device 100 is connected with a Bluetooth headset 201 , a Bluetooth speaker 203 and a vehicle-mounted device 205 . At time T1, the electronic device 100 detects an incoming call and needs to output the audio of the incoming call. The electronic device 100 selects the Bluetooth headset 201 to output the audio of the incoming call according to the preconfigured push strategy, the user's current scene (indoor), and the connection status of multiple Bluetooth devices; At time T2, the electronic device 100 detects that the music software needs to output audio. The electronic device 100 selects the Bluetooth speaker 203 to output the music software according to the preconfigured push strategy, the user's current scene (indoor), and the connection status of multiple Bluetooth devices. Audio: At time T3, the electronic device 100 detects that the music software needs to output audio, and the electronic device 100 selects the in-vehicle device 205 to output the music according to the pre-configured push strategy, the user's current scene (driving), and the connection status of multiple Bluetooth devices software audio. In the embodiment of the present application, in different scenarios, according to the mapping relationship between the application software and the audio device, the most suitable audio device for outputting audio is determined, which realizes the dynamic message push between each application and multiple Bluetooth devices, and improves the user experience. experience.
下面首先介绍本申请以下实施例中提供的示例性电子设备100。The following first introduces the exemplary electronic device 100 provided in the following embodiments of the present application.
图3示出了电子设备100的结构示意图。FIG. 3 shows a schematic structural diagram of the electronic device 100 .
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195 and so on. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本 申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the electronic device 100 . The controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了电子设备100的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the electronic device 100 .
充电管理模块140用于从充电器接收充电输入。The charging management module 140 is used to receive charging input from the charger.
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,外部存储器,显示屏194,摄像头193,和无线通信模块160等供电。The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The power management module 141 receives input from the battery 142 and/or the charging management module 140 and supplies power to the processor 110 , the internal memory 121 , the external memory, the display screen 194 , the camera 193 , and the wireless communication module 160 .
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like. Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 may provide wireless communication solutions including 2G/3G/4G/5G etc. applied on the electronic device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
调制解调处理器modem可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器(application processor,AP)。当modem的射频模块被关闭(停止为射频模块供电),电子设备100无法接收基站发送的来电信号。应用处理器AP通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像 或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor modem may include a modulator and a demodulator. Wherein, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to an application processor (application processor, AP). When the radio frequency module of the modem is turned off (stops supplying power to the radio frequency module), the electronic device 100 cannot receive the incoming call signal sent by the base station. The application processor AP outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。示例性地,无线通信模块160可以包括蓝牙模块、Wi-Fi模块等。The wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR). The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 . Exemplarily, the wireless communication module 160 may include a Bluetooth module, a Wi-Fi module, and the like.
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc. The GNSS may include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou navigation satellite system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
在一些实施例中,无线通信模块160中包括的蓝牙(BT)模块、WLAN模块可以发射信号来探测或扫描电子设备100附近设备,使得电子设备100可以使用蓝牙或WLAN等无线通信技术发现附近设备,并与附近设备建立无线通信连接,并通过上述连接分享数据至附近设备。其中,蓝牙(BT)模块可以提供包括经典蓝牙(蓝牙2.1)、蓝牙低功耗(Bluetooth low energy,BLE)或蓝牙5.0中一项或多项蓝牙通信的解决方案。WLAN模块可以提供包括Wi-Fi direct、Wi-Fi LAN或Wi-Fi softAP中一项或多项WLAN通信的解决方案。In some embodiments, a Bluetooth (BT) module and a WLAN module included in the wireless communication module 160 can transmit signals to detect or scan devices near the electronic device 100 , so that the electronic device 100 can discover nearby devices using wireless communication technologies such as Bluetooth or WLAN , and establish a wireless communication connection with nearby devices, and share data to nearby devices through the above connection. Among them, the Bluetooth (BT) module can provide a solution including one or more Bluetooth communications in classic Bluetooth (Bluetooth 2.1), Bluetooth low energy (Bluetooth low energy, BLE) or Bluetooth 5.0. The WLAN module can provide a solution including one or more WLAN communications in Wi-Fi direct, Wi-Fi LAN or Wi-Fi softAP.
在一些实施例中,移动通信模块150提供的无线通信的解决方案可使得电子设备可以与网络中的设备(如服务器)通信,无线通信模块160提供的WLAN无线通信的解决方案也可使得电子设备可以与网络中的设备(如服务器)通信,并可以通过网络中的该设备(如服务器)与云端设备通信。这样,电子设备便可以发现云端设备、传输数据至云端设备。In some embodiments, the wireless communication solution provided by the mobile communication module 150 may enable the electronic device to communicate with a device (such as a server) in the network, and the WLAN wireless communication solution provided by the wireless communication module 160 may also enable the electronic device It can communicate with a device (such as a server) in the network, and can communicate with a cloud device through the device (such as a server) in the network. In this way, the electronic device can discover the cloud device and transmit data to the cloud device.
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。在本申请的一些实施例中,显示屏194中显示有系统当前输出的界面内容。例如,界面内容为即时通讯应用提 供的界面。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. In some embodiments of the present application, the display screen 194 displays the interface content currently output by the system. For example, the interface content is the interface provided by the instant messaging application. In some embodiments, the electronic device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。ISP用于处理摄像头193反馈的数据。在一些实施例中,ISP可以设置在摄像头193中。摄像头193用于捕获静态图像或视频。The electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like. The ISP is used to process the data fed back by the camera 193 . In some embodiments, the ISP may be provided in the camera 193 . Camera 193 is used to capture still images or video.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐、照片、视频等数据保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 . The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save data such as music, photos, videos, etc. in an external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。Internal memory 121 may be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by executing the instructions stored in the internal memory 121 . The internal memory 121 may include a storage program area and a storage data area. The storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like. The storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100 and the like.
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频数据输出,也用于将模拟音频输入转换为数字音频数据。扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。耳机接口170D用于连接有线耳机。The audio module 170 is used to convert digital audio information to analog audio data output, and also to convert analog audio input to digital audio data. Speaker 170A, also referred to as a "speaker", is used to convert audio electrical signals into sound signals. The receiver 170B, also referred to as "earpiece", is used to convert audio electrical signals into sound signals. The microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. The earphone jack 170D is used to connect wired earphones.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。终端100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,终端100根据压力传感器180A检测所述触摸操作强度。终端100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be provided on the display screen 194 . There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, and the like. The capacitive pressure sensor may be comprised of at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The terminal 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the terminal 100 detects the intensity of the touch operation according to the pressure sensor 180A. The terminal 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example, when a touch operation whose intensity is less than the first pressure threshold acts on the short message application icon, the instruction for viewing the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.
陀螺仪传感器180B可以用于确定终端100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定终端100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测终端100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消终端100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B may be used to determine the motion attitude of the terminal 100 . In some embodiments, the angular velocity of terminal 100 about three axes (ie, x, y, and z axes) may be determined by gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyroscope sensor 180B detects the angle at which the terminal 100 shakes, calculates the distance to be compensated by the lens module according to the angle, and allows the lens to counteract the shake of the terminal 100 through reverse motion to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenarios.
气压传感器180C用于测量气压。在一些实施例中,终端100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
磁传感器180D包括霍尔传感器。终端100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当终端100是翻盖机时,终端100可以根据磁传感器180D检测翻 盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The terminal 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the terminal 100 is a flip machine, the terminal 100 may detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测终端100在各个方向上(一般为三轴)加速度的大小。当终端100静止时可检测出重力的大小及方向。还可以用于识别终端姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the magnitude of the acceleration of the terminal 100 in various directions (generally three axes). When the terminal 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the terminal posture, and can be used in horizontal and vertical screen switching, pedometer and other applications.
距离传感器180F,用于测量距离。终端100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,终端100可以利用距离传感器180F测距以实现快速对焦。Distance sensor 180F for measuring distance. The terminal 100 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the terminal 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。终端100通过发光二极管向外发射红外光。终端100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定终端100附近有物体。当检测到不充分的反射光时,终端100可以确定终端100附近没有物体。终端100可以利用接近光传感器180G检测用户手持终端100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes. The light emitting diodes may be infrared light emitting diodes. The terminal 100 emits infrared light to the outside through light emitting diodes. The terminal 100 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the terminal 100 . When insufficient reflected light is detected, the terminal 100 may determine that there is no object near the terminal 100 . The terminal 100 can use the proximity light sensor 180G to detect that the user holds the terminal 100 close to the ear to talk, so as to automatically turn off the screen to save power. Proximity light sensor 180G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
环境光传感器180L用于感知环境光亮度。终端100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测终端100是否在口袋里,以防误触。The ambient light sensor 180L is used to sense ambient light brightness. The terminal 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the terminal 100 is in a pocket, so as to prevent accidental touch.
指纹传感器180H用于采集指纹。终端100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The terminal 100 can use the collected fingerprint characteristics to unlock the fingerprint, access the application lock, take a picture with the fingerprint, answer the incoming call with the fingerprint, and the like.
温度传感器180J用于检测温度。在一些实施例中,终端100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,终端100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,终端100对电池142加热,以避免低温导致终端100异常关机。在其他一些实施例中,当温度低于又一阈值时,终端100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect the temperature. In some embodiments, the terminal 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the terminal 100 reduces the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the terminal 100 heats the battery 142 to avoid abnormal shutdown of the terminal 100 due to low temperature. In some other embodiments, when the temperature is lower than another threshold, the terminal 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于终端100的表面,与显示屏194所处的位置不同。Touch sensor 180K, also called "touch panel". The touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”. The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to touch operations may be provided through display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the terminal 100 , which is different from the position where the display screen 194 is located.
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone, combined with the bone conduction earphone. The audio module 170 can analyze the voice signal based on the vibration signal of the vocal vibration bone block obtained by the bone conduction sensor 180M, so as to realize the voice function. The application processor can analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the function of heart rate detection.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。马达191可以产生振动提示。指示器192可以是指示灯,可以用于指示充电状态,电量变 化,也可以用于指示消息,未接来电,通知等。The keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key. Motor 191 can generate vibrating cues. The indicator 192 may be an indicator light, which may be used to indicate charging status, battery changes, and may also be used to indicate messages, missed calls, notifications, and the like.
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。Motor 191 can generate vibrating cues. The motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。The SIM card interface 195 is used to connect a SIM card. The SIM card can be contacted and separated from the electronic device 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 . The electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as call and data communication. In some embodiments, the electronic device 100 employs an eSIM, ie: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
基于前述关于电子设备100的硬件结构的基础上,其中,在本申请实施例中,电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备100的软件结构。其中,Android系统仅为本申请实施例中电子设备100的一种系统示例,本申请还可以适用于其他类型的操作系统,比如IOS、windows、鸿蒙等,本申请对此不加以限制。下述仅将Android系统作为电子设备100的操作系统的示例。Based on the aforementioned hardware structure of the electronic device 100, in the embodiments of the present application, the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiments of the present application take an Android system with a layered architecture as an example to exemplarily describe the software structure of the electronic device 100 . The Android system is only a system example of the electronic device 100 in the embodiment of the present application, and the present application can also be applied to other types of operating systems, such as IOS, windows, Hongmeng, etc., which is not limited in the present application. The following only takes the Android system as an example of the operating system of the electronic device 100 .
图4是本申请实施例的电子设备100的软件结构框图。FIG. 4 is a block diagram of the software structure of the electronic device 100 according to the embodiment of the present application.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为三层,从上至下分别为应用程序层,中间件和操作系统层。The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into three layers, which are an application layer, a middleware layer and an operating system layer from top to bottom.
应用程序层可以包括一系列应用程序包。The application layer can include a series of application packages.
如图4所示,应用程序包可以包括短信息,通话,地图,导航,音乐,视频,图库等应用程序。As shown in Figure 4, the application package can include applications such as SMS, call, map, navigation, music, video, gallery and so on.
中间件是一类连接软件组件和应用的计算机软件,它包括一组服务。主要功能是为处于自己上层的应用软件(应用程序包)提供运行与开发的环境,帮助用户灵活、高效地开发和集成复杂的应用软件;包括为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。中间件是一种独立的系统软件或服务程序,分布式应用软件借助这种软件在不同的技术之间共享资源,中间件位于客户机/服务器的操作系统之上,管理计算机资源和网络通信。Middleware is a type of computer software that connects software components and applications, and includes a set of services. The main function is to provide a running and development environment for the application software (application package) in the upper layer, helping users to develop and integrate complex application software flexibly and efficiently; programming interface, API) and programming frameworks. Middleware is an independent system software or service program. Distributed application software uses this software to share resources among different technologies. Middleware is located on the client/server operating system to manage computer resources and network communication.
在本申请实施例中,中间件提供了蓝牙音频输出服务模块,所述蓝牙音频输出服务模块包括设备信息管理模块、应用信息管理模块和决策管理模块。其中,In the embodiment of the present application, the middleware provides a Bluetooth audio output service module, and the Bluetooth audio output service module includes a device information management module, an application information management module, and a decision management module. in,
设备信息管理模块用于发现并记录与电子设备100具有蓝牙连接关系,且支持音频输出的设备以及设备信息。其中,具有蓝牙连接关系是指,和电子设备100正在进行蓝牙连接,或者曾经建立过蓝牙连接。例如在系统10中,电子设备100与一个或多个蓝牙设备 200建立蓝牙连接,电子设备100的设备信息管理模块可以获取一个或多个支持音频输出的蓝牙设备200的设备信息,并将上述设备信息进行存储。其中,设备信息包括设备标识(例如设备的名称和/或设备的MAC地址)、设备属性(例如设备的音频能力、设备的交互能力等)、设备类型(例如穿戴设备、车载设备、家居设备、蓝牙耳机等)、设备的当前状态(例如设备开启或关闭、熄屏或亮屏、设备是否佩戴在用户身上等)、设备的连接时间、以及设备的优先级信息等。The device information management module is used for discovering and recording devices and device information that have a Bluetooth connection relationship with the electronic device 100 and support audio output. Wherein, having a Bluetooth connection relationship means that a Bluetooth connection is in progress with the electronic device 100, or a Bluetooth connection has been established before. For example, in the system 10, the electronic device 100 establishes a Bluetooth connection with one or more Bluetooth devices 200, and the device information management module of the electronic device 100 can acquire the device information of one or more Bluetooth devices 200 that support audio output, and use the above devices to information is stored. The device information includes device identification (such as device name and/or device MAC address), device attributes (such as device audio capability, device interaction capability, etc.), device type (such as wearable device, vehicle-mounted device, home device, Bluetooth headset, etc.), the current status of the device (for example, the device is turned on or off, the screen is off or on, whether the device is worn on the user, etc.), the connection time of the device, and the priority information of the device, etc.
示例性的,如表1所示,Exemplarily, as shown in Table 1,
表1Table 1
Figure PCTCN2021125915-appb-000001
Figure PCTCN2021125915-appb-000001
在一些实施例中,设备信息管理模块从操作系统层获取与电子设备100具有蓝牙连接关系且支持音频输出的设备的设备信息,进而再通过设备的设备标识(例如设备的名称和/或设备的MAC地址)从应用程序层获取该设备关联的APP,基于该设备关联的APP,设备信息管理模块确定出该设备的设备类型。In some embodiments, the device information management module obtains the device information of the device that has a Bluetooth connection with the electronic device 100 and supports audio output from the operating system layer, and then uses the device identifier of the device (for example, the name of the device and/or the device ID of the device). MAC address) obtains the APP associated with the device from the application layer, and based on the APP associated with the device, the device information management module determines the device type of the device.
在表1中,当设备关联的APP为运动健康时,可以判断该设备对应的设备类型为穿戴设备;当设备关联的APP为智慧生活时,可以判断该设备对应的设备类型为家居设备;当设备不与其他APP关联,可以通过设备标识(例如设备名称)或设备属性信息确定设备的设备类型。其中,设备信息管理模块中的设备信息可以周期性更新。In Table 1, when the APP associated with the device is Sports Health, it can be judged that the device type corresponding to the device is a wearable device; when the APP associated with the device is Smart Life, it can be judged that the device type corresponding to the device is home equipment; when The device is not associated with other APPs, and the device type of the device can be determined through the device identification (eg, device name) or device attribute information. The device information in the device information management module may be updated periodically.
应用信息管理模块用于记录电子设备100上安装的应用软件以及应用软件相应的软件信息。当电子设备100中安装了新的应用软件或者卸载了应用软件,则应用信息管理模块中的软件信息进行更新。其中,软件信息包括应用名称(或者应用ID)、关联的APP、是否需要调用音频设备等。The application information management module is used to record application software installed on the electronic device 100 and software information corresponding to the application software. When new application software is installed in the electronic device 100 or the application software is uninstalled, the software information in the application information management module is updated. The software information includes an application name (or an application ID), an associated APP, whether it is necessary to call an audio device, and the like.
具体地,在初次安装某个APP时,可以通过读取该APP的MANIFEST.XML文件的内容,检测该APP是否需要调用音频设备,如果该文件中声明了需要音频权限,则确定该APP需要调用音频设备;也可以通过APP的audio字段确定该APP是否需要调用音频设备,当audio字段写入了有效值时,确定该APP需要调用音频设备。Specifically, when an APP is installed for the first time, it can be detected whether the APP needs to call the audio device by reading the content of the MANIFEST.XML file of the APP. If the file declares that audio permission is required, it is determined that the APP needs to call Audio device; it is also possible to determine whether the APP needs to call the audio device through the audio field of the APP. When a valid value is written in the audio field, it is determined that the APP needs to call the audio device.
决策管理模块用于结合设备信息管理模块中的设备信息和应用信息管理模块中的应用软件信息,根据预设策略确定出输出应用软件的音频的设备。The decision management module is used to combine the device information in the device information management module and the application software information in the application information management module to determine the device that outputs the audio of the application software according to a preset strategy.
决策管理模块存储有应用软件、推送场景、以及推送设备类型的对应关系,当决策管理模块检测到应用软件需要调用音频设备时,确定当前的场景。其中,在不同的场景下, 同一个应用软件可以对应不同的音频输出设备;在相同的场景下,不同的应用软件也可以对应不同的音频输出设备。决策管理模块可以结合需要输出音频的应用软件以及当前的场景,在当前已连接的设备中确定出音频输出设备。The decision management module stores the corresponding relationship between the application software, the push scene, and the push device type. When the decision management module detects that the application software needs to call the audio device, it determines the current scene. Wherein, in different scenarios, the same application software can correspond to different audio output devices; in the same scenario, different application software can also correspond to different audio output devices. The decision management module can determine the audio output device among the currently connected devices in combination with the application software that needs to output audio and the current scene.
本申请实施例中,示例性的,推送场景可以包括如下四类:开车场景、睡觉场景、室内场景和户外场景。如表2所示,In the embodiment of the present application, exemplary, the push scene may include the following four categories: a driving scene, a sleeping scene, an indoor scene, and an outdoor scene. As shown in table 2,
表2Table 2
Figure PCTCN2021125915-appb-000002
Figure PCTCN2021125915-appb-000002
表2中,以音乐软件(例如华为音乐)为例,示例性示出了应用软件、推送场景、以及推送设备类型的对应关系。对于华为音乐来说,在开车场景下,对应的推送设备类型可以是车载设备和穿戴设备,当电子设备同时连接了车载设备和穿戴设备时,通过优先级确定最终的推送设备为车载设备(车载设备优先级更高);在睡觉场景下,对应的推送设备类型可以是蓝牙耳机;在室内场景下,对应的推送设备类型可以是家居设备和穿戴设备,当电子设备同时连接了家居设备和穿戴设备时,通过优先级确定最终的推送设备为家居设备(家居设备优先级更高)。In Table 2, taking music software (eg, Huawei Music) as an example, the correspondence between application software, push scenarios, and push device types is exemplarily shown. For Huawei Music, in the driving scenario, the corresponding push device types can be in-vehicle devices and wearable devices. When the electronic device is connected to the in-vehicle device and the wearable device at the same time, the final push device is determined by priority as the in-vehicle device (in-vehicle device). The device has a higher priority); in the sleeping scenario, the corresponding push device type can be a Bluetooth headset; in the indoor scenario, the corresponding push device type can be a home device and a wearable device. When the electronic device is connected to the home device and wearable device at the same time When the device is selected, the final push device is determined by priority as a home device (home device has a higher priority).
一些实施例中,在可选的推送设备类型包括两种或两种以上的情况下,也可以通过已经推送的次数确定最终的推送设备。可选的,已经推送的次数更多的设备为最终的推送设备。In some embodiments, when the optional push device types include two or more types, the final push device may also be determined according to the number of pushes. Optionally, the device that has been pushed more times is the final pushed device.
其中,推送方式包括直接播放和语音确认,例如家居设备的推送方式为语音确认,也即是说在家居设备输出华为音乐的音频数据之前,会先输出语音向用户确认是否确认播放,得到用户的指令后再输出华为音乐的音频数据。Among them, the push method includes direct playback and voice confirmation. For example, the push method of home equipment is voice confirmation, that is, before the home equipment outputs the audio data of Huawei Music, it will output voice to the user to confirm whether to confirm the playback. After the command, output the audio data of Huawei Music.
其中,应用软件、推送场景、以及推送设备类型之间的对应关系可以是用户配置的,也可以是电子设备100中默认配置的。The correspondence between the application software, the push scenario, and the push device type may be configured by the user, or may be configured by default in the electronic device 100 .
可选的,在一些实施例中,决策管理模块还存储有环境信息、用户状态信息、以及输出音量的对应关系。决策管理模块可以通过环境信息、用户状态信息,判断出音频数据的输出音量。其中,环境信息包括噪音、天气、温度等信息,用户状态包括压力状态、情绪状态等信息。示例性的,如表3所示,Optionally, in some embodiments, the decision management module further stores the corresponding relationship between environmental information, user status information, and output volume. The decision management module can determine the output volume of the audio data through environmental information and user status information. The environmental information includes information such as noise, weather, and temperature, and the user state includes information such as stress state and emotional state. Exemplarily, as shown in Table 3,
表3table 3
当前环境(例如噪音,天气,温度)Current environment (e.g. noise, weather, temperature) 用户压力状态User stress state 建议输出音量Recommended output volume
安静,大雨,25摄氏度Quiet, heavy rain, 25 degrees Celsius 正常normal 偏小too small
安静,暴雨,25摄氏度Quiet, heavy rain, 25 degrees Celsius 放松Relax 偏小too small
正常,晴天,25摄氏度Normal, sunny, 25 degrees Celsius 放松Relax 正常normal
吵闹,晴天,25摄氏度Noisy, sunny, 25 degrees Celsius 正常normal 偏大too large
表3中,示例性示出了环境信息、用户状态信息、以及输出音量的对应关系。当前的环境噪音为安静,用户压力状态为正常,则输出音量为偏小(例如10-40分贝);当前的环境噪音为安静,用户压力状态为放松,则输出音量为偏小(例如10-30分贝);当前的环境噪音为正常,用户压力状态为放松,则输出音量为正常(例如40-60分贝);等等。In Table 3, the corresponding relationship between the environmental information, the user state information, and the output volume is exemplarily shown. If the current ambient noise is quiet and the user's stress state is normal, the output volume is low (for example, 10-40 decibels); if the current ambient noise is quiet and the user's stress state is relaxed, the output volume is low (for example, 10-40 decibels). 30 decibels); the current ambient noise is normal, the user's stress state is relaxed, and the output volume is normal (for example, 40-60 decibels); and so on.
可选的,在一些实施例中,决策管理模块还存储有场景信息和输出音量范围的对应关系。例如在开车场景下,车内为封闭空间,输出音量的最大值不超过80分贝;又例如在睡觉场景下,输出音量的最大值不超过50分贝;又例如在户外场景下,输出音量不作限制;等等。Optionally, in some embodiments, the decision management module further stores the corresponding relationship between the scene information and the output volume range. For example, in the driving scene, the interior of the car is a closed space, and the maximum output volume does not exceed 80 decibels; for example, in the sleeping scene, the maximum output volume does not exceed 50 decibels; for example, in the outdoor scene, the output volume is not limited. ;etc.
可选的,在本申请一些实施例中,决策管理模块可以根据环境噪音的吵闹程度动态改变输出声音的音量。Optionally, in some embodiments of the present application, the decision management module may dynamically change the volume of the output sound according to the loudness of the ambient noise.
可选的,在一些实施例中,决策管理模块还能够根据用户的导航/轨迹信息,确定音频播放时长。例如,决策管理模块获取导航/轨迹信息的开始时间和预计结束时间,确定输出音频的时间或时长。Optionally, in some embodiments, the decision management module can also determine the audio playback duration according to the user's navigation/track information. For example, the decision management module obtains the start time and expected end time of the navigation/track information, and determines the time or duration of the output audio.
操作系统层提供了对硬件的管理功能,用于对应用程序使用电子设备100的各种资源(CPU、存储器、输入输出设备等)进行管理和分配。例如,当某一应用程序需要运行时,操作系统将其调入内存中,为该应用程序分配内存空间进行运行以及数据存储。再如某应用程序需要输出音频数据时,操作系统调用音频输出设备,为该应用程序提供对该音频输出设备的控制服务等。The operating system layer provides a hardware management function, and is used to manage and allocate various resources (CPU, memory, input and output devices, etc.) of the electronic device 100 used by the application program. For example, when an application needs to be run, the operating system calls it into memory, and allocates memory space for the application to run and store data. For another example, when an application needs to output audio data, the operating system calls the audio output device to provide the application with a control service for the audio output device, and the like.
为便于理解本申请实施例,下面结合图5,对本申请实施例所适用的蓝牙设备200内部模块及功能进行介绍。To facilitate understanding of the embodiments of the present application, the following describes the internal modules and functions of the Bluetooth device 200 to which the embodiments of the present application are applicable with reference to FIG. 5 .
图5示例性的示出了本申请实施例提供的蓝牙设备200的结构示意图。FIG. 5 exemplarily shows a schematic structural diagram of a Bluetooth device 200 provided by an embodiment of the present application.
下面以蓝牙设备200为例对实施例进行具体说明。应该理解的是,图5所示蓝牙设备200仅是一个范例,并且蓝牙设备200可以具有比图5中所示的更多或更少的部件,可以组合两个或多个的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包 括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现,The embodiment will be described in detail below by taking the Bluetooth device 200 as an example. It should be understood that the Bluetooth device 200 shown in FIG. 5 is only an example, and that the Bluetooth device 200 may have more or fewer components than those shown in FIG. 5, may combine two or more components, or may Available in different parts configurations. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits,
如图5所示,蓝牙设备200可以包括:处理器201,存储器202,蓝牙通信模块203,天线204,电源开关205,USB通信处理模块206,音频模块207。其中:As shown in FIG. 5 , the Bluetooth device 200 may include: a processor 201 , a memory 202 , a Bluetooth communication module 203 , an antenna 204 , a power switch 205 , a USB communication processing module 206 , and an audio module 207 . in:
处理器201可用于读取和执行计算机可读指令。具体实现中,处理器201可主要包括控制器、运算器和寄存器。其中,控制器主要负责指令译码,并为指令对应的操作发出控制信号。运算器主要负责保存指令执行过程中临时存放的寄存器操作数和中间操作结果等。具体实现中,处理器201的硬件架构可以是专用集成电路(ASIC)架构、MIPS架构、ARM架构或者NP架构等等。The processor 201 may be used to read and execute computer readable instructions. In a specific implementation, the processor 201 may mainly include a controller, an arithmetic unit, and a register. Among them, the controller is mainly responsible for instruction decoding, and sends out control signals for the operations corresponding to the instructions. The arithmetic unit is mainly responsible for saving the register operands and intermediate operation results temporarily stored during the execution of the instruction. In a specific implementation, the hardware architecture of the processor 201 may be an application specific integrated circuit (ASIC) architecture, a MIPS architecture, an ARM architecture, an NP architecture, or the like.
在一些实施例中,处理器201可以用于解析蓝牙通信处理模块203接收到的信号,如电子设备100发送的音频信息、推荐信息等等。处理201可以用于根据解析结果进行相应的处理操作,如根据推荐信息输出音频信息,等等。In some embodiments, the processor 201 may be configured to parse the signals received by the Bluetooth communication processing module 203 , such as audio information, recommendation information and the like sent by the electronic device 100 . Processing 201 may be used to perform corresponding processing operations according to the parsing result, such as outputting audio information according to the recommendation information, and so on.
存储器202与处理器201耦合,用于存储各种软件程序和/或多组指令。具体实现中,存储器202可包括高速随机存取的存储器,并且也可包括非易失性存储器,例如一个或多个磁盘存储设备、闪存设备或其他非易失性固态存储设备。存储器202可以存储操作系统,例如uCOS,VxWorks、RTLinux等嵌入式操作系统。存储器202还可以存储通信程序,该通信程序可用于与电子设备100,一个或多个服务器,或其他设备进行通信。 Memory 202 is coupled to processor 201 for storing various software programs and/or sets of instructions. In particular implementations, memory 202 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. The memory 202 can store operating systems, such as embedded operating systems such as uCOS, VxWorks, RTLinux, and the like. Memory 202 may also store communication programs that may be used to communicate with electronic device 100, one or more servers, or other devices.
蓝牙通信模块203可以包括经典蓝牙(BT)模块、低功耗蓝牙(BLE)模块和蓝牙5.0模块。在一些实施例中,蓝牙通信模块203可以监听到其他设备(如电子设备100)发射的信号,如探测请求、扫描信号等等,并可以发送响应信号、扫描响应等,使得其他设备(如电子设备100)可以发现蓝牙设备200,并去其他设备(如电子设备100)建立无线通信连接,通过蓝牙与其他设备(如电子设备100)进行通信。The Bluetooth communication module 203 may include a Classic Bluetooth (BT) module, a Bluetooth Low Energy (BLE) module, and a Bluetooth 5.0 module. In some embodiments, the Bluetooth communication module 203 can monitor signals transmitted by other devices (such as electronic device 100 ), such as probe requests, scan signals, etc., and can send response signals, scan responses, etc., so that other devices (such as electronic devices 100 ) transmit The device 100) can discover the Bluetooth device 200, and establish a wireless communication connection with other devices (such as the electronic device 100), and communicate with other devices (such as the electronic device 100) through Bluetooth.
在另一些实施例中,蓝牙通信模块203也可以发射信号,如广播BLE信号,使得其他设备(如电子设备100)可以发现蓝牙设备200,并与其他设备(如电子设备100)建立无线通信连接,通过蓝牙与其他设备(如电子设备100)进行通信。In other embodiments, the Bluetooth communication module 203 can also transmit signals, such as broadcasting BLE signals, so that other devices (such as the electronic device 100 ) can discover the Bluetooth device 200 and establish a wireless communication connection with other devices (such as the electronic device 100 ). , and communicate with other devices (such as the electronic device 100 ) through Bluetooth.
蓝牙设备200的无线通信功能可以通过天线204,蓝牙通信模块203,调制解调处理器等实现。The wireless communication function of the Bluetooth device 200 can be implemented by an antenna 204, a Bluetooth communication module 203, a modem processor, and the like.
天线204可用于发射和接收电磁波信号。蓝牙设备200中的每个天线可用于覆盖单个或多个通信频带。 Antenna 204 may be used to transmit and receive electromagnetic wave signals. Each antenna in Bluetooth device 200 may be used to cover a single or multiple communication frequency bands.
在一些实施例中蓝牙通信模块203的天线可以有一个或多个。In some embodiments, the Bluetooth communication module 203 may have one or more antennas.
电源开关205可用于控制电源向蓝牙设备200的供电。The power switch 205 may be used to control the supply of power to the Bluetooth device 200 from the power source.
USB通信处理模块206可用于通过USB接口(未示出)与其他设备进行通信。The USB communication processing module 206 may be used to communicate with other devices through a USB interface (not shown).
音频模块207可用于通过音频输出接口输出音频数据,这样可使得蓝牙设备200支持音频播放。音频模块还可用于通过音频输入接口接收音频数据。蓝牙设备200可以为蓝牙耳机等媒体播放设备。The audio module 207 can be used to output audio data through the audio output interface, so that the Bluetooth device 200 can support audio playback. The audio module can also be used to receive audio data through the audio input interface. The Bluetooth device 200 may be a media playing device such as a Bluetooth headset.
在一些实施例中,蓝牙设备200还可以包括显示屏(未示出),其中,该显示屏可用于显示图像,提示信息等。显示屏可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED)显示屏,有源矩阵有机发光二极体(active-matrix organic light emitting diode,AMOLED)显示屏,柔性发光二极管(flexible light-emitting diode, FLED)显示屏,量子点发光二极管(quantum dot light emitting diodes,QLED)显示屏等等。In some embodiments, the Bluetooth device 200 may further include a display screen (not shown), wherein the display screen may be used to display images, prompt information, and the like. The display screen can be a liquid crystal display (LCD), an organic light-emitting diode (OLED) display, and an active-matrix organic light emitting diode (AMOLED) display. screen, flexible light-emitting diode (flexible light-emitting diode, FLED) display, quantum dot light emitting diode (quantum dot light emitting diodes, QLED) display and so on.
在一些实施例中,蓝牙设备200还可以包括RS-232接口等串行接口。该串行接口可连接至其他设备,如音箱等音频外放设备,使得蓝牙设备200和音频外放设备协作播放音视频。In some embodiments, the Bluetooth device 200 may also include a serial interface such as an RS-232 interface. The serial interface can be connected to other devices, such as audio amplifiers such as speakers, so that the Bluetooth device 200 and the audio amplifiers cooperate to play audio and video.
在一些实施例中,蓝牙设备200还可以包括一个或多个传感器(未示出)。其中,一个或多个传感器包括运动传感器(例如加速度传感器、陀螺仪传感器、地磁传感器(又称电子罗盘传感器)、大气压传感器等),生物传感器(例如血糖传感器、血压传感器、心电传感器、肌电传感器、体温传感器、脑电波传感器、心率传感器、皮电传感器等),环境传感器(例如空气温湿度传感器、雨量传感器、光照传感器、风速风向传感器、颗粒物传感器等),等等。蓝牙设备200通过该一个或多个传感器可以检测出环境信息,以及佩戴该蓝牙设备200的用户的健康状态、运动状态、情绪状态、压力状态等信息。In some embodiments, the Bluetooth device 200 may also include one or more sensors (not shown). Among them, one or more sensors include motion sensors (such as acceleration sensors, gyroscope sensors, geomagnetic sensors (also known as electronic compass sensors), atmospheric pressure sensors, etc.), biological sensors (such as blood sugar sensors, blood pressure sensors, ECG sensors, electromyography sensors, etc.) Sensors, body temperature sensors, brain wave sensors, heart rate sensors, electrical skin sensors, etc.), environmental sensors (such as air temperature and humidity sensors, rain sensors, light sensors, wind speed and direction sensors, particulate matter sensors, etc.), and so on. Through the one or more sensors, the Bluetooth device 200 can detect environmental information, as well as information such as the health state, exercise state, emotional state, stress state, and the like of the user wearing the Bluetooth device 200 .
可以理解的是图5示意的结构并不构成对蓝牙设备200的具体限定。在本申请另一些实施例中,蓝牙设备200可以包括比图示更多或更少的部件,或组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structure shown in FIG. 5 does not constitute a specific limitation on the Bluetooth device 200 . In other embodiments of the present application, the Bluetooth device 200 may include more or less components than shown, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
本申请实施例,电子设备100存储有应用软件、推送场景、以及推送设备类型之间的对应关系,当电子设备100检测到有应用软件需要输出音频数据,确定当前场景。电子设备100根据对应关系,确定出在当前场景下该应用软件的推送设备类型。电子设备100基于该推送设备类型,在已连接的蓝牙设备中确定出音频输出设备。在不同的场景下,同一个应用软件的音频输出设备可能不同;在相同的场景下,不同应用软件的音频输出设备也可能不同。其中,电子设备100中存储的对应关系是用户设置的,用户只需要一次设置,后续电子设备100自动监测音频数据,以及自动选择音频输出设备,不需要用户手动干预。实现了对音频的自动推送的效果,提升用户体验。In this embodiment of the present application, the electronic device 100 stores the correspondence between application software, push scenarios, and push device types. When the electronic device 100 detects that there is application software that needs to output audio data, the current scene is determined. The electronic device 100 determines the push device type of the application software in the current scenario according to the corresponding relationship. The electronic device 100 determines an audio output device among the connected Bluetooth devices based on the push device type. In different scenarios, the audio output devices of the same application software may be different; in the same scenario, the audio output devices of different application software may also be different. The correspondence stored in the electronic device 100 is set by the user, and the user only needs to set it once, and the electronic device 100 automatically monitors the audio data and automatically selects the audio output device, without manual intervention by the user. The effect of automatic audio push is realized, which improves the user experience.
在一些实施例中,电子设备100中存储的对应关系也可以是电子设备100基于大数据分析得到。可选的,电子设备100可以周期性更新该对应关系。In some embodiments, the correspondence stored in the electronic device 100 may also be obtained by the electronic device 100 based on big data analysis. Optionally, the electronic device 100 may periodically update the corresponding relationship.
下面从用户界面上详细说明电子设备100配置对应关系的过程。The following describes the process of configuring the correspondence relationship in the electronic device 100 in detail from the user interface.
如图6A所示,图6A示例性的示出了一种蓝牙配置界面71,该蓝牙配置界面71包括蓝牙的开关状态、设备名称、已配对的设备、音频输出配置等选项,其中,As shown in FIG. 6A, FIG. 6A exemplarily shows a Bluetooth configuration interface 71, the Bluetooth configuration interface 71 includes options such as Bluetooth switch status, device name, paired device, audio output configuration, etc., wherein,
蓝牙的开关状态可以通过图标701进行控制,图标701可以描述为开关,当图标701中的圆圈在左边时,表示关闭;当图标701中的圆圈在右边时,表示开启;其中,关闭状态和开启状态可以通过单击操作进行切换。如图6A所示,此时蓝牙的开关状态这一行的图标701的圆圈在右边,表示当前为蓝牙开启状态。若此时电子设备100检测到针对于图标701的用户操作(例如单击操作),蓝牙的开关状态这一行的图标701的圆圈在左边,指示当前的蓝牙为关闭状态。The on/off state of Bluetooth can be controlled by icon 701. Icon 701 can be described as a switch. When the circle in icon 701 is on the left, it means off; when the circle in icon 701 is on the right, it means on; among them, the off state and on The state can be toggled with a single click. As shown in FIG. 6A , at this time, the circle of the icon 701 in the row of the Bluetooth ON/OFF state is on the right, indicating that the Bluetooth is currently in an ON state. If the electronic device 100 detects a user operation (eg, a single-click operation) on the icon 701 at this time, the circle of the icon 701 in the row of the Bluetooth ON/OFF state is on the left, indicating that the current Bluetooth is OFF.
设备名称指示了电子设备100的名称,该名称可以是用户自定义的名称,也可以是电子设备100预置的名称。The device name indicates the name of the electronic device 100 , and the name may be a user-defined name or a preset name of the electronic device 100 .
已配对的设备中包括与电子设备100建立了蓝牙连接的设备以及建立过蓝牙连接的设备。在图6A中,已配对的设备包括HUAWEI freebuds3、Car-Link-235和watch gt;其中, 已连接的设备为与电子设备100建立了蓝牙连接的设备,包括HUAWEI freebuds3和Car-Link-235,watch gt为与电子设备100配对过的设备,但是当前没有与电子设备100建立蓝牙连接。控件703关联了HUAWEI freebuds3,当电子设备100检测到针对于控件703的用户操作,电子设备100显示HUAWEI freebuds3的具体控制界面;控件704和控件705同理,此处不再赘述。The paired devices include devices that have established a Bluetooth connection with the electronic device 100 and devices that have established a Bluetooth connection. In FIG. 6A, the paired devices include HUAWEI freebuds3, Car-Link-235 and watch gt; wherein, the connected devices are devices that have established a Bluetooth connection with the electronic device 100, including HUAWEI freebuds3 and Car-Link-235, watch gt is a device that has been paired with the electronic device 100, but does not currently establish a Bluetooth connection with the electronic device 100. The control 703 is associated with the HUAWEI freebuds3. When the electronic device 100 detects a user operation for the control 703, the electronic device 100 displays the specific control interface of the HUAWEI freebuds3; the control 704 and the control 705 are the same, and will not be repeated here.
在一些实施例中,用户可以针对控件703、704以及705等进行选择,手动选择音频输出设备。其中,若用户选择控件703对应的设备HUAWEI freebuds3为音频输出设备,则在任意场景下,设备HUAWEI freebuds3输出任意应用软件的音频数据。In some embodiments, the user may select for controls 703, 704, and 705, etc., to manually select an audio output device. Wherein, if the user selects the device HUAWEI freebuds3 corresponding to the control 703 as an audio output device, then in any scenario, the device HUAWEI freebuds3 outputs audio data of any application software.
音频输出配置针对于应用软件进行配置,包括一个或多个应用软件的配置选项。应用软件可以是第三方应用程序,例如即时通信APP、网上购物APP、音乐APP、游戏APP等;也可以是系统应用程序,例如来电、短信、闹钟等。在图6A中,示例性的示出了华为音乐、华为视频、地图、来电等应用软件对应的配置选项,其中,当电子设备100检测到针对于配置选项706的用户操作,响应于该用户操作,电子设备100显示华为音乐的具体配置界面。The audio output configuration is configured for the application software and includes one or more configuration options for the application software. The application software can be a third-party application program, such as an instant messaging APP, an online shopping APP, a music APP, a game APP, etc.; it can also be a system application program, such as an incoming call, a short message, an alarm clock, and the like. In FIG. 6A , configuration options corresponding to application software such as Huawei Music, Huawei Video, Maps, and incoming calls are exemplarily shown, wherein, when the electronic device 100 detects a user operation for the configuration option 706, in response to the user operation , the electronic device 100 displays the specific configuration interface of Huawei Music.
如图6B所示,图6B示例性的示出了华为音乐的一种配置界面72,该配置界面72包括音频输出场景的配置,在图6B中,包括睡觉、开车、户外、室内等场景的配置选项。其中,当电子设备检测到针对于配置选项721的用户操作,电子设备进入睡觉场景的配置界面。对于不同的场景,电子设备100针对于华为音乐的音频输出的策略也不同。场景的种类或类型可以是电子设备100预置的。As shown in FIG. 6B, FIG. 6B exemplarily shows a configuration interface 72 of Huawei Music. The configuration interface 72 includes the configuration of audio output scenarios. In FIG. 6B, it includes scenarios such as sleeping, driving, outdoors, and indoors. Configuration options. Wherein, when the electronic device detects a user operation for the configuration option 721, the electronic device enters the configuration interface of the sleeping scene. For different scenarios, the electronic device 100 has different strategies for the audio output of Huawei Music. The kind or type of scene may be preset by the electronic device 100 .
在一些实施例中,场景的种类或类型可以是用户自定义的。如图6B所示,图标722提供了一种手动添加场景的功能。当电子设备100检测到针对于图标722的用户操作,响应于该用户操作,电子设备100显示场景类型的参数设定界面,用户可以对想要添加的场景类型的具体参数进行设定,例如用户想要添加一种运动场景,则设定的参数可以包括运动速度、运动加速度、运动路程等数据。在检测出的各参数均满足设定的数据范围的情况下,电子设备100可以判断当前的场景为该运动场景。In some embodiments, the kind or type of scene may be user-defined. As shown in FIG. 6B, icon 722 provides a function to manually add a scene. When the electronic device 100 detects a user operation on the icon 722, in response to the user operation, the electronic device 100 displays the parameter setting interface of the scene type, and the user can set the specific parameters of the scene type to be added, for example, the user If you want to add a motion scene, the set parameters can include motion speed, motion acceleration, motion distance and other data. When the detected parameters all meet the set data range, the electronic device 100 may determine that the current scene is the motion scene.
如图6C所示,图6C示例性的示出了一种睡觉场景的配置界面73,该配置界面73包括支持输出音频的设备的配置,在图6C中,包括蓝牙耳机、穿戴设备、家居设备、车载设备等设备类型,以及每个设备类型对应的设置控件。其中,控件731为蓝牙耳机对应的设置控件,控件731可以描述蓝牙耳机是否支持输出华为音乐的音频数据。如图6C所示,此时蓝牙耳机的开关状态这一行的图标731的圆圈在右边,表示蓝牙耳机支持输出华为音乐的音频数据;此时穿戴设备的开关状态这一行的图标732的圆圈在左边,表示穿戴设备不支持输出华为音乐的音频数据。As shown in FIG. 6C , FIG. 6C exemplarily shows a configuration interface 73 of a sleeping scene. The configuration interface 73 includes the configuration of a device that supports audio output. In FIG. 6C , it includes a Bluetooth headset, a wearable device, and a home device. , in-vehicle devices, and other device types, as well as setting controls for each device type. The control 731 is a setting control corresponding to the Bluetooth headset, and the control 731 can describe whether the Bluetooth headset supports outputting audio data of Huawei Music. As shown in FIG. 6C , the circle of the icon 731 in the row of the switch status of the Bluetooth headset is on the right, indicating that the Bluetooth headset supports outputting audio data of Huawei Music; at this time, the circle of the icon 732 in the row of the switch status of the wearable device is on the left , indicating that the wearable device does not support outputting audio data from Huawei Music.
上述实施例描述了用户针对华为音乐的配置过程,例如在睡觉场景下,可以配置为通过蓝牙耳机输出华为音乐的音频数据。在其他场景下(开车、户外、室内)可进行相应的配置,上述实施例同样适用于其他应用软件的配置过程。The above embodiment describes the configuration process of the user for Huawei Music. For example, in a sleeping scenario, it can be configured to output the audio data of Huawei Music through a Bluetooth headset. Corresponding configurations can be performed in other scenarios (driving, outdoors, indoors), and the above embodiments are also applicable to the configuration process of other application software.
可选的,不止是对于设备类型的设置,用户还可以对优先级进行设置,当用户选择两种或两种以上的设备类型时,用户可以对选择的设备类型进行优先级的设置,当电子设备100与两种或两种以上的设备类型建立了蓝牙连接,并且检测到两种或两种以上的设备类 型都支持输出音频数据,则根据优先级来确定唯一一个设备。Optionally, not only the device type setting, but also the user can set the priority. When the user selects two or more device types, the user can set the priority for the selected device type. If the device 100 establishes a Bluetooth connection with two or more device types, and detects that both or more than two device types support outputting audio data, the only one device is determined according to the priority.
举例来说,以上述表2为例,对于华为音乐这个应用软件来说,在开车的场景下,电子设备100支持车载设备和穿戴设备作为音频输出设备,当电子设备与车载设备和穿戴设备均建立了蓝牙连接,电子设备100根据优先级来确定唯一一个设备,由于在开车的场景下车载设备的优先级高于穿戴设备的优先级,则电子设备确定车载设备为音频输出设备。For example, taking the above Table 2 as an example, for the application software of Huawei Music, in the driving scenario, the electronic device 100 supports in-vehicle devices and wearable devices as audio output devices. After the Bluetooth connection is established, the electronic device 100 determines the only device according to the priority. Since the priority of the in-vehicle device is higher than that of the wearable device in the driving scenario, the electronic device determines that the in-vehicle device is an audio output device.
可选的,用户还可以对输出方式进行设置,针对设备类型、场景或应用,设置对应的输出方式,例如直接输出,或者接收到用户的确认指令再输出,等等。若输出方式为直接输出,当电子设备100确定了音频输出设备后,电子设备100调用该音频输出设备进行音频输出;若输出方式为接收到用户的确认指令再输出,当电子设备100确定了音频输出设备后,输出提示消息,提示用户是否确认调用该音频输出设备进行音频输出,当电子设备100检测到用户的确认指令,电子设备100调用该音频输出设备进行音频输出。Optionally, the user can also set the output mode, and set the corresponding output mode for the device type, scenario or application, such as direct output, or output after receiving a confirmation instruction from the user, and so on. If the output mode is direct output, after the electronic device 100 determines the audio output device, the electronic device 100 calls the audio output device for audio output; if the output mode is to output after receiving the user's confirmation instruction, when the electronic device 100 determines the audio output device After the device is output, a prompt message is output to prompt the user whether to confirm calling the audio output device for audio output. When the electronic device 100 detects the user's confirmation instruction, the electronic device 100 calls the audio output device for audio output.
上述通过电子设备100在用户界面上的显示,示例性的描述了场景信息、设备类型和应用软件之间的对应关系,下面结合上述的系统架构和用户界面,以蓝牙设备200中包括蓝牙设备1和蓝牙设备2为例,对本申请实施例涉及的动态音频推送方法进行详细说明。本申请实施例中,蓝牙设备1也可称为第一蓝牙设备,蓝牙设备2也可称为第二蓝牙设备。The above-mentioned display on the user interface of the electronic device 100 exemplarily describes the correspondence between scene information, device types and application software. Below, in conjunction with the above-mentioned system architecture and user interface, the Bluetooth device 200 includes the Bluetooth device 1 Taking the Bluetooth device 2 as an example, the dynamic audio push method involved in the embodiment of the present application will be described in detail. In this embodiment of the present application, the Bluetooth device 1 may also be referred to as a first Bluetooth device, and the Bluetooth device 2 may also be referred to as a second Bluetooth device.
如图7所示,图7示例性的示出了一种音频推送方法的流程示意图。As shown in FIG. 7 , FIG. 7 exemplarily shows a schematic flowchart of an audio push method.
步骤S101a:电子设备100和蓝牙设备1建立蓝牙连接。Step S101a: The electronic device 100 and the Bluetooth device 1 establish a Bluetooth connection.
当电子设备100与蓝牙设备1未配对时,在电子设备100打开蓝牙功能后,电子设备100可以向周围发送查询请求(inquiry request)。当蓝牙设备1进入查询扫描(inquiry scan)状态时,蓝牙设备1可以扫描到电子设备100发送的查询请求。在扫描到电子设备100的查询请求后,蓝牙设备1可以返回查询响应(inquiry response)给电子设备100。这时,电子设备100可以在蓝牙设备1界面上显示出蓝牙设备1的设备选项。当用户选择蓝牙设备1的设备选项后,电子设备100可以发送寻呼请求(page request)给蓝牙设备1。蓝牙设备1可以以固定的周期在一个固定的时间窗口内以某个跳频频率监听电子设备100的寻呼请求,在监听到电子设备100的寻呼请求后,蓝牙设备1可以在下一个时间槽发送从设备寻呼响应(salve page response)给电子设备100。电子设备100在接收到蓝牙设备1的从设备寻呼响应后,可以在下一个时间槽发送主设备寻呼响应(master page response)给蓝牙设备1。之后,蓝牙设备1和电子设备100便可以进入连接状态,建立起ACL链路连接,并完成配对。电子设备100与蓝牙设备1完成配对后,可以基于电子设备100与蓝牙设备1所支持的蓝牙能力,建立起用于传输数据的连接(例如,基于音/视频分发传输协议(audio/video distribution transport protocol,AVDTP)的连接、基于免提规格(Hands-freeProfile,HFP)的传输语音数据的连接)。When the electronic device 100 is not paired with the Bluetooth device 1, after the electronic device 100 turns on the Bluetooth function, the electronic device 100 may send an inquiry request to the surroundings. When the Bluetooth device 1 enters an inquiry scan (inquiry scan) state, the Bluetooth device 1 can scan the inquiry request sent by the electronic device 100 . After scanning the inquiry request of the electronic device 100 , the Bluetooth device 1 may return an inquiry response to the electronic device 100 . At this time, the electronic device 100 may display the device options of the Bluetooth device 1 on the interface of the Bluetooth device 1 . After the user selects the device option of the Bluetooth device 1 , the electronic device 100 may send a page request to the Bluetooth device 1 . The Bluetooth device 1 can monitor the paging request of the electronic device 100 at a certain frequency hopping frequency in a fixed period and within a fixed time window. Send a slave page response to the electronic device 100. After receiving the slave device paging response from the Bluetooth device 1, the electronic device 100 may send a master page response (master page response) to the Bluetooth device 1 in the next time slot. After that, the Bluetooth device 1 and the electronic device 100 can enter the connection state, establish the ACL link connection, and complete the pairing. After the electronic device 100 is paired with the Bluetooth device 1, a connection for data transmission can be established based on the Bluetooth capabilities supported by the electronic device 100 and the Bluetooth device 1 (for example, based on the audio/video distribution transport protocol (audio/video distribution transport protocol). , AVDTP) connection, based on Hands-free Profile (Hands-freeProfile, HFP) connection for transmitting voice data).
其中,电子设备100与蓝牙设备1之间的配对可以是链路管理协议(link manger protocol,LMP)配对,也可以是安全简单(secure simple pairing,SSP)配对,还可以是其他非标准配对方法。电子设备100与蓝牙设备1之间配对完成后,可以创建出共享秘钥:链路秘钥(link key)。该链路秘钥(link key)可用于彼此认证设备并加密交换的数据。The pairing between the electronic device 100 and the Bluetooth device 1 may be link management protocol (link manger protocol, LMP) pairing, secure simple pairing (SSP) pairing, or other non-standard pairing methods . After the pairing between the electronic device 100 and the Bluetooth device 1 is completed, a shared secret key: a link key (link key) can be created. This link key can be used to authenticate devices to each other and encrypt the data exchanged.
当电子设备100与蓝牙设备1已配对过时,电子设备100与蓝牙设备1都保存有双方 共享的链路秘钥(link key)或者MAC地址等信息。在电子设备100打开蓝牙功能,且蓝牙设备1开机时,蓝牙设备1可以主动发送寻呼请求给电子设备100。电子设备100可以以固定的周期在一个固定的时间窗口内以某个跳频频率监听蓝牙设备1的寻呼请求,在监听到蓝牙设备1的寻呼请求后,电子设备100可以在下一个时间槽发送从设备寻呼响应(salve page response)给蓝牙设备1。蓝牙设备1在接收到电子设备100的从设备寻呼响应后,可以在下一个时间槽发送主设备寻呼响应(master page response)给电子设备100。之后,电子设备100与蓝牙设备1便可以进入连接状态,建立起ACL链路连接,并完成链路秘钥的认证。电子设备100与蓝牙设备1完成认证后,可以基于电子设备100与蓝牙设备1所支持的蓝牙能力,建立起用于传输音频数据的连接(例如,基于音/视频分发传输协议(audio/video distribution transport protocol,AVDTP)的连接、基于免提规格(Hands-freeProfile,HFP)的连接)。When the electronic device 100 and the Bluetooth device 1 have been paired, the electronic device 100 and the Bluetooth device 1 both store information such as a link key or a MAC address shared by both parties. When the electronic device 100 turns on the Bluetooth function and the Bluetooth device 1 is powered on, the Bluetooth device 1 can actively send a paging request to the electronic device 100 . The electronic device 100 can monitor the paging request of the Bluetooth device 1 at a certain frequency hopping frequency in a fixed period and within a fixed time window. Send the slave page response (salve page response) to Bluetooth device 1. After receiving the slave device paging response from the electronic device 100, the Bluetooth device 1 may send a master device paging response (master page response) to the electronic device 100 in the next time slot. After that, the electronic device 100 and the Bluetooth device 1 can enter the connection state, establish the ACL link connection, and complete the authentication of the link key. After the electronic device 100 and the Bluetooth device 1 are authenticated, a connection for transmitting audio data can be established based on the Bluetooth capabilities supported by the electronic device 100 and the Bluetooth device 1 (for example, based on the audio/video distribution transport protocol (audio/video distribution transport). protocol, AVDTP) connection, Hands-free Profile (Hands-freeProfile, HFP)-based connection).
其中,蓝牙连接是本申请示例性的一种通信方式,电子设备100和蓝牙设备1的连接方式还可以是WiFi直连、射频识别(RFID)等其他短距离通信。The Bluetooth connection is an exemplary communication method in the present application, and the connection method between the electronic device 100 and the Bluetooth device 1 may also be WiFi direct connection, radio frequency identification (RFID) and other short-distance communication.
步骤S101b:电子设备100和蓝牙设备2建立蓝牙连接。可参考上述步骤S101a中电子设备100和蓝牙设备1建立蓝牙连接的相关描述。Step S101b: The electronic device 100 and the Bluetooth device 2 establish a Bluetooth connection. Reference may be made to the relevant description of establishing a Bluetooth connection between the electronic device 100 and the Bluetooth device 1 in the above step S101a.
步骤S102:电子设备100获取蓝牙设备1和蓝牙设备2的设备信息。Step S102 : the electronic device 100 acquires the device information of the Bluetooth device 1 and the Bluetooth device 2 .
电子设备100和蓝牙设备1建立蓝牙连接后,电子设备100获取蓝牙设备1的设备信息,设备信息包括设备标识(例如设备的名称和/或设备的MAC地址)、设备属性(例如设备的音频能力、设备的交互能力等)、设备类型(例如穿戴设备、车载设备、家居设备、蓝牙耳机等)、设备的当前状态(例如设备开启或关闭、熄屏或亮屏、设备是否佩戴在用户身上等)、设备的连接时间等。After the electronic device 100 and the Bluetooth device 1 establish a Bluetooth connection, the electronic device 100 obtains the device information of the Bluetooth device 1. The device information includes device identification (such as the name of the device and/or the MAC address of the device), device attributes (such as the audio capability of the device) , the interaction capability of the device, etc.), the type of the device (such as wearable devices, car devices, home devices, Bluetooth headsets, etc.), the current state of the device (such as the device is turned on or off, the screen is off or on, whether the device is worn on the user, etc. ), the connection time of the device, etc.
电子设备100包括设备信息管理模块,设备信息管理模块中存储了与电子设备100具有蓝牙连接关系,且支持音频输出的设备以及设备信息。当电子设备100与蓝牙设备1建立了蓝牙连接,电子设备100获取该蓝牙设备1的设备信息,更新设备信息管理模块中的信息。The electronic device 100 includes a device information management module, and the device information management module stores devices and device information that have a Bluetooth connection relationship with the electronic device 100 and support audio output. When the electronic device 100 establishes a Bluetooth connection with the Bluetooth device 1, the electronic device 100 acquires the device information of the Bluetooth device 1, and updates the information in the device information management module.
可选的,在一些实施例中,若电子设备100和蓝牙设备1为首次连接,则电子设备100向蓝牙设备1发送请求消息,以获取设备信息,电子设备100的设备管理模块中增加该蓝牙设备1的设备信息;可选的,在一些实施例中,若电子设备100和蓝牙设备1为非首次连接,电子设备100存储有该蓝牙设备1的设备信息,电子设备100可以根据蓝牙设备1的设备标识查找该蓝牙设备1的设备信息,从而获取蓝牙设备1的设备信息,电子设备100的设备管理模块中更新该蓝牙设备1的设备信息,例如将蓝牙设备1的当前状态更新为已连接状态。Optionally, in some embodiments, if the electronic device 100 and the Bluetooth device 1 are connected for the first time, the electronic device 100 sends a request message to the Bluetooth device 1 to obtain device information, and the Bluetooth device is added to the device management module of the electronic device 100. Device information of device 1; optionally, in some embodiments, if the electronic device 100 and the Bluetooth device 1 are not connected for the first time, the electronic device 100 stores the device information of the Bluetooth device 1, and the electronic device 100 can Find the device information of the Bluetooth device 1 to obtain the device information of the Bluetooth device 1, and update the device information of the Bluetooth device 1 in the device management module of the electronic device 100, for example, update the current state of the Bluetooth device 1 to connected condition.
上述为电子设备100获取蓝牙设备1的设备信息的相关描述,可以理解的,电子设备100获取蓝牙设备2的设备信息同理。The above is a related description of the electronic device 100 acquiring the device information of the Bluetooth device 1 . It can be understood that the same is true for the electronic device 100 acquiring the device information of the Bluetooth device 2 .
步骤S103:电子设备100检测到第一应用需要输出音频数据。Step S103: The electronic device 100 detects that the first application needs to output audio data.
第一应用可以是第三方应用程序,例如即时通信APP、网上购物APP、音乐APP、游戏APP等;也可以是系统应用程序,例如来电、短信、闹钟等。第一应用在运行过程中,可能会需要调用音频设备。例如:在即时通信APP运行过程中,可能会调用扬声器播放设 备播放接收到的语音消息;在音乐类APP运行过程中,可能会调用扬声器播放设备播放音频文件;在有来电呼入时,可能会调用扬声器播放设备播放来电铃声;等等。The first application may be a third-party application, such as an instant messaging APP, an online shopping APP, a music APP, a game APP, etc.; it may also be a system application, such as an incoming call, a short message, an alarm clock, and the like. During the running process of the first application, the audio device may need to be called. For example: during the running of the instant messaging APP, the speaker playback device may be called to play the received voice messages; during the running of the music APP, the speaker playback device may be called to play the audio file; when there is an incoming call, it may be called Invoke the speaker playback device to play the ringtone for incoming calls; and so on.
可选的,在一些实施例中,在第一应用的运行过程中,当电子设备100检测到第一应用启动音频策略服务(Audio Policy Service)时,电子设备100可以确定该第一应用需要输出音频数据。在本申请实施例中,电子设备100检测到第一应用需要输出音频数据,可以称为电子设备100检测到第一应用的第一播放指令。例如第一应用的第一播放指令可以为第一应用启动音频策略服务。Optionally, in some embodiments, during the running process of the first application, when the electronic device 100 detects that the first application starts an audio policy service (Audio Policy Service), the electronic device 100 may determine that the first application needs to output audio data. In this embodiment of the present application, the electronic device 100 detects that the first application needs to output audio data, which may be referred to as the electronic device 100 detecting the first play instruction of the first application. For example, the first play instruction of the first application may start an audio policy service for the first application.
步骤S104:电子设备100检测到当前的场景信息为第一场景。Step S104: The electronic device 100 detects that the current scene information is the first scene.
电子设备100确定当前的场景信息,即电子设备100检测到电子设备100当前所处的场景为第一场景。场景信息指示了使用电子设备100的用户当前所处的场景,例如可以是车里、家里、图书馆、室外等。进一步的,场景信息还可以指示使用电子设备100的用户当前的所处的场景以及状态,例如开车、在家睡觉、图书馆看书、健身房运动等。The electronic device 100 determines the current scene information, that is, the scene in which the electronic device 100 detects that the electronic device 100 is currently located is the first scene. The scene information indicates the scene where the user using the electronic device 100 is currently located, for example, it may be in a car, at home, in a library, outdoors, and so on. Further, the scene information may also indicate the current scene and state of the user using the electronic device 100, such as driving, sleeping at home, reading in the library, exercising in the gym, and the like.
下面介绍几种确定当前的场景信息的方式。The following introduces several ways to determine the current scene information.
方式一,电子设备100通过蓝牙连接的设备信息等,确定场景信息。In a first manner, the electronic device 100 determines the scene information through device information connected by Bluetooth and the like.
举例来说,电子设备100连接的蓝牙设备1名称中有“Car”关键字时,则电子设备100判断当前的场景为开车;或者电子设备100连接的蓝牙设备1的设备类型包括车载设备,则电子设备100判断当前的场景为开车。当电子设备100连接的蓝牙设备1的设备信息包括家居设备,则电子设备100判断当前的场景为室内或家里。For example, when the name of the Bluetooth device 1 connected to the electronic device 100 has the "Car" keyword, the electronic device 100 determines that the current scene is driving; or the device type of the Bluetooth device 1 connected to the electronic device 100 includes a vehicle-mounted device, then The electronic device 100 determines that the current scene is driving. When the device information of the Bluetooth device 1 connected to the electronic device 100 includes a home device, the electronic device 100 determines that the current scene is indoor or home.
方式二,电子设备100通过电子设备100的状态信息,确定场景信息。In a second manner, the electronic device 100 determines the scene information through the state information of the electronic device 100 .
例如电子设备检测到启动了智慧生活App,并且启动了台灯,并且当前的蓝牙连接设备包括家居设备,则当前场景为在家阅读。例如电子设备检测出当前正在快速移动,并且当前的蓝牙连接设备包括车载设备,则当前场景为开车。For example, the electronic device detects that the Smart Life App is activated, and the desk lamp is activated, and the current Bluetooth-connected devices include home devices, and the current scene is reading at home. For example, the electronic device detects that it is currently moving rapidly, and the current Bluetooth-connected device includes a vehicle-mounted device, and the current scene is driving.
方式三,通过摄像头采集的图像确定场景信息。In a third method, the scene information is determined by using the image collected by the camera.
电子设备100开启摄像头,电子设备100的显示界面可以不显示摄像头采集的图像。电子设备100对摄像头采集的图像进行图像识别,确定出当前的场景。When the electronic device 100 turns on the camera, the display interface of the electronic device 100 may not display the image captured by the camera. The electronic device 100 performs image recognition on the image captured by the camera to determine the current scene.
方式四,通过GPS信息获取电子设备100的位置信息,从而确定场景信息。In a fourth manner, the location information of the electronic device 100 is acquired through GPS information, so as to determine the scene information.
例如当电子设备100通过GPS定位确定当前的位置为图书馆,且检测到环境噪声低于阈值,则电子设备100判断当前的场景为图书馆内。For example, when the electronic device 100 determines that the current location is a library through GPS positioning, and detects that the ambient noise is lower than the threshold, the electronic device 100 determines that the current scene is in the library.
方式五,电子设备100结合穿戴设备检测出的传感器信息/运动信息,确定场景信息。In a fifth manner, the electronic device 100 determines scene information in combination with sensor information/motion information detected by the wearable device.
电子设备100检测到与穿戴设备建立了连接,电子设备100从穿戴设备获取当前的运动信息,从而判断出场景信息。例如运动手表基本都包含了跑步、骑行、健走、游泳等运动模式,从日常运动到铁人三项全覆盖,可满足各层次运动爱好者需求。其中,运动模式还可以包括睡眠、静坐等模式。The electronic device 100 detects that a connection is established with the wearable device, and the electronic device 100 obtains current motion information from the wearable device, thereby judging the scene information. For example, sports watches basically include running, cycling, walking, swimming and other sports modes, covering everything from daily sports to triathlons, which can meet the needs of sports enthusiasts at all levels. Wherein, the exercise mode may also include modes such as sleep and sitting.
例如,当前运动模式的为椭圆机、室内跑步、室内单车、划船机等,并且当前位置在健身房,则当前场景为健身房运动;如果当前运动模式为室外跑步、户外步行、户外骑行、游泳、登山、越野、铁人三项等,则当前场景为户外运动;当穿戴设备检测到用户为睡眠模式时,则当前场景为睡觉。For example, if the current exercise mode is elliptical machine, indoor running, indoor cycling, rowing machine, etc., and the current location is in the gym, the current scene is gym exercise; if the current exercise mode is outdoor running, outdoor walking, outdoor cycling, swimming, Mountaineering, cross-country, triathlon, etc., the current scene is outdoor sports; when the wearable device detects that the user is in sleep mode, the current scene is sleep.
具体的,电子设备100向穿戴设备发送请求消息,响应于该请求消息,穿戴设备向电 子设备发送当前的运动信息。可选的,穿戴设备周期性向电子设备提供用户的运动信息。Specifically, the electronic device 100 sends a request message to the wearable device, and in response to the request message, the wearable device sends the current exercise information to the electronic device. Optionally, the wearable device periodically provides the user's movement information to the electronic device.
其中,上述的五种方式只是示例性的几种方式,电子设备100可以选择所列举的五种方式中的任意一种,或者电子设备100还可以自由结合上述所列举的五种方式中的至少两种,对场景信息进行综合判断,提高场景信息的准确性。可选的,不限于上述五种方式,本申请还可以使用其他方式获取场景信息,本申请不作限制。Wherein, the above five ways are only exemplary ways, and the electronic device 100 can choose any one of the five ways listed, or the electronic device 100 can also freely combine at least one of the five ways listed above. Two, comprehensively judge the scene information to improve the accuracy of the scene information. Optionally, it is not limited to the above five methods, and the present application may also use other methods to obtain scene information, which is not limited in this application.
步骤S105:根据该第一场景,电子设备100在已连接的蓝牙设备中确定支持输出第一应用的音频数据的音频输出设备为蓝牙设备1。Step S105 : According to the first scenario, the electronic device 100 determines, among the connected Bluetooth devices, that the audio output device that supports outputting the audio data of the first application is the Bluetooth device 1 .
电子设备存储有应用软件、场景信息和设备类型之间的对应关系,当电子设备确定当前的场景信息为第一场景后,在已连接的蓝牙设备中确定出输出第一应用的音频数据的音频输出设备为蓝牙设备1。其中,第一应用、第一场景和第一设备类型对应,蓝牙设备1的设备类型为第一设备类型。The electronic device stores the correspondence between application software, scene information and device types. After the electronic device determines that the current scene information is the first scene, it determines the audio output of the audio data of the first application in the connected Bluetooth device. The output device is Bluetooth device 1. The first application, the first scenario and the first device type correspond, and the device type of the Bluetooth device 1 is the first device type.
举例来说,第一应用为华为音乐,蓝牙设备1为车载设备。如上述表2所示,在“开车”的场景下,支持华为音乐的音频输出的设备类型为车载设备和穿戴设备;则若当前的场景为开车,则音频输出设备为蓝牙设备1。又举例来说,第一应用为华为音乐,蓝牙设备1为蓝牙耳机。在“睡觉”的场景下,支持华为音乐的音频输出的设备类型为蓝牙耳机;则若当前的场景为睡觉,则音频输出设备为蓝牙设备1。For example, the first application is Huawei Music, and the Bluetooth device 1 is an in-vehicle device. As shown in Table 2 above, in the "driving" scenario, the device types that support the audio output of Huawei Music are vehicle-mounted devices and wearable devices; if the current scenario is driving, the audio output device is Bluetooth device 1. For another example, the first application is Huawei Music, and the Bluetooth device 1 is a Bluetooth headset. In the "sleep" scenario, the device type that supports the audio output of Huawei Music is a Bluetooth headset; if the current scenario is sleeping, the audio output device is Bluetooth device 1.
电子设备100在已连接的蓝牙设备中,确定支持该第一应用的音频输出的音频输出设备。也即是说,音频输出设备为与电子设备100建立了蓝牙连接的设备,并且为支持第一应用的音频输出的设备。The electronic device 100 determines an audio output device that supports audio output of the first application among the connected Bluetooth devices. That is to say, the audio output device is a device that has established a Bluetooth connection with the electronic device 100 and is a device that supports audio output of the first application.
在一些实施例中,若在同一个场景下,一个应用支持两种或两种以上设备类型的蓝牙设备输出音频数据,并且该两种或两种以上设备类型的蓝牙设备均和电子设备100建立了连接,电子设备100可以通过优先级信息确定出唯一一个输出音频数据的音频输出设备。举例来说,如上述表2所示,在“开车”的场景下,支持华为音乐的音频输出的设备类型为车载设备和穿戴设备,其中车载设备的优先级高于穿戴设备的优先级,在车载设备和穿戴设备同时与电子设备100建立了连接的情况下,电子设备100在开车的场景下,选择车载设备输出华为音乐的音频数据。在该实施例中,车载设备为第一蓝牙设备,车载设备的设备类型可以称为第一设备类型,穿戴设备为第四蓝牙设备,穿戴设备的设备类型可以称为第四设备类型。In some embodiments, if in the same scenario, an application supports two or more device types of Bluetooth devices to output audio data, and the two or more device types of Bluetooth devices are established with the electronic device 100 For connection, the electronic device 100 can determine the only audio output device that outputs audio data through the priority information. For example, as shown in Table 2 above, in the "driving" scenario, the types of devices that support the audio output of Huawei Music are in-vehicle devices and wearable devices. The priority of in-vehicle devices is higher than that of wearable devices. When the in-vehicle device and the wearable device are connected to the electronic device 100 at the same time, the electronic device 100 selects the in-vehicle device to output the audio data of Huawei Music in the driving scenario. In this embodiment, the in-vehicle device is the first Bluetooth device, the device type of the in-vehicle device may be referred to as the first device type, the wearable device is the fourth Bluetooth device, and the device type of the wearable device may be referred to as the fourth device type.
可选的,可以根据与电子设备100的物理距离的远近判断出唯一一个输出音频数据的音频输出设备。电子设备100优先选择与电子设备100的物理距离更近的设备作为音频输出设备;可选的,可以根据历史推送次数判断出唯一一个输出音频数据的音频输出设备,电子设备100优先选择历史推送次数更多的设备作为音频输出设备;可选的,电子设备100可以任意选择一个设备作为音频输出设备。Optionally, the only audio output device that outputs audio data may be determined according to the physical distance from the electronic device 100 . The electronic device 100 preferentially selects a device with a closer physical distance to the electronic device 100 as the audio output device; optionally, the only audio output device that outputs audio data can be determined according to the number of historical pushes, and the electronic device 100 preferentially selects the number of historical pushes More devices are used as audio output devices; optionally, the electronic device 100 can arbitrarily select one device as the audio output device.
可选的,若在已连接的蓝牙设备中没有支持输出第一应用的音频数据的设备类型,则电子设备100直接输出该应用的音频数据。Optionally, if there is no device type that supports outputting the audio data of the first application in the connected Bluetooth device, the electronic device 100 directly outputs the audio data of the application.
步骤S106:发送第一指令和第一应用的音频数据。Step S106: Send the first instruction and the audio data of the first application.
电子设备100确定出音频输出设备为蓝牙设备1,则电子设备100向蓝牙设备1发送第一指令和第一应用的音频数据,该第一指令用于指示蓝牙设备1输出该音频数据。When the electronic device 100 determines that the audio output device is the Bluetooth device 1, the electronic device 100 sends a first instruction and audio data of the first application to the Bluetooth device 1, where the first instruction is used to instruct the Bluetooth device 1 to output the audio data.
步骤S107:蓝牙设备1播放第一应用的音频数据。Step S107: The Bluetooth device 1 plays the audio data of the first application.
蓝牙设备1基于该第一指令,播放该第一应用的音频数据。Based on the first instruction, the Bluetooth device 1 plays the audio data of the first application.
在一些实施例中,电子设备100确定了音频输出设备为蓝牙设备1后,电子设备100记录蓝牙设备1在第一场景下,对于第一应用的历史推送次数加一。In some embodiments, after the electronic device 100 determines that the audio output device is the Bluetooth device 1, the electronic device 100 records that the number of historical pushes of the first application by the Bluetooth device 1 in the first scenario is increased by one.
步骤S108:电子设备100检测到当前的场景信息为第二场景。Step S108: The electronic device 100 detects that the current scene information is the second scene.
在一些实施例中,电子设备100周期性检测当前的场景信息。电子设备100在步骤S104的下一个时刻检测到当前的场景信息为第二场景。In some embodiments, the electronic device 100 periodically detects the current scene information. The electronic device 100 detects that the current scene information is the second scene at the next moment in step S104.
其中,电子设备100检测当前的场景信息的方式可以参考上述步骤S104中检测当前的场景信息的方式的相关描述,此处不再赘述。The manner of detecting the current scene information by the electronic device 100 may refer to the relevant description of the manner of detecting the current scene information in the foregoing step S104 , which will not be repeated here.
步骤S109:电子设备100根据该第二场景,电子设备100在已连接的蓝牙设备中确定支持输出第一应用的音频数据的音频输出设备为蓝牙设备2。Step S109 : According to the second scenario, the electronic device 100 determines, among the connected Bluetooth devices, that the audio output device that supports outputting the audio data of the first application is the Bluetooth device 2 .
电子设备100存储有应用软件、场景信息和设备类型之间的对应关系,当电子设备100确定当前的场景信息为第二场景后,确定出输出第一应用的音频数据的音频输出设备为蓝牙设备2。其中,第一应用、第二场景和第二设备类型对应,蓝牙设备2的设备类型为第二设备类型。The electronic device 100 stores the correspondence between application software, scene information and device types. After the electronic device 100 determines that the current scene information is the second scene, it determines that the audio output device that outputs the audio data of the first application is a Bluetooth device. 2. The first application, the second scenario and the second device type correspond, and the device type of the Bluetooth device 2 is the second device type.
步骤S110:发送第二指令和第二应用的音频数据。Step S110: Send the second instruction and the audio data of the second application.
电子设备100确定出音频输出设备为蓝牙设备2,则电子设备向蓝牙设备2发送第二指令和第一应用的音频数据,该第二指令用于指示蓝牙设备2输出该音频数据。When the electronic device 100 determines that the audio output device is the Bluetooth device 2, the electronic device sends a second command and the audio data of the first application to the Bluetooth device 2, where the second command is used to instruct the Bluetooth device 2 to output the audio data.
步骤S111:蓝牙设备2播放第一应用的音频数据。Step S111: The Bluetooth device 2 plays the audio data of the first application.
蓝牙设备2基于该第二指令,播放该第一应用的音频数据。Based on the second instruction, the Bluetooth device 2 plays the audio data of the first application.
在一些实施例中,电子设备100确定了音频输出设备为蓝牙设备2后,电子设备100记录蓝牙设备2在第二场景下,对于第一应用的历史推送次数加一。In some embodiments, after the electronic device 100 determines that the audio output device is the Bluetooth device 2, the electronic device 100 records that the number of historical pushes of the first application by the Bluetooth device 2 in the second scenario is increased by one.
上述实施例提供的音频推送方法,电子设备与蓝牙设备1、蓝牙设备2建立连接。在应用软件运行时,电子设备100持续检测应用软件是否需要调用音频设备,当电子设备100检测到第一应用的音频数据,电子设备100确定当前场景信息为第一场景,电子设备100根据存储的应用软件、场景信息与设备类型的对应关系,确定在第一场景下,蓝牙设备1输出第一应用的音频数据;当电子设备100检测到当前的场景信息变为第二场景,电子设备100根据存储的应用软件、场景信息与设备类型的对应关系,确定在第二场景下,蓝牙设备2输出第一应用的音频数据。本申请实施例,在不同的场景下,同一个应用的音频数据,可以调用不同的设备输出。举例来说,当用户在家里,用户的智能手机与蓝牙耳机建立了蓝牙连接,当用户使用音乐软件(第一应用)播放音乐时,智能手机检测到当前的场景为家里(第一场景),根据对应关系,蓝牙耳机播放音乐;当用户戴着蓝牙耳机从家里出来,进入到车内,用户的智能手机与车载设备建立了连接,并且智能手机检测到当前的场景为车内(第二场景),则智能手机调用车载设备播放音乐,蓝牙耳机不再播放音乐。无需用户手动调节,提升用户体验。In the audio push method provided by the above embodiment, the electronic device establishes a connection with the Bluetooth device 1 and the Bluetooth device 2 . When the application software is running, the electronic device 100 continuously detects whether the application software needs to call the audio device. When the electronic device 100 detects the audio data of the first application, the electronic device 100 determines that the current scene information is the first scene. The corresponding relationship between application software, scene information and device type, it is determined that in the first scene, the Bluetooth device 1 outputs the audio data of the first application; when the electronic device 100 detects that the current scene information becomes the second scene, the electronic device 100 according to The stored correspondence between the application software, the scene information and the device type determines that in the second scene, the Bluetooth device 2 outputs the audio data of the first application. In this embodiment of the present application, in different scenarios, the audio data of the same application can be output by calling different devices. For example, when the user is at home, the user's smartphone establishes a Bluetooth connection with the Bluetooth headset, and when the user uses the music software (the first application) to play music, the smartphone detects that the current scene is home (the first scene), According to the corresponding relationship, the Bluetooth headset plays music; when the user comes out of the home wearing the Bluetooth headset and enters the car, the user's smartphone establishes a connection with the in-vehicle device, and the smartphone detects that the current scene is in the car (the second scene ), the smartphone calls the car device to play music, and the Bluetooth headset no longer plays music. There is no need for manual adjustment by the user, which improves the user experience.
可选的,在一些实施例中,在T1时刻,当电子设备100检测到第一应用的音频数据,电子设备100确定当前场景信息为第一场景,电子设备100根据存储的应用软件、场景信息与设备类型的对应关系,确定在第一场景下,第一蓝牙设备输出第一应用的音频数据; 在T2时刻,当电子设备100检测到第二应用的音频数据,电子设备100根据存储的应用软件、场景信息与设备类型的对应关系,确定在该第一场景下,第三蓝牙设备输出第二应用的音频数据。本申请实施例,在同一场景下,不同应用的音频数据,可以调用不同的设备输出。举例来说,当用户坐在车上,第一蓝牙设备为车载设备,第三蓝牙设备为蓝牙耳机,用户的智能手机与车载设备、蓝牙耳机均建立了蓝牙连接;当用户使用音乐软件(第一应用)播放音乐时,智能手机检测到当前的场景为车内(第一场景),根据对应关系,智能手机调用车载设备播放音乐,当有来电(第二应用)时,蓝牙耳机优先输出来电铃声;而车载设备不会输出来电铃声,避免车上的所有人都听到了来电铃声的情况,提升用户体验。Optionally, in some embodiments, at time T1, when the electronic device 100 detects the audio data of the first application, the electronic device 100 determines that the current scene information is the first scene, and the electronic device 100 determines the current scene information as the first scene according to the stored application software and scene information. The corresponding relationship with the device type, it is determined that in the first scenario, the first Bluetooth device outputs the audio data of the first application; at time T2, when the electronic device 100 detects the audio data of the second application, the electronic device 100 according to the stored application The correspondence between the software, the scene information and the device type determines that in the first scene, the third Bluetooth device outputs the audio data of the second application. In this embodiment of the present application, in the same scenario, audio data of different applications can be output by calling different devices. For example, when the user is sitting in the car, the first Bluetooth device is the in-vehicle device, the third Bluetooth device is the Bluetooth headset, and the user's smartphone establishes a Bluetooth connection with the in-vehicle device and the Bluetooth headset; when the user uses the music software (No. 1 application) when playing music, the smartphone detects that the current scene is in the car (the first scene), according to the corresponding relationship, the smartphone calls the vehicle device to play music, and when there is an incoming call (the second application), the Bluetooth headset gives priority to the incoming call The in-vehicle device will not output the ringtone to avoid the situation where everyone in the car hears the ringtone and improve the user experience.
结合上述实施例,可选的,在一些实施例中,电子设备100中还可以存储有环境信息、用户状态信息、以及输出音量的对应关系。如前述表3示例性示出了环境信息、用户状态信息、以及输出音量的对应关系。In combination with the foregoing embodiments, optionally, in some embodiments, the electronic device 100 may further store the corresponding relationship between environmental information, user status information, and output volume. The foregoing Table 3 exemplarily shows the correspondence between the environment information, the user state information, and the output volume.
则在步骤S104(步骤S109)中还包括,确定当前的环境信息或用户状态信息。Then, step S104 (step S109 ) further includes determining the current environment information or user status information.
环境信息包括噪音、天气、温度等信息。其中,电子设备100可以通过调用麦克录音设备实现对环境声音的采集,并检测采集到的环境声音的分贝大小,噪音的大小即为环境声音的分贝大小。天气、温度等信息可以通过网络获取,或者通过电子设备100中的环境传感器获取。Environmental information includes noise, weather, temperature and other information. The electronic device 100 can collect ambient sound by invoking the microphone recording device, and detect the decibel size of the collected ambient sound, and the size of the noise is the decibel size of the ambient sound. Information such as weather and temperature may be acquired through a network, or acquired through an environmental sensor in the electronic device 100 .
用户状态信息包括用户的压力指数、情绪指数等信息。若与电子设备100连接的蓝牙设备中包括穿戴设备,则电子设备100向穿戴设备请求获取用户状态信息。穿戴设备可以通过生物传感器(例如皮电传感器、体温传感器等)获取用户的压力指数、情绪指数等。穿戴设备基于获取到电子设备100的请求消息,向电子设备100发送用户状态信息;或者,穿戴设备持续或周期性向电子设备100提供用户状态信息。The user state information includes information such as the user's stress index and mood index. If the Bluetooth device connected to the electronic device 100 includes a wearable device, the electronic device 100 requests the wearable device to acquire user status information. The wearable device can obtain the user's stress index, emotional index, etc. through biosensors (eg, electrodermal sensors, body temperature sensors, etc.). The wearable device sends the user state information to the electronic device 100 based on the request message obtained from the electronic device 100; or, the wearable device continuously or periodically provides the user state information to the electronic device 100.
电子设备100获取到当前的环境信息和/或用户状态信息,基于环境信息、用户状态信息、以及输出音量的对应关系,确定第一应用(第二应用)的音频数据在蓝牙设备1(蓝牙设备2)上的输出音量。The electronic device 100 obtains the current environment information and/or user state information, and determines that the audio data of the first application (the second application) is in the Bluetooth device 1 (Bluetooth device 1 (Bluetooth device) based on the correspondence between the environment information, the user state information, and the output volume. 2) on the output volume.
相应的,步骤S106中电子设备100向蓝牙设备1发送第一指令和第一应用的音频数据,电子设备100向蓝牙设备1还发送输出音量;该第一指令用于指示蓝牙设备1以该输出音量输出第一应用的音频数据。本申请实施例中,输出音量也可称为第一音量。Correspondingly, in step S106, the electronic device 100 sends the first command and the audio data of the first application to the Bluetooth device 1, and the electronic device 100 also sends the output volume to the Bluetooth device 1; the first command is used to instruct the Bluetooth device 1 to use the output volume. The volume outputs audio data of the first application. In this embodiment of the present application, the output volume may also be referred to as the first volume.
同理,步骤S111中电子设备100向蓝牙设备2发送第二指令和第一应用的音频数据,还电子设备100向蓝牙设备2还发送输出音量;该第二指令用于指示蓝牙设备2以该输出音量输出第一应用的音频数据。Similarly, in step S111, the electronic device 100 sends the second command and the audio data of the first application to the Bluetooth device 2, and the electronic device 100 also sends the output volume to the Bluetooth device 2; the second command is used to instruct the Bluetooth device 2 to use this The output volume outputs audio data of the first application.
在一些实施例中,电子设备100还可以基于用户的导航/轨迹信息,确定音频输出时长。当用户在开车时,电子设备100获取当前的导航/轨迹信息的开始时间和预计结束时间,确定输出音频的时间或时长。相应的,步骤S106中电子设备100向蓝牙设备1发送第一指令和第一应用的音频数据,电子设备100向蓝牙设备1还发送输出的时间或时长;该第一指令用于指示蓝牙设备1以该输出的时间或时长输出第一应用的音频数据。In some embodiments, the electronic device 100 may also determine the audio output duration based on the user's navigation/track information. When the user is driving, the electronic device 100 obtains the start time and the expected end time of the current navigation/track information, and determines the time or duration of the audio output. Correspondingly, in step S106, the electronic device 100 sends the first command and the audio data of the first application to the Bluetooth device 1, and the electronic device 100 also sends the output time or duration to the Bluetooth device 1; the first command is used to indicate the Bluetooth device 1. The audio data of the first application is output at the output time or duration.
同理,步骤S111中电子设备100向蓝牙设备2发送第二指令和第一应用的音频数据,电子设备100向蓝牙设备1还发送输出的时间或时长;该第二指令用于指示蓝牙设备2以 该输出的时间或时长输出第二应用的音频数据。Similarly, in step S111, the electronic device 100 sends the second command and the audio data of the first application to the Bluetooth device 2, and the electronic device 100 also sends the output time or duration to the Bluetooth device 1; the second command is used to instruct the Bluetooth device 2 The audio data of the second application is output at the output time or duration.
本申请实施例提及的用户操作包括但不限于点击、双击、长按、滑动、悬浮手势、语音指令等操作。The user operations mentioned in the embodiments of the present application include, but are not limited to, operations such as clicking, double-clicking, long-pressing, sliding, hovering gestures, and voice commands.
下面介绍本申请实施例中提供的一种蓝牙通信系统的示意框架图。The following introduces a schematic frame diagram of a Bluetooth communication system provided in the embodiments of the present application.
如图8所示,该蓝牙通信系统1000可以包括电子设备100和蓝牙设备200。其中,该电子设备100可以包括但不限于有处理器1010、存储器1020、蓝牙芯片1030。其中,处理器1010可以运行有应用模块1011和音频输出服务模块1012。该存储器1020中存储有应用模块1011的音频数据。该蓝牙设备200可以包括但不限于有蓝牙芯片1040、数字信号处理器(digital signal processor,DSP)1050和扬声器1060。其中:As shown in FIG. 8 , the Bluetooth communication system 1000 may include an electronic device 100 and a Bluetooth device 200 . The electronic device 100 may include, but is not limited to, a processor 1010 , a memory 1020 , and a Bluetooth chip 1030 . The processor 1010 may run an application module 1011 and an audio output service module 1012 . The memory 1020 stores audio data of the application module 1011 . The Bluetooth device 200 may include, but is not limited to, a Bluetooth chip 1040 , a digital signal processor (DSP) 1050 and a speaker 1060 . in:
1、处理器1010在运行应用模块1011时,若接收到对音频数据的播放指令时,应用模块1011可以发送开始播放指令给处理器1010运行的音频输出服务模块1012和蓝牙芯片1030。1. When the processor 1010 runs the application module 1011, if it receives a playback instruction for audio data, the application module 1011 can send a start playback instruction to the audio output service module 1012 and the Bluetooth chip 1030 running on the processor 1010.
2、处理器1010在运行音频输出服务模块1012时,可以识别到该音频数据的播放场景(例如睡觉、开车、室内、户外等),并确定出输出该音频数据的蓝牙设备为蓝牙设备200以及输出该音频数据的输出方式(例如输出音量、输出时间或时长等)。接着,处理器1010可以将蓝牙设备200的设备标识和输出方式发送给蓝牙芯片1030,指示蓝牙芯片1030将音频数据发送给蓝牙设备200。2. When the processor 1010 runs the audio output service module 1012, it can identify the playback scene of the audio data (such as sleeping, driving, indoors, outdoors, etc.), and determine that the Bluetooth device that outputs the audio data is the Bluetooth device 200 and Output mode of the audio data (for example, output volume, output time or duration, etc.). Next, the processor 1010 may send the device identification and output mode of the Bluetooth device 200 to the Bluetooth chip 1030 , and instruct the Bluetooth chip 1030 to send the audio data to the Bluetooth device 200 .
3、蓝牙芯片1030可以从存储器1020中获取到该应用模块1011的音频数据。3. The Bluetooth chip 1030 can acquire the audio data of the application module 1011 from the memory 1020 .
4、电子设备100上的蓝牙芯片1030传输该音频数据和输出方式给蓝牙设备200上的蓝牙芯片1040。4. The Bluetooth chip 1030 on the electronic device 100 transmits the audio data and the output method to the Bluetooth chip 1040 on the Bluetooth device 200 .
5、蓝牙设备200上的蓝牙芯片1040接收到音频数据和输出方式后,可以将音频数据发送给数字信号处理器1050进行音频解码。5. After receiving the audio data and the output mode, the Bluetooth chip 1040 on the Bluetooth device 200 can send the audio data to the digital signal processor 1050 for audio decoding.
6、数字信号处理器1050可以将解码后的音频数据输出到扬声器1060上。扬声器1060根据解码后的音频数据,根据输出方式输出声音。6. The digital signal processor 1050 can output the decoded audio data to the speaker 1060. The speaker 1060 outputs sound according to the output method according to the decoded audio data.
其中,在本申请实施例中未详述的部分可以参考前述图7所示实施例,在此不再赘述。For the parts not described in detail in the embodiments of the present application, reference may be made to the foregoing embodiment shown in FIG. 7 , and details are not described herein again.
通过本申请实施例,电子设备100可以根据音频数据的应用软件和当前场景,动态决定当前输出音频数据的音频输出设备,以满足电子设备100在不同场景下或不同应用软件下通过不同的蓝牙设备播放音频数据的需求,减少了用户操作,提高了用户体验。Through the embodiments of the present application, the electronic device 100 can dynamically determine the audio output device that currently outputs audio data according to the application software of the audio data and the current scene, so as to satisfy the requirements that the electronic device 100 can pass different Bluetooth devices in different scenarios or different application software. The need to play audio data reduces user operations and improves user experience.
本申请实施例还提供了一种芯片系统。芯片系统可以包括一个或多个处理器。The embodiments of the present application also provide a chip system. A chip system may include one or more processors.
处理器可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以包括调制解调处理器,还可以包括应用处理器(application processor,AP)。处理器可以实现或者执行本申请实施例中的公开的各方法、步骤。处理器还可以包括更多的部件,这里不作限制。A processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above-mentioned method can be completed by a hardware integrated logic circuit in a processor or an instruction in the form of software. The above-mentioned processor may include a modulation and demodulation processor, and may also include an application processor (application processor, AP). The processor may implement or execute the methods and steps disclosed in the embodiments of this application. The processor may also include more components without limitation.
可选的,芯片系统还包括存储器,存储器可以包括只读存储器和随机存取存储器,并向处理器提供操作指令和数据。存储器的一部分还可以包括非易失性随机存取存储器。Optionally, the chip system further includes a memory, which may include a read-only memory and a random access memory, and provides operation instructions and data to the processor. A portion of the memory may also include non-volatile random access memory.
可选的,存储器存储了可执行软件模块或者数据结构,处理器可以通过调用存储器存 储的操作指令(该操作指令可存储在操作系统中),执行相应的操作。Optionally, the memory stores executable software modules or data structures, and the processor can execute corresponding operations by calling operation instructions stored in the memory (the operation instructions can be stored in the operating system).
可选的,芯片系统可以设置在本申请实施例涉及的电子设备/蓝牙设备中。可选的,处理器用于执行图7所示的实施例中的电子设备/蓝牙设备处理的步骤。存储器用于存储图7所示的实施例中的电子设备/蓝牙设备的数据和指令。Optionally, the chip system may be set in the electronic device/Bluetooth device involved in the embodiment of the present application. Optionally, the processor is configured to execute the electronic device/Bluetooth device processing steps in the embodiment shown in FIG. 7 . The memory is used to store data and instructions of the electronic device/Bluetooth device in the embodiment shown in FIG. 7 .
本申请实施例还提供了一种计算机可读存储介质。上述方法实施例中描述的方法可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。如果在软件中实现,则功能可以作为一个或多个指令或代码存储在计算机可读介质上或者在计算机可读介质上传输。计算机可读介质可以包括计算机存储介质和通信介质,还可以包括任何可以将计算机程序从一个地方传送到另一个地方的介质。存储介质可以是可由计算机访问的任何可用介质。Embodiments of the present application also provide a computer-readable storage medium. The methods described in the foregoing method embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media can include both computer storage media and communication media and also include any medium that can transfer a computer program from one place to another. A storage medium can be any available medium that can be accessed by a computer.
本申请实施例还提供了一种计算机程序产品。上述方法实施例中描述的方法可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。如果在软件中实现,可以全部或者部分得通过计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行上述计算机程序指令时,全部或部分地产生按照上述方法实施例中描述的流程或功能。上述计算机可以是通用计算机、专用计算机、计算机网络、网络设备、电子设备或者其它可编程装置。The embodiments of the present application also provide a computer program product. The methods described in the foregoing method embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. If implemented in software, it may be implemented in whole or in part in the form of a computer program product. A computer program product includes one or more computer instructions. When the above-mentioned computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the above-mentioned method embodiments are generated. The aforementioned computer may be a general purpose computer, a special purpose computer, a computer network, a network device, an electronic device, or other programmable apparatus.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者通过所述计算机可读存储介质进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer may be a general purpose computer, special purpose computer, computer network, or other programmable device. The computer instructions may be stored in or transmitted over a computer-readable storage medium. The computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media. The usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid state disks (SSDs)), and the like.
本申请实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。The steps in the method of the embodiment of the present application may be adjusted, combined and deleted in sequence according to actual needs.
本申请实施例装置中的模块可以根据实际需要进行合并、划分和删减。The modules in the apparatus of the embodiment of the present application may be combined, divided and deleted according to actual needs.
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。As mentioned above, the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand: The technical solutions described in the embodiments are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims (23)

  1. 一种音频推送方法,其特征在于,应用于音频推送系统,所述音频推送系统包括电子设备,第一蓝牙设备和第二蓝牙设备,所述方法包括:An audio push method, characterized in that it is applied to an audio push system, the audio push system includes an electronic device, a first Bluetooth device and a second Bluetooth device, and the method includes:
    电子设备与第一蓝牙设备、第二蓝牙设备建立蓝牙连接;The electronic device establishes a Bluetooth connection with the first Bluetooth device and the second Bluetooth device;
    所述电子设备检测到第一应用的第一播放指令;The electronic device detects the first play instruction of the first application;
    所述电子设备检测到所述电子设备处于第一场景;The electronic device detects that the electronic device is in the first scene;
    所述电子设备基于第一对应关系确定出音频输出设备为所述第一蓝牙设备,所述第一对应关系指示了所述第一场景、所述第一应用和第一设备类型对应,所述第一蓝牙设备的设备类型为所述第一设备类型;The electronic device determines that the audio output device is the first Bluetooth device based on a first correspondence relationship, the first correspondence relationship indicates that the first scene, the first application and the first device type correspond, the The device type of the first Bluetooth device is the first device type;
    当所述电子设备检测到所述电子设备处于第二场景时,所述电子设备基于第二对应关系确定出音频输出设备为所述第二蓝牙设备,所述第二对应关系指示了所述第二场景、所述第一应用和第二设备类型对应,所述第二蓝牙设备的设备类型为所述第二设备类型,所述第二设备类型与所述第一设备类型不同。When the electronic device detects that the electronic device is in the second scene, the electronic device determines that the audio output device is the second Bluetooth device based on the second correspondence, and the second correspondence indicates that the first In the second scenario, the first application corresponds to a second device type, the device type of the second Bluetooth device is the second device type, and the second device type is different from the first device type.
  2. 根据权利要求1所述的方法,其特征在于,所述电子设备基于第一对应关系确定出音频输出设备为第一蓝牙设备之后,还包括:The method according to claim 1, wherein after the electronic device determines that the audio output device is the first Bluetooth device based on the first correspondence, the method further comprises:
    所述电子设备向所述第一蓝牙设备发送第一指令和所述第一应用的音频数据,所述第一指令用于指示所述第一蓝牙设备输出所述第一应用的音频数据。The electronic device sends a first instruction and audio data of the first application to the first Bluetooth device, where the first instruction is used to instruct the first Bluetooth device to output the audio data of the first application.
  3. 根据权利要求1所述的方法,其特征在于,所述音频推送系统还包括第三蓝牙设备,所述方法还包括:The method according to claim 1, wherein the audio push system further comprises a third Bluetooth device, and the method further comprises:
    所述电子设备与所述第三蓝牙设备建立蓝牙连接;establishing a Bluetooth connection between the electronic device and the third Bluetooth device;
    当所述电子设备检测到第二应用的第二播放指令且所述电子设备处于所述第一场景时,所述电子设备基于第三对应关系确定出音频输出设备为所述第三蓝牙设备,所述第三对应关系指示了所述第一场景、所述第二应用和第三设备类型对应,所述第三蓝牙设备的设备类型为所述第三设备类型,所述第三设备类型与所述第一设备类型不同;所述第三对应关系是用户配置的。When the electronic device detects the second play instruction of the second application and the electronic device is in the first scene, the electronic device determines, based on the third correspondence, that the audio output device is the third Bluetooth device, The third correspondence indicates that the first scenario, the second application and the third device type correspond, the device type of the third Bluetooth device is the third device type, and the third device type is the same as the third device type. The first device types are different; the third correspondence is user-configured.
  4. 根据权利要求1所述的方法,其特征在于,所述音频推送系统还包括第四蓝牙设备,所述第四蓝牙设备的设备类型为所述第四设备类型,所述电子设备与所述第四蓝牙设备建立蓝牙连接;The method according to claim 1, wherein the audio push system further comprises a fourth Bluetooth device, the device type of the fourth Bluetooth device is the fourth device type, and the electronic device is the same as the first Bluetooth device. Four Bluetooth devices establish a Bluetooth connection;
    所述电子设备基于第一对应关系确定出音频输出设备为所述第一蓝牙设备,包括:The electronic device determines that the audio output device is the first Bluetooth device based on the first correspondence, including:
    所述第一对应关系还指示了所述第一场景、所述第一应用和第四设备类型对应,所述第一设备类型的优先级高于所述第四设备类型的优先级;所述电子设备基于所述第一对应关系确定出音频输出设备为第一蓝牙设备。The first correspondence also indicates that the first scene, the first application and the fourth device type correspond, and the priority of the first device type is higher than the priority of the fourth device type; the The electronic device determines that the audio output device is the first Bluetooth device based on the first correspondence.
  5. 根据权利要求4所述的方法,其特征在于,所述第一设备类型的优先级和所述第四 设备类型的优先级是用户配置的;或者所述第一设备类型的优先级与所述第一设备类型的历史推送次数对应,所述第四设备类型的优先级与所述第四设备类型的历史推送次数对应。The method according to claim 4, wherein the priority of the first device type and the priority of the fourth device type are configured by a user; or the priority of the first device type is the same as the priority of the first device type The number of historical pushes of the first device type corresponds, and the priority of the fourth device type corresponds to the number of historical pushes of the fourth device type.
  6. 根据权利要求1所述的方法,其特征在于,所述第一对应关系和所述第二对应关系是用户配置的。The method according to claim 1, wherein the first correspondence and the second correspondence are configured by a user.
  7. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    当所述电子设备检测到所述电子设备处于第三场景时,所述电子设备基于第四对应关系,确定出音频输出设备为所述电子设备,所述第四对应关系指示了所述第三场景、所述第一应用和第五设备类型对应,所述第五设备类型和所述第一设备类型、所述第二设备类型不同。When the electronic device detects that the electronic device is in the third scene, the electronic device determines that the audio output device is the electronic device based on a fourth correspondence relationship, and the fourth correspondence relationship indicates that the third The scene, the first application corresponds to a fifth device type, and the fifth device type is different from the first device type and the second device type.
  8. 根据权利要求7所述的方法,其特征在于,所述电子设备基于第一对应关系确定出音频输出设备为第一蓝牙设备,之前还包括:The method according to claim 7, wherein the electronic device determines that the audio output device is the first Bluetooth device based on the first correspondence, further comprising:
    所述电子设备输出提示信息,所述提示信息用于提示用户确定所述第一蓝牙设备为音频输出设备;The electronic device outputs prompt information, where the prompt information is used to prompt the user to determine that the first Bluetooth device is an audio output device;
    所述电子设备接收到针对所述提示信息的用户操作;The electronic device receives a user operation for the prompt information;
    所述电子设备响应于所述用户操作,确定所述音频输出设备为所述第一蓝牙设备。The electronic device determines that the audio output device is the first Bluetooth device in response to the user operation.
  9. 根据权利要求1所述的方法,其特征在于,所述电子设备检测到所述电子设备处于第一场景,包括:The method according to claim 1, wherein the electronic device detects that the electronic device is in the first scene, comprising:
    所述电子设备根据所述电子设备的地理位置信息确定所述电子设备处于第一场景;或者所述电子设备根据已连接的蓝牙设备的设备信息确定所述电子设备处于第一场景。The electronic device determines that the electronic device is in the first scene according to the geographic location information of the electronic device; or the electronic device determines that the electronic device is in the first scene according to the device information of the connected Bluetooth device.
  10. 根据权利要求1所述的方法,其特征在于,所述电子设备基于第一对应关系确定出音频输出设备为第一蓝牙设备,之后还包括:The method according to claim 1, wherein the electronic device determines that the audio output device is the first Bluetooth device based on the first correspondence, and further comprises:
    所述电子设备检测当前的环境音量;The electronic device detects the current ambient volume;
    所述电子设备基于所述当前的环境音量,确定所述第一蓝牙设备的输出音量,所述环境音量和所述输出音量相关联。The electronic device determines an output volume of the first Bluetooth device based on the current ambient volume, where the ambient volume is associated with the output volume.
  11. 一种音频推送系统,其特征在于,包括电子设备、第一蓝牙设备和第二蓝牙设备;其中,An audio push system, characterized in that it includes an electronic device, a first Bluetooth device and a second Bluetooth device; wherein,
    所述电子设备,用于与第一蓝牙设备、第二蓝牙设备建立蓝牙连接;The electronic device is used to establish a Bluetooth connection with the first Bluetooth device and the second Bluetooth device;
    所述电子设备,还用于检测到第一应用的第一播放指令;The electronic device is further configured to detect the first play instruction of the first application;
    所述电子设备,还用于检测到所述电子设备处于第一场景;The electronic device is further configured to detect that the electronic device is in the first scene;
    所述电子设备,还用于基于第一对应关系确定出音频输出设备为所述第一蓝牙设备,所述第一对应关系指示了所述第一场景、所述第一应用和第一设备类型对应,所述第一蓝牙设备的设备类型为所述第一设备类型;The electronic device is further configured to determine that the audio output device is the first Bluetooth device based on a first correspondence relationship, where the first correspondence relationship indicates the first scene, the first application and the first device type Correspondingly, the device type of the first Bluetooth device is the first device type;
    所述电子设备,还用于当所述电子设备检测到所述电子设备处于第二场景时,基于第二对应关系确定出音频输出设备为所述第二蓝牙设备,所述第二对应关系指示了所述第二场景、所述第一应用和第二设备类型对应,所述第二蓝牙设备的设备类型为所述第二设备类型,所述第二设备类型与所述第一设备类型不同。The electronic device is further configured to, when the electronic device detects that the electronic device is in the second scene, determine that the audio output device is the second Bluetooth device based on the second correspondence, and the second correspondence indicates that the audio output device is the second Bluetooth device. In order that the second scenario, the first application and the second device type correspond, the device type of the second Bluetooth device is the second device type, and the second device type is different from the first device type .
  12. 根据权利要求11所述的系统,其特征在于,所述电子设备,还用于基于第一对应关系确定出音频输出设备为第一蓝牙设备之后,向所述第一蓝牙设备发送第一指令和所述第一应用的音频数据,所述第一指令用于指示所述第一蓝牙设备输出所述第一应用的音频数据。The system according to claim 11, wherein the electronic device is further configured to send the first instruction and the first Bluetooth device to the first Bluetooth device after determining that the audio output device is the first Bluetooth device based on the first correspondence. The audio data of the first application, and the first instruction is used to instruct the first Bluetooth device to output the audio data of the first application.
  13. 根据权利要求11所述的系统,其特征在于,所述音频推送系统还包括第三蓝牙设备,所述电子设备,还用于与所述第三蓝牙设备建立蓝牙连接;The system according to claim 11, wherein the audio push system further comprises a third Bluetooth device, and the electronic device is further configured to establish a Bluetooth connection with the third Bluetooth device;
    所述电子设备,还用于当检测到第二应用的第二播放指令且所述电子设备处于所述第一场景时,基于第三对应关系确定出音频输出设备为所述第三蓝牙设备,所述第三对应关系指示了所述第一场景、所述第二应用和第三设备类型对应,所述第三蓝牙设备的设备类型为所述第三设备类型,所述第三设备类型与所述第一设备类型不同;所述第三对应关系是用户配置的。The electronic device is further configured to determine that the audio output device is the third Bluetooth device based on the third correspondence when the second play instruction of the second application is detected and the electronic device is in the first scene, The third correspondence indicates that the first scenario, the second application and the third device type correspond, the device type of the third Bluetooth device is the third device type, and the third device type is the same as the third device type. The first device types are different; the third correspondence is user-configured.
  14. 根据权利要求11所述的系统,其特征在于,所述音频推送系统还包括第四蓝牙设备,所述第四蓝牙设备的设备类型为所述第四设备类型,所述电子设备,还用于与所述第四蓝牙设备建立蓝牙连接;The system according to claim 11, wherein the audio push system further comprises a fourth Bluetooth device, the device type of the fourth Bluetooth device is the fourth device type, and the electronic device is further used for establishing a Bluetooth connection with the fourth Bluetooth device;
    所述电子设备,还用于基于第一对应关系确定出音频输出设备为所述第一蓝牙设备,包括:The electronic device is further configured to determine that the audio output device is the first Bluetooth device based on the first correspondence, including:
    所述第一对应关系还指示了所述第一场景、所述第一应用和第四设备类型对应,所述第一设备类型的优先级高于所述第四设备类型的优先级;所述电子设备,还用于基于所述第一对应关系确定出音频输出设备为第一蓝牙设备。The first correspondence also indicates that the first scene, the first application and the fourth device type correspond, and the priority of the first device type is higher than the priority of the fourth device type; the The electronic device is further configured to determine, based on the first correspondence, that the audio output device is the first Bluetooth device.
  15. 根据权利要求14所述的系统,其特征在于,所述第一设备类型的优先级和所述第四设备类型的优先级是用户配置的;或者所述第一设备类型的优先级与所述第一设备类型的历史推送次数对应,所述第四设备类型的优先级与所述第四设备类型的历史推送次数对应。The system according to claim 14, wherein the priority of the first device type and the priority of the fourth device type are configured by a user; or the priority of the first device type is the same as the priority of the fourth device type. The number of historical pushes of the first device type corresponds, and the priority of the fourth device type corresponds to the number of historical pushes of the fourth device type.
  16. 根据权利要求11所述的系统,其特征在于,所述第一对应关系和所述第二对应关系是用户配置的。The system of claim 11, wherein the first correspondence and the second correspondence are user-configured.
  17. 根据权利要求11所述的系统,其特征在于,所述电子设备,还用于当检测到所述电子设备处于第三场景时,基于第四对应关系确定出音频输出设备为所述电子设备,所述第四对应关系指示了所述第三场景、所述第一应用和第五设备类型对应,所述第五设备类型 和所述第一设备类型、所述第二设备类型不同。The system according to claim 11, wherein the electronic device is further configured to determine that the audio output device is the electronic device based on the fourth correspondence when it is detected that the electronic device is in the third scene, The fourth correspondence indicates that the third scenario, the first application and the fifth device type correspond, and the fifth device type is different from the first device type and the second device type.
  18. 根据权利要求17所述的系统,其特征在于,所述电子设备,还用于基于第一对应关系确定出音频输出设备为第一蓝牙设备之前,输出提示信息,所述提示信息用于提示用户确定所述第一蓝牙设备为音频输出设备;The system according to claim 17, wherein the electronic device is further configured to output prompt information before determining that the audio output device is the first Bluetooth device based on the first correspondence, and the prompt information is used to prompt the user determining that the first Bluetooth device is an audio output device;
    所述电子设备,还用于接收到针对所述提示信息的用户操作;The electronic device is further configured to receive a user operation for the prompt information;
    所述电子设备,还用于响应于所述用户操作,确定所述音频输出设备为所述第一蓝牙设备。The electronic device is further configured to, in response to the user operation, determine that the audio output device is the first Bluetooth device.
  19. 根据权利要求11所述的系统,其特征在于,所述电子设备,还用于检测到所述电子设备处于第一场景,包括:The system according to claim 11, wherein the electronic device is further configured to detect that the electronic device is in the first scene, comprising:
    所述电子设备,还用于根据所述电子设备的地理位置信息确定所述电子设备处于第一场景;或者所述电子设备,还用于根据已连接的蓝牙设备的设备信息确定所述电子设备处于第一场景。The electronic device is further configured to determine that the electronic device is in the first scene according to geographic location information of the electronic device; or the electronic device is further configured to determine the electronic device according to device information of a connected Bluetooth device in the first scene.
  20. 根据权利要求11所述的系统,其特征在于,所述电子设备,还用于基于第一对应关系确定出音频输出设备为第一蓝牙设备之后,检测当前的环境音量;The system according to claim 11, wherein the electronic device is further configured to detect the current ambient volume after determining that the audio output device is the first Bluetooth device based on the first correspondence;
    所述电子设备,还用于基于所述当前的环境音量,确定所述第一蓝牙设备的输出音量,所述环境音量和所述输出音量相关联。The electronic device is further configured to determine the output volume of the first Bluetooth device based on the current ambient volume, where the ambient volume is associated with the output volume.
  21. 一种电子设备,包括存储器,一个或多个处理器,以及一个或多个程序;其中,所述一个或多个程序被存储在所述存储器中;其特征在于,所述一个或多个处理器在执行所述一个或多个程序时,使得所述电子设备实现如权利要求1至10任一项所述的方法。An electronic device comprising a memory, one or more processors, and one or more programs; wherein the one or more programs are stored in the memory; characterized in that the one or more processes When executing the one or more programs, the controller causes the electronic device to implement the method according to any one of claims 1 to 10.
  22. 一种芯片系统,包括一个或多个接口电路和一个或者多个处理器;接口电路和处理器通过线路互联;接口电路用于从存储器接收信号,并向处理器发送信号,信号包括存储器中存储的计算机指令;当处理器执行计算机指令时,电子设备实现如权利要求1至10任一项所述的方法。A chip system, including one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected by lines; the interface circuit is used for receiving signals from a memory and sending signals to the processor, and the signals include storage in the memory. The computer instructions; when the processor executes the computer instructions, the electronic device implements the method of any one of claims 1 to 10.
  23. 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1至10任一项所述的方法。A computer storage medium, characterized by comprising computer instructions, which, when the computer instructions are executed on an electronic device, cause the electronic device to execute the method according to any one of claims 1 to 10.
PCT/CN2021/125915 2020-08-31 2021-10-22 Audio push method and audio push system WO2022042773A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010899554.5A CN114125791B (en) 2020-08-31 2020-08-31 Audio pushing method and audio pushing system
CN202010899554.5 2020-08-31

Publications (1)

Publication Number Publication Date
WO2022042773A1 true WO2022042773A1 (en) 2022-03-03

Family

ID=80352717

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/125915 WO2022042773A1 (en) 2020-08-31 2021-10-22 Audio push method and audio push system

Country Status (2)

Country Link
CN (1) CN114125791B (en)
WO (1) WO2022042773A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115038068A (en) * 2022-05-31 2022-09-09 中国第一汽车股份有限公司 Bluetooth audio playing method and device, vehicle and storage medium
CN115225121A (en) * 2022-07-04 2022-10-21 维沃移动通信有限公司 Bluetooth data output method and device, electronic equipment and storage medium
CN116405963A (en) * 2023-06-09 2023-07-07 深圳市微克科技有限公司 Bluetooth intelligent switch implementation method, system and medium based on dual-mode scheme
CN116679855A (en) * 2022-10-25 2023-09-01 荣耀终端有限公司 Data processing method and device
CN117075840A (en) * 2023-10-13 2023-11-17 小舟科技有限公司 Volume self-adaptive control method and device based on physiological signals, equipment and medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114360206B (en) * 2022-03-21 2022-09-27 北京荣耀终端有限公司 Intelligent alarm method, earphone, terminal and system
CN116828100A (en) * 2022-03-22 2023-09-29 荣耀终端有限公司 Bluetooth audio playing method, electronic equipment and storage medium
CN114745706A (en) * 2022-03-31 2022-07-12 哲库科技(上海)有限公司 Data transmission method and device, electronic equipment and computer readable storage medium
CN114885317B (en) * 2022-07-08 2022-11-25 荣耀终端有限公司 Method for cooperative control between devices, communication system, electronic device, and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103636141A (en) * 2012-11-16 2014-03-12 华为终端有限公司 Method for establishing Bluetooth connection, mobile terminal, Bluetooth devices and system
US20140256259A1 (en) * 2013-03-07 2014-09-11 Plastoform Industries Limited Bluetooth Communication System And Method For Selectively Switching Modes Of Operation In Between Electronic Devices
WO2019090726A1 (en) * 2017-11-10 2019-05-16 华为技术有限公司 Method for selecting bluetooth device, terminal, and system
CN109819529A (en) * 2019-03-18 2019-05-28 维沃移动通信有限公司 A kind of target switching method and terminal device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115297405A (en) * 2020-01-22 2022-11-04 荣耀终端有限公司 Audio output method and terminal equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103636141A (en) * 2012-11-16 2014-03-12 华为终端有限公司 Method for establishing Bluetooth connection, mobile terminal, Bluetooth devices and system
US20140256259A1 (en) * 2013-03-07 2014-09-11 Plastoform Industries Limited Bluetooth Communication System And Method For Selectively Switching Modes Of Operation In Between Electronic Devices
WO2019090726A1 (en) * 2017-11-10 2019-05-16 华为技术有限公司 Method for selecting bluetooth device, terminal, and system
CN109819529A (en) * 2019-03-18 2019-05-28 维沃移动通信有限公司 A kind of target switching method and terminal device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115038068A (en) * 2022-05-31 2022-09-09 中国第一汽车股份有限公司 Bluetooth audio playing method and device, vehicle and storage medium
CN115225121A (en) * 2022-07-04 2022-10-21 维沃移动通信有限公司 Bluetooth data output method and device, electronic equipment and storage medium
CN116679855A (en) * 2022-10-25 2023-09-01 荣耀终端有限公司 Data processing method and device
CN116405963A (en) * 2023-06-09 2023-07-07 深圳市微克科技有限公司 Bluetooth intelligent switch implementation method, system and medium based on dual-mode scheme
CN116405963B (en) * 2023-06-09 2023-08-22 深圳市微克科技有限公司 Bluetooth intelligent switch implementation method, system and medium based on dual-mode scheme
CN117075840A (en) * 2023-10-13 2023-11-17 小舟科技有限公司 Volume self-adaptive control method and device based on physiological signals, equipment and medium
CN117075840B (en) * 2023-10-13 2024-01-26 小舟科技有限公司 Volume self-adaptive control method and device based on physiological signals, equipment and medium

Also Published As

Publication number Publication date
CN114125791B (en) 2022-12-23
CN114125791A (en) 2022-03-01

Similar Documents

Publication Publication Date Title
WO2022042773A1 (en) Audio push method and audio push system
JP7317242B2 (en) Bluetooth connection methods, systems and electronic devices
WO2020224447A1 (en) Method and system for adding smart home device to contacts
WO2021043045A1 (en) Method and device for configuring network configuration information
EP4084486A1 (en) Cross-device content projection method, and electronic device
WO2021043046A1 (en) Resource management and control method and device
WO2020062344A1 (en) Data transmission method and electronic device
WO2021000923A1 (en) Router configuration method, terminal, and router
WO2021185141A1 (en) Wi-fi aware link establishment method and system, electronic device, and storage medium
WO2020238890A1 (en) Information processing method and device
WO2021043198A1 (en) Bluetooth pairing method, and related device
WO2021052204A1 (en) Address book-based device discovery method, audio and video communication method, and electronic device
WO2021253975A1 (en) Permission management method and apparatus for application, and electronic device
WO2021037146A1 (en) File sharing method and device for mobile terminal
WO2020216098A1 (en) Method for providing forwarding service across electronic apparatuses, apparatus, and system
WO2022042770A1 (en) Method for controlling communication service state, terminal device and readable storage medium
WO2022052731A1 (en) Method for transmitting data and electronic device
WO2021197071A1 (en) Wireless communication system and method
WO2022037480A1 (en) Task processing method and related electronic device
WO2021239144A1 (en) Positioning method and related apparatus
WO2021043250A1 (en) Bluetooth communication method, and related device
WO2021027623A1 (en) Device capability discovery method and p2p device
WO2022267974A1 (en) Screen projection method and related apparatus
CN114006698B (en) token refreshing method and device, electronic equipment and readable storage medium
WO2022152174A1 (en) Screen projection method and electronic device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21860605

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21860605

Country of ref document: EP

Kind code of ref document: A1