WO2024082855A1 - Audio service processing method, electronic device, and computer storage medium - Google Patents

Audio service processing method, electronic device, and computer storage medium Download PDF

Info

Publication number
WO2024082855A1
WO2024082855A1 PCT/CN2023/117289 CN2023117289W WO2024082855A1 WO 2024082855 A1 WO2024082855 A1 WO 2024082855A1 CN 2023117289 W CN2023117289 W CN 2023117289W WO 2024082855 A1 WO2024082855 A1 WO 2024082855A1
Authority
WO
WIPO (PCT)
Prior art keywords
service
bluetooth headset
audio
electronic device
audio service
Prior art date
Application number
PCT/CN2023/117289
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
Priority claimed from CN202211289367.0A external-priority patent/CN117956371A/en
Priority claimed from CN202211288799.XA external-priority patent/CN117917899A/en
Application filed by 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Publication of WO2024082855A1 publication Critical patent/WO2024082855A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/50Allocation or scheduling criteria for wireless resources
    • H04W72/56Allocation or scheduling criteria for wireless resources based on priority criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup

Definitions

  • the present application relates to the field of communication technology, and in particular to an audio service processing method, electronic equipment and computer storage medium.
  • Bluetooth headsets are becoming more and more popular with users due to their portability and convenience, as they do not need to store or organize the headphone cables.
  • the function of Bluetooth headsets is that they can establish a wireless connection with electronic devices, thereby cooperating with electronic devices to process audio services for users.
  • Bluetooth headsets can establish a wireless connection with mobile phones, and cooperate with mobile phones to play music, make/receive calls, etc. for users.
  • Bluetooth headsets can be connected to multiple electronic devices at the same time.
  • Bluetooth headset with a built-in Bluetooth audio transmission model protocol (Advanced Audio Distribution Profile, A2DP) audio device, and the A2DP audio device is used for high-definition media playback.
  • A2DP audio device of the headset can be connected to two electronic devices at the same time, and can automatically connect to the newly approached electronic device through the discovery connection mechanism, and randomly disconnect a previously connected electronic device to ensure that only two electronic devices are connected at the same time.
  • a Bluetooth headset with two built-in audio input and output devices: a hands-free profile (HFP) for high-definition calls; an A2DP for high-definition media playback.
  • the headset can be connected to up to three electronic devices.
  • the A2DP audio device of the headset can be connected to two electronic devices at the same time, and the HFP device of the headset can be connected to one device.
  • a Bluetooth headset can only be used as an audio output device for an audio service. If a service conflict occurs in a Bluetooth headset, for example, multiple electronic devices initiate a request to the Bluetooth headset to process an audio service, or the Bluetooth headset is processing an audio service sent by an electronic device 1 connected to it, and at this time, it receives a request to process an audio service sent by another electronic device. Because the Bluetooth headset can only be used as an audio output device for an audio service, the audio service of another electronic device is put on hold, and the audio service sent by other electronic devices cannot be completed in time. If the audio service sent by other electronic devices is more important, the Bluetooth headset cannot complete the more important audio service in time, and the user experience is poor.
  • the present invention provides an audio service processing method, an electronic device and a computer storage medium for decoding
  • the Bluetooth headset can only be used as an audio output device for an audio service. If a service conflict occurs in the Bluetooth headset, the Bluetooth headset can only be used as an audio output device for an audio service, and the audio service of another electronic device will be put on hold, and the audio service sent by other electronic devices cannot be completed in time. If the audio service sent by other electronic devices is more important, the Bluetooth headset cannot complete the more important audio service in time, resulting in a poor user experience.
  • a method for processing an audio service comprising: a first electronic device and a second electronic device both establish a wireless communication channel with a Bluetooth headset; the first electronic device uses the Bluetooth headset to process a first audio service; after the second electronic device detects the second audio service, it determines whether the service priority of the second audio service is greater than the service priority of the first audio service; if the service priority of the second audio service is greater than the service priority of the first audio service, the second electronic device requests the Bluetooth headset to suspend processing of the first audio service, and uses the Bluetooth headset to process the second audio service.
  • the electronic device can control the Bluetooth headset to process more important audio services according to the pre-set service priority, thereby improving the user experience.
  • requesting a Bluetooth headset to suspend processing of a first audio service and using the Bluetooth headset to process a second audio service includes: the second electronic device sends a service suspension instruction to the first electronic device through the Bluetooth headset; the first electronic device receives the service suspension instruction and stops sending audio data of the first audio service to the Bluetooth headset; the second electronic device sends audio data of the second audio service to the Bluetooth headset; the Bluetooth headset receives audio data of the second audio service and processes the second audio service.
  • the second electronic device can instruct the first electronic device to stop sending audio data of the first audio service to the Bluetooth headset and instruct the Bluetooth headset to suspend processing of the first audio service of the first electronic device by sending a service suspension instruction to the first electronic device.
  • the method before the second electronic device requests the Bluetooth headset to suspend processing of the first audio service and uses the Bluetooth headset to process the second audio service, the method further includes: the first electronic device indicates the service priority of the first audio service to the second electronic device through the Bluetooth headset. After the first electronic device synchronizes the priority of the first audio service to the second electronic device, after the second electronic device detects the second audio service, it can determine whether the service priority of the second audio service is greater than the service priority of the first audio service, and after determining that the service priority of the second audio service is greater than the service priority of the first audio service, it seizes the right to use the Bluetooth headset, requests the Bluetooth headset to suspend processing of the first audio service, and starts processing the second audio service.
  • the service pause instruction is used to indicate the service priority of the second audio service; the first electronic device receives the service pause instruction and stops sending audio data of the first audio service to the Bluetooth headset, including: the first electronic device receives the service pause instruction, and if the service priority of the second audio service indicated by the service pause instruction is greater than the service priority of the first audio service, stops sending audio data of the first audio service to the Bluetooth headset.
  • the first electronic device after receiving the service suspension instruction, the first electronic device will reconfirm the service priorities of the second audio service and the first audio service, so as to further ensure the accuracy of the first electronic device in executing the service suspension instruction.
  • the method further includes: the first electronic device using an audio component of the first electronic device to process the first audio service.
  • the first electronic device can also automatically process the first audio service to be processed, thereby improving the completion rate of the audio service.
  • the audio services processed by the Bluetooth headset include call services, multimedia services, and notification services; wherein the service priority of the call service is greater than the service priority of the multimedia service, and the service priority of the multimedia service is greater than the service priority of the notification service.
  • the method after using the Bluetooth headset to process the second audio service, the method also includes: the first electronic device displays a first prompt message after the Bluetooth headset suspends processing the first audio service; wherein the first prompt message is used to request the user to determine whether the first electronic device resumes using the Bluetooth headset to process the first audio service; the first electronic device responds to the user's first operation on the first prompt message, requests the Bluetooth headset to suspend processing the second audio service, and uses the Bluetooth headset to process the first audio service; wherein the first operation is used to trigger the first electronic device to resume using the Bluetooth headset to process the first audio service.
  • the audio service of an electronic device with a higher service priority is not simply decided according to the service priority order set for the audio service. After pausing an audio service, the user can decide whether to continue the audio service. Afterwards, the user can choose whether to resume the preempted audio service according to his/her wishes. In this way, the flexibility of audio service switching is improved, and the user experience is improved.
  • the method also includes: if the service priority of the second audio service is equal to the service priority of the first audio service, the second electronic device displays a second prompt message; wherein the second prompt message is used to request the user to determine whether the second electronic device should preempt the Bluetooth headset to process the second audio service; the second electronic device responds to the user's third operation on the second prompt message, requests the Bluetooth headset to suspend processing the first audio service, and uses the Bluetooth headset to process the second audio service; wherein the third operation is used to trigger the second electronic device to preempt the Bluetooth headset to process the second audio service.
  • the second electronic device that initiates the audio service later can display a prompt message requesting the user to determine whether the second electronic device should preempt the Bluetooth headset to process the second audio service. In this way, the user can decide whether to process the second audio service initiated later first based on his or her wishes, thereby improving the user experience.
  • the first electronic device in response to a user's first operation on a first prompt message, requests the Bluetooth headset to suspend processing of a second audio service, and uses the Bluetooth headset to process the first audio service, including: if the first electronic device receives the user's first operation on the first prompt message within a first preset time period, the first electronic device, in response to the first operation, requests the Bluetooth headset to suspend processing of the second audio service, and uses the Bluetooth headset to process the first audio service.
  • the display time of the first prompt information needs to be controlled within a certain time. If the user's first operation on the first prompt information is detected within the control time, the second electronic device resumes the originally suspended audio service. In this way, the efficiency of the second electronic device in resuming the originally suspended audio service is improved.
  • the method also includes: if the first electronic device does not receive the user's operation on the first prompt information within a first preset time period, or the first electronic device receives the user's second operation on the first prompt information within the first preset time period, the first electronic device uses the Bluetooth headset to process the first audio service after the Bluetooth headset completes processing the second audio service; or, if the first electronic device does not receive the user's operation on the first prompt information within the first preset time period, or the first electronic device receives the user's second operation on the first prompt information within the first preset time period, the first electronic device uses the Bluetooth headset to process the first audio service after the Bluetooth headset suspends processing the second audio service; wherein the second operation is used to trigger the first electronic device to not resume using the Bluetooth headset to process the first audio service.
  • the display time of the first prompt information needs to be controlled within a certain time. If the user's first operation on the first prompt information is detected within the control time, the second electronic device resumes the originally suspended audio service, thereby improving the efficiency of the second electronic device in resuming the originally suspended audio service. After the Bluetooth headset processes the second audio service, the first electronic device can automatically resume using the Bluetooth headset to process the first audio service without user operation, thereby improving the user experience.
  • the method also includes: the first electronic device responds to the user's second operation on the first prompt information, and if the second electronic device completes processing the second audio service using the Bluetooth headset within a second preset time period, the first electronic device uses the Bluetooth headset to process the first audio service after the Bluetooth headset completes processing the second audio service; or, the first electronic device responds to the user's second operation on the first prompt information, and if the second electronic device suspends processing the second audio service using the Bluetooth headset within the second preset time period, the first electronic device uses the Bluetooth headset to process the first audio service after the Bluetooth headset suspends processing the second audio service; wherein the second operation is used to trigger the first electronic device to not resume processing the first audio service using the Bluetooth headset.
  • the first electronic device can automatically resume processing the first audio service using the Bluetooth headset without user operation, thereby improving user experience.
  • the method further includes: the first electronic device uses an audio component of the first electronic device to process the first audio service.
  • the first electronic device may also automatically process the first audio service to be processed, thereby improving the completion of the audio service.
  • a method for processing an audio service comprising: a second electronic device establishes a wireless communication channel with a Bluetooth headset; wherein the Bluetooth headset also establishes a wireless communication channel with a first electronic device, and the Bluetooth headset processes a first audio service of the first electronic device; after the second electronic device detects the second audio service, it determines whether the service priority of the second audio service is greater than the service priority of the first audio service; if the service priority of the second audio service is greater than the service priority of the first audio service, the second electronic device requests the Bluetooth headset to suspend processing of the first audio service, and uses the Bluetooth headset to process the second audio service.
  • the electronic device can control the Bluetooth headset to process more important audio services according to the pre-set service priority, thereby improving the user experience.
  • the second electronic device requests the Bluetooth headset to suspend processing of the first audio service and uses the Bluetooth headset to process the second audio service, including: the second electronic device sends a service suspension instruction to the first electronic device through the Bluetooth headset, wherein the service suspension instruction is used to instruct the first electronic device to receive the service suspension instruction and stop sending audio data of the first audio service to the Bluetooth headset; the second electronic device sends audio data of the second audio service to the Bluetooth headset; the Bluetooth headset receives the audio data of the second audio service and processes the second audio service.
  • the method before the second electronic device requests the Bluetooth headset to suspend processing of the first audio service and uses the Bluetooth headset to process the second audio service, the method also includes: the second electronic device receives the service priority of the first audio service indicated by the first electronic device through the Bluetooth headset.
  • a method for recovering an audio service comprising: establishing a wireless communication channel between a first electronic device and a Bluetooth headset; wherein the Bluetooth headset also establishes a wireless communication channel with a second electronic device;
  • the first electronic device processes the first audio service using the Bluetooth headset; the first electronic device processes the first audio service using the Bluetooth headset; The second audio service of the second electronic device suspends processing of the first audio service and displays a first prompt message; wherein the first prompt message is used to request the user to determine whether the first electronic device should resume processing the first audio service using the Bluetooth headset; the service priority of the second audio service is greater than or equal to the service priority of the first audio service; the first electronic device responds to the user's first operation on the first prompt message, requests the Bluetooth headset to suspend processing of the second audio service, and uses the Bluetooth headset to process the first audio service; wherein the first operation is used to trigger the first electronic device to resume processing the first audio service using the Bluetooth headset.
  • the method after the first electronic device processes the second audio service of the second electronic device in the Bluetooth headset and suspends processing of the first audio service, but before displaying the first prompt information, the method also includes: the first electronic device indicates the service priority of the first audio service to the second electronic device through the Bluetooth headset.
  • the method also includes: the first electronic device receives a service pause instruction from the second electronic device through the Bluetooth headset, the service pause instruction is used to indicate the service priority of the second audio service; if the service priority of the second audio service indicated by the service pause instruction is greater than the service priority of the first audio service, the first electronic device stops sending audio data of the first audio service to the Bluetooth headset.
  • the first electronic device in response to the user's first operation on the first prompt information, requests the Bluetooth headset to suspend processing the second audio service, and uses the Bluetooth headset to process the first audio service, including: if the first electronic device receives the user's first operation on the first prompt information within a first preset time period, the first electronic device, in response to the first operation, requests the Bluetooth headset to suspend processing the second audio service, and uses the Bluetooth headset to process the first audio service.
  • the method also includes: if the first electronic device does not receive the user's operation on the first prompt information within a first preset time period, or the first electronic device receives the user's second operation on the first prompt information within the first preset time period, the first electronic device uses the Bluetooth headset to process the first audio service after the Bluetooth headset completes processing the second audio service; or, if the first electronic device does not receive the user's operation on the first prompt information within the first preset time period, or the first electronic device receives the user's second operation on the first prompt information within the first preset time period, the first electronic device uses the Bluetooth headset to process the first audio service after the Bluetooth headset suspends processing the second audio service; wherein the second operation is used to trigger the first electronic device not to resume using the Bluetooth headset to process the first audio service.
  • the method also includes: the first electronic device responds to the user's second operation on the first prompt information, and if the second electronic device completes processing the second audio service using the Bluetooth headset within a second preset time period, the first electronic device uses the Bluetooth headset to process the first audio service after the Bluetooth headset completes processing the second audio service; or, the first electronic device responds to the user's second operation on the first prompt information, and if the second electronic device suspends processing the second audio service using the Bluetooth headset within the second preset time period, the first electronic device uses the Bluetooth headset to process the first audio service after the Bluetooth headset suspends processing the second audio service; wherein the second operation is used to trigger the first electronic device to not resume processing the first audio service using the Bluetooth headset.
  • the method after the second electronic device detects the second audio service, it requests the Bluetooth headset to suspend processing the first audio service, and after using the Bluetooth headset to process the second audio service, the method also includes: the first electronic device uses the audio component of the first electronic device to process the first audio service.
  • an electronic device comprising a processor and a memory; the memory is used to Code instructions are stored; the processor is used to run the code instructions to execute the antenna control method in any possible design manner as in the first aspect, the second aspect and the third aspect.
  • a computer-readable storage medium which stores instructions.
  • the instructions When the instructions are executed on a computer, the computer executes an antenna control method in any possible design method in the first aspect, the second aspect, and the third aspect.
  • the technical effects brought about by any design method in the second aspect, the third aspect and the fourth aspect can refer to the technical effects brought about by different design methods in the first aspect, and will not be repeated here.
  • FIG1 shows a schematic structural diagram of a tablet 300 according to some embodiments of the present application.
  • FIG2 shows a schematic diagram of an application scenario of an audio service processing method according to some embodiments of the present application
  • FIG3 shows a schematic diagram of an application scenario of an audio service processing method according to some embodiments of the present application
  • FIG4 shows a schematic diagram of an application scenario of an audio service processing method according to some embodiments of the present application.
  • FIG5 shows a schematic diagram of an application scenario of an audio service processing method according to some embodiments of the present application
  • FIG6 shows a software structure block diagram of a mobile phone 200 and a tablet 300 applicable to the present application according to some embodiments of the present application;
  • FIG7 shows a schematic diagram of the structure of an audio strategy engine according to some embodiments of the present application.
  • FIG8 shows a schematic flow chart of an audio service processing method according to some embodiments of the present application.
  • FIG9 is a schematic diagram showing a notification management interface according to some embodiments of the present application.
  • FIG10 shows a schematic structural diagram of a Bluetooth headset 100 according to some embodiments of the present application.
  • FIG11 shows a software structure block diagram of a mobile phone 200 according to some embodiments of the present application.
  • FIG12 shows a schematic diagram of an application scenario of an audio service recovery processing method according to some embodiments of the present application.
  • FIG13 shows a schematic diagram of an operation interface of a “one-key reclaim” window according to some embodiments of the present application.
  • FIG14 shows a schematic diagram of an application scenario of an audio service recovery processing method according to some embodiments of the present application.
  • FIG15 shows a schematic diagram of an application scenario of an audio service recovery processing method according to some embodiments of the present application.
  • FIG. 16 shows a functional module diagram of a mobile phone 200 and a tablet 300 that can implement the audio service recovery processing method provided in an embodiment of the present application according to some embodiments of the present application;
  • FIG. 17 shows a schematic diagram of the interaction logic of various modules of the mobile phone 200 whose audio service is preempted when an audio service preemption event occurs according to some embodiments of the present application;
  • FIG. 18 shows an interactive logic diagram of a mobile phone 200 whose audio service is seized resuming to play music using a Bluetooth headset 100 according to some embodiments of the present application;
  • FIG. 19 is a schematic diagram of an interaction logic when the tablet 300 pauses playing music and the Bluetooth headset 100 is in an idle state, and the mobile phone 200 resumes playing music using the Bluetooth headset 100 according to some embodiments of the present application;
  • FIG. 20 corresponds to the application scenarios corresponding to FIG. 2, FIG. 3, FIG. 12 and FIG. 14 according to some embodiments of the present application , which shows a flow chart of an audio service recovery processing method.
  • the illustrative embodiments of the present application include, but are not limited to, an audio service processing method, an audio device, and a storage medium.
  • the Bluetooth headset can only be used as an audio output device for an audio service, and the audio service of another electronic device will be put on hold, and the audio service sent by other electronic devices cannot be completed in time. If the audio service sent by other electronic devices is more important, the Bluetooth headset cannot complete the more important audio service in time, and the user experience is poor.
  • an embodiment of the present application provides an audio service processing method, which includes: electronic device 1 and electronic device 2 both establish wireless communication channels with a Bluetooth headset. If electronic device 1 is using a Bluetooth headset to process audio service 1, at this time, after electronic device 2 detects audio service 2, it will first determine whether the service priority of audio service 2 is greater than or equal to the service priority of audio service 1. If electronic device 2 determines that the service priority of audio service 2 is greater than or equal to the service priority of audio service 1, it will request the Bluetooth headset to suspend processing of audio service 1 and use the Bluetooth headset to process audio service 2. As a result, the Bluetooth headset will suspend processing of audio service 1 and process audio service 2.
  • audio services may correspond to different priorities. Audio services with higher priorities are usually important and critical audio services. Audio services with higher priorities can be processed preferentially by Bluetooth headsets.
  • audio services may include multiple types, for example, audio services may include call services, multimedia services, notification services, etc.
  • Call services may include playing the voice data of the other end for the user in scenarios such as phone calls (including incoming and outgoing calls), video calls, audio calls, voice messages, games or voice assistants, or collecting the user's voice data and sending it to the other end, as well as playing incoming call ringtones, etc.
  • Multimedia services may include playing music, videos, recordings, background music of games, text-to-speech sounds, etc.
  • Notification services may include playing SMS prompts, push notification prompts, alarm ringtones, system sounds (such as sounds when adjusting the volume, shutter sounds when shooting, etc.).
  • the priorities of notification services, multimedia services, and call services increase in sequence.
  • audio services may include more types, which are not specifically limited here. Among them, the priority of the audio service may be pre-set or actively set by the user, which is not specifically limited here. For example, the service priority of the call service is higher than the service priority of the multimedia service, and the service priority of the multimedia service is higher than the service priority of the notification service.
  • the electronic device can control the Bluetooth headset to process more important audio services according to the pre-set service priority, thereby improving the user experience.
  • the electronic devices in the embodiments of the present application may be mobile phones, media players (such as MP3, MP4, etc.), tablet computers, laptop computers, ultra-mobile personal computers (UMPC), personal digital assistants (PDA), televisions, smart watches, and other devices.
  • the embodiments of the present application do not impose any special restrictions on the specific form of the electronic devices.
  • Electronic device 1 is the first electronic device
  • electronic device 2 is the second electronic device.
  • Fig. 1 shows a schematic diagram of the structure of a tablet 300 according to some embodiments of the present application.
  • the tablet 300 may include a processor 310, an external memory interface 320, an internal memory 321, a universal serial bus (USB) interface 330, a charging management module 340, a power management module 341, a battery 342, an antenna 1, an antenna 2, a mobile communication module 350, a wireless communication module 360, an audio module 370, a speaker 370A, a receiver 370B, a microphone 370C, an earphone interface 370D, a sensor module 380, a button 390, a motor 391, an indicator 392, a camera 393, a display screen (touch screen) 394, and a subscriber identification module (SIM) card interface 395, etc.
  • a processor 310 an external memory interface 320, an internal memory 321, a universal serial bus (USB) interface 330, a charging management module 340, a power management module 341, a battery 342, an antenna 1, an antenna 2, a mobile communication module 350, a wireless communication module 360, an audio module 370, a speaker 370A,
  • the above-mentioned sensor module 380 may include sensors such as pressure sensor, gyroscope sensor, air pressure sensor, magnetic sensor, acceleration sensor, distance sensor, proximity light sensor, fingerprint sensor, temperature sensor, touch sensor, ambient light sensor and bone conduction sensor.
  • sensors such as pressure sensor, gyroscope sensor, air pressure sensor, magnetic sensor, acceleration sensor, distance sensor, proximity light sensor, fingerprint sensor, temperature sensor, touch sensor, ambient light sensor and bone conduction sensor.
  • the structure shown in this embodiment does not constitute a specific limitation on the tablet 300.
  • the tablet 300 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently.
  • the components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 310 may include one or more processing units, for example, the processor 310 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc.
  • AP application processor
  • GPU graphics processor
  • ISP image signal processor
  • controller a memory
  • video codec a digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • Different processing units may be independent devices or integrated into one or more processors.
  • the controller may be the nerve center and command center of the tablet 300.
  • the controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 310 for storing instructions and data.
  • the memory in the processor 310 is a cache memory.
  • the memory may store instructions or data that the processor 310 has just used or cyclically used. If the processor 310 needs to use the instruction or data again, it may be directly called from the memory. Repeated access is avoided, and the waiting time of the processor 310 is reduced, thereby improving the efficiency of the system.
  • both the electronic device 1 and the electronic device 2 establish a wireless communication channel with the Bluetooth headset.
  • the electronic device 1 is using the Bluetooth headset to process the audio service 1, at this time, after the processor 310 detects the audio service 2 again, it will first determine whether the service priority of the audio service 2 is greater than or equal to the service priority of the audio service 1. If the processor 310 determines that the service priority of the audio service 2 is greater than or equal to the service priority of the audio service 1, it will request the Bluetooth headset to suspend the processing of the audio service 1, and use the Bluetooth headset to process the audio service 2. Then, the Bluetooth headset will suspend the processing of the audio service 1 and process the audio service 2.
  • the processor 310 may include one or more interfaces.
  • the interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (Subscriber Identity Module) interface, a general-purpose input/output (GPIO ... module, SIM) interface, and/or universal serial bus (USB) interface, etc.
  • I2C inter-integrated circuit
  • I2S inter-integrated circuit sound
  • PCM pulse code modulation
  • UART universal asynchronous receiver/transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the interface connection relationship between the modules shown in this embodiment is only a schematic illustration and does not constitute a structural limitation on the tablet 300.
  • the tablet 300 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
  • the charging management module 340 is used to receive charging input from a charger.
  • the charger can be a wireless charger or a wired charger. While the charging management module 340 is charging the battery 342, it can also power the electronic device through the power management module 341.
  • the power management module 341 is used to connect the battery 342, the charging management module 340 and the processor 310.
  • the power management module 341 receives input from the battery 342 and/or the charging management module 340, and supplies power to the processor 310, the internal memory 321, the external memory, the display screen 394, the camera 393, and the wireless communication module 360.
  • the power management module 341 and the charging management module 340 can also be set in the same device.
  • the wireless communication function of the tablet 300 can be implemented through antenna 1, antenna 2, mobile communication module 350, wireless communication module 360, modem processor and baseband processor.
  • the antenna 1 of the tablet 300 is coupled with the mobile communication module 350
  • the antenna 2 is coupled with the wireless communication module 360, so that the tablet 300 can communicate with the network and other devices through wireless communication technology.
  • Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the flat panel 300 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas.
  • antenna 1 can be reused as a diversity antenna for a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 350 can provide solutions for wireless communications including 2G/3G/4G/5G, etc., applied to the tablet 300.
  • the mobile communication module 350 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc.
  • the mobile communication module 350 can receive electromagnetic waves from the antenna 1, and filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 350 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation through the antenna 1.
  • at least some functional modules of the mobile communication module 350 can be set in the processor 310. In some embodiments, at least some functional modules of the mobile communication module 350 can be set in the same device as at least some modules of the processor 310.
  • the wireless communication module 360 can provide wireless communication solutions including WLAN (such as wireless fidelity (Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and the like applied on the tablet 300.
  • the tablet 300 can establish a wireless communication channel with a Bluetooth headset using the wireless communication module 360.
  • the tablet 300 can include a Bluetooth module, and the tablet 300 can establish a Bluetooth communication channel with a Bluetooth headset using the Bluetooth module, and transmit instructions and/or data with the Bluetooth headset through the Bluetooth communication channel.
  • the instruction can be to pause an audio service request, process an audio service request, etc.
  • the data can be various types of audio data.
  • the wireless communication module 360 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 360 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 310.
  • the wireless communication module 360 may also receive a signal to be sent from the processor 310, modulate the signal, amplify the signal, and convert it into an electromagnetic wave for radiation via the antenna 2.
  • the tablet 300 implements the display function through a GPU, a display screen 394, and an application processor.
  • the GPU is a microprocessor for image processing, which connects the display screen 394 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the processor 310 may include one or more GPUs, which execute program instructions to generate or change display information.
  • the display screen 394 is used to display images, videos, etc.
  • the display screen 394 includes a display panel.
  • the tablet 300 can realize the shooting function through the ISP, the camera 393, the video codec, the GPU, the display screen 394 and the application processor.
  • the ISP is used to process the data fed back by the camera 393.
  • the camera 393 is used to capture a static image or a video.
  • the tablet 300 may include 1 or N cameras 393, where N is a positive integer greater than 1.
  • the external memory interface 320 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the tablet 300.
  • the external memory card communicates with the processor 310 through the external memory interface 320 to implement a data storage function. For example, files such as music and videos can be saved in the external memory card.
  • the internal memory 321 may be used to store computer executable program codes, which include instructions.
  • the processor 310 executes various functional applications and data processing of the tablet 300 by running the instructions stored in the internal memory 321.
  • the processor 310 may execute the instructions stored in the internal memory 321, and the internal memory 321 may include a program storage area and a data storage area.
  • the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, a service preemption function, etc.), etc.
  • the data storage area may store data created during the use of the tablet 300 (such as audio data, a phone book, etc.), etc.
  • the internal memory 321 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
  • the tablet 300 can implement audio functions such as music playing and recording through the audio module 370, the speaker 370A, the receiver 370B, the microphone 370C, the headphone jack 370D, and the application processor.
  • the button 390 includes a power button, a volume button, etc.
  • the button 390 can be a mechanical button. It can also be a touch button.
  • the motor 391 can generate a vibration prompt.
  • the motor 391 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
  • the indicator 392 can be an indicator light, which can be used to indicate the charging status, power changes, messages, missed calls, notifications, etc.
  • the SIM card interface 395 is used to connect the SIM card.
  • the SIM card can be inserted into the SIM card interface 395, or pulled out from the SIM card interface 395 to achieve contact and separation with the tablet 300.
  • the tablet 300 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • the SIM card interface 395 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
  • the structure of the mobile phone 200 may be the same as or different from that of the tablet 300, and will not be described in detail here.
  • the method of the embodiment of the present application is introduced by taking the electronic device 1 (i.e., the first electronic device) as a mobile phone 200, the electronic device 2 (i.e., the second electronic device) as a tablet 300, and the Bluetooth headset as a Bluetooth headset 100 as an example.
  • the audio service 1 is the first audio service
  • the audio service 2 is the second audio service.
  • FIG. 2 shows a schematic diagram of an application scenario of an audio service processing method according to some embodiments of the present application.
  • Fig. 3 shows a schematic diagram of an application scenario of an audio service processing method according to some embodiments of the present application.
  • the application scenario includes a mobile phone 200, a tablet 300, a user, and a Bluetooth headset worn by the user. 100.
  • Both the mobile phone 200 and the tablet 300 establish wireless communication channels with the Bluetooth headset 100.
  • the mobile phone 200 uses the Bluetooth headset 100 to process audio service 1, for example, using the Bluetooth headset 100 to play music.
  • the tablet 300 may detect music service 2, for example, the tablet 300 may need to use the Bluetooth headset 100 to play music.
  • the service priority of audio service 2 may be greater than or equal to the service priority of audio service 1.
  • the service priority of audio service 2 is equal to the service priority of audio service 1.
  • the subsequent embodiments of the present application will introduce the priority of each audio service, which will not be repeated here.
  • the tablet 300 may request the Bluetooth headset 100 to suspend processing of audio service 1 (such as playing music of the mobile phone 200) and use the Bluetooth headset 100 to process audio service 2 (such as playing music of the tablet 300).
  • the audio service 1 of the mobile phone 200 is preempted by the audio service 2 of the tablet 300.
  • the mobile phone 200 and the tablet 300 can respectively establish a wireless communication channel with the Bluetooth headset 100 through a physical connection, and the physical connection can include an asynchronous link (asynchronous connection-oriented link, ACL) connection in the wireless connection.
  • ACL asynchronous link
  • FIG4 shows a schematic diagram of an application scenario of an audio service processing method according to some embodiments of the present application.
  • the application scenario includes a mobile phone 200, a tablet 300, a user, and a Bluetooth headset 100 worn by the user.
  • the mobile phone 200 uses the Bluetooth headset 100 to process audio service 1, for example, using the Bluetooth headset 100 to play music.
  • the tablet 300 may detect music service 2, for example, the tablet 300 may receive an incoming call and needs to answer the call using the Bluetooth headset 100.
  • the service priority of audio service 2 may be greater than or equal to the service priority of audio service 1. For example, when audio service 2 is answering an incoming call and audio service 1 is playing music, the service priority of audio service 2 is higher than the service priority of audio service 1.
  • the tablet 300 can request the Bluetooth headset 100 to suspend processing of audio service 1 (such as playing music from the mobile phone 200) and use the Bluetooth headset 100 to process audio service 2 (such as answering a call from the tablet 300). At this time, the audio service 1 of the mobile phone 200 is preempted by the audio service 2 of the tablet 300.
  • the tablet 300 can control the Bluetooth headset to process more important audio services according to the pre-set service priority, thereby improving the user experience.
  • the Bluetooth headset will only process an audio service with a higher service priority, and suspend the processing of other audio services with lower service priorities.
  • Other audio services with lower service priorities will be shelved and not processed, which will also affect the user experience.
  • the method further includes: the electronic device 1 uses its own audio component to process the audio service 1.
  • the Bluetooth headset is connected to multiple electronic devices and multiple audio services are sent to the Bluetooth headset in parallel, the multiple audio services can be allocated to the corresponding audio playback devices, which solves the problem of selecting a suitable audio playback device under the concurrent transmission of multiple audio services and improves the user experience.
  • the tablet 300 requests the Bluetooth headset 100 to pause playing the music of the mobile phone 200, and uses the Bluetooth headset 100 to play the call of the tablet 300, and the Bluetooth headset 100 pauses playing the music of the mobile phone 200.
  • the mobile phone 200 plays the music using its own speaker, plugging in or unplugging headphones or a receiver.
  • FIG. 5 shows a schematic diagram of an application scenario of an audio service processing method according to some embodiments of the present application.
  • the tablet 300 detects the audio service 2.
  • the tablet 300 may receive an incoming call and needs to use the Bluetooth headset 100 to answer the call; or, the tablet 300 may need to use the Bluetooth headset 100 to play music.
  • the tablet 300 sends a service suspension instruction to the mobile phone 200 through the Bluetooth headset 100.
  • the mobile phone 200 can receive the service suspension instruction.
  • the mobile phone 200 can stop sending audio data of the audio service 1 to the Bluetooth headset 100, such as playing the audio data corresponding to the music of the mobile phone 200.
  • the tablet 300 can send audio data of the audio service 2 to the Bluetooth headset 100.
  • the Bluetooth headset 100 receives the audio data of the audio service 2 and processes the audio service 2, such as using the Bluetooth headset 100 to play the music of the tablet 300.
  • the tablet 300 can request the Bluetooth headset 100 to suspend processing of the audio service 1 through a service suspension instruction, and use the Bluetooth headset 100 to process the audio service 2, so that the audio service 2 preempts the audio service 1.
  • the Bluetooth headset 100 can play the role of transferring data or signaling (such as the above-mentioned service suspension instruction) between the tablet 300 and the mobile phone 200.
  • the Bluetooth headset 100 can transparently transmit the data or signaling received from the tablet 300 to the mobile phone 200, and can also transparently transmit the data or signaling received from the mobile phone 200 to the tablet 300.
  • the Bluetooth headset 100 after receiving data or signaling from the tablet 300 or the mobile phone 200, the Bluetooth headset 100 will also respond to the data or signaling and perform some corresponding operations. For example, after receiving a service suspension instruction from the tablet 300, the Bluetooth headset 100 will not only transmit the service suspension instruction to the mobile phone 200, but also stop processing the audio service 1 of the mobile phone 200 in response to the service suspension instruction.
  • the tablet 300 after the tablet 300 detects the audio service 2, it requests the Bluetooth headset 100 to suspend processing the audio service 1, and uses the Bluetooth headset 100 to process the audio service 2, including the following specific implementation scheme: the mobile phone 200 indicates the service priority of the audio service 1 to the tablet 300 through the Bluetooth headset 100; after the tablet 300 detects the audio service 2, it compares the service priority of the audio service 2 with that of the audio service 1; if the service priority of the audio service 2 is greater than the service priority of the audio service 1, the tablet 300 requests the Bluetooth headset 100 to suspend processing the audio service 1, and uses the Bluetooth headset 100 to process the audio service 2.
  • the service pause instruction is used to indicate the service priority of audio service 2; the mobile phone 200 receives the service pause instruction and stops sending audio data of audio service 1 to the Bluetooth headset 100, including the following specific implementation scheme: the mobile phone 200 receives the service pause instruction, if the service priority of audio service 2 indicated by the service pause instruction is greater than the service priority of audio service 1, stops sending audio data of audio service 1 to the Bluetooth headset 100.
  • the mobile phone 200 after receiving the service suspension instruction, the mobile phone 200 will reconfirm the service priorities of the audio service 2 and the audio service 1, so as to further ensure the accuracy of the execution of the service suspension instruction by the mobile phone 200.
  • FIG6 shows a software structure diagram of a mobile phone 200 and a tablet 300 applicable to the present application according to some embodiments of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor.
  • the layers communicate with each other through software interfaces.
  • the system is divided into at least three layers, namely, the application layer, the framework layer, and the hardware abstraction layer (Hardware Abstraction Layer, hal) from top to bottom.
  • the application layer includes applications (201, 301), audio managers (204, 304), and audio control centers (205, 305).
  • Framework The layers include perception (206, 306), AMS (207, 307), audio service (202, 302), Bluetooth service (203, 303), and iconnect module (209, 309).
  • the mobile phone 200 includes an application 201 , an audio service 202 , a Bluetooth service 203 , an audio manager 204 , an audio control center 205 , a perception 206 , an AMS 207 , a hardware abstraction layer 208 and an iconnect 209 .
  • application 201 may include applications such as calls, music, video, alarm clock, system media APK, etc.
  • the application layer may also include other applications, which are not limited in this application.
  • the Bluetooth service module 303 is used to establish a Bluetooth connection between the mobile phone 200 and the Bluetooth headset 100 .
  • the audio manager 204 is an application on the mobile phone 200.
  • the audio manager 204 is used to manage the Bluetooth headset 100 connected to the mobile phone 200 via Bluetooth, and when it is detected that the user turns on the audio manager 204, it displays various parameters of the Bluetooth headset connected to the mobile phone 200 via Bluetooth to the user (such as earphone in-ear detection, battery display, etc.) and sets corresponding function controls according to the user's operation, where the function controls include play/next song, play/pause, wake up the voice assistant, turn on/off active noise reduction, etc., and sends the audio service corresponding to the detected function control to the audio service 202, and the audio service 202 determines whether to process the detected audio service.
  • the audio manager 204 includes a prompt capsule, a play control strategy engine, a one-key reclaim and a smart connection.
  • the prompt capsule is used to enable the mobile phone 200 to display a prompt message of the service switching event to the user after the Bluetooth headset 100 switches from processing the audio service of the mobile phone 200 to processing the audio service of the tablet 300.
  • the play control strategy engine is used to set the corresponding function control according to the user's operation, and send the corresponding function control instruction to the audio strategy engine in the audio service 202.
  • the audio strategy engine controls the flow of audio data corresponding to the audio service according to the function control instruction.
  • the audio service 202 is used to manage the Bluetooth headset 100 connected to the mobile phone 200 via Bluetooth, and when the Bluetooth headset 100 is determined to process the audio service of the mobile phone 200, the audio data corresponding to the audio service of the mobile phone 200 is passed to the Bluetooth headset 100 through the hardware abstraction layer 208. After receiving the audio data, the Bluetooth headset 100 plays the audio. Alternatively, if the Bluetooth headset 100 is currently executing the audio service of the tablet 300, and at this time, the mobile phone 200 also detects the audio service to be processed, the audio service 202 will compare the service priorities of the audio service of the tablet 300 and the audio service of the mobile phone 200.
  • the audio service 202 sends a service suspension instruction to the Bluetooth headset 100 through the Bluetooth service 203.
  • the service suspension instruction is used to instruct the Bluetooth headset 100 to suspend the processing of the audio service currently being executed on the tablet 300 and process the audio service of the mobile phone 200.
  • the audio service 202 includes an audio policy engine, an audio playback and recording thread, and an audio device stack.
  • the audio policy engine is used to share the state of processing audio services with other peer devices connected to the Bluetooth headset 100 through the Bluetooth service 203 and the Bluetooth headset 100.
  • the state of processing audio services includes whether to process audio services, the audio type of the processed audio services, and the priority of the audio services.
  • the audio policy engine is used to manage the Bluetooth headset 100 connected to the mobile phone 200 via Bluetooth, and when receiving the instruction of the Bluetooth headset 100 to process the audio service of the mobile phone 200, the audio data corresponding to the audio service of the mobile phone 200 is passed to the Bluetooth headset 100 corresponding to the device identifier of the Bluetooth headset 100 specified in the audio device stack through the hardware abstraction layer 208 based on the set audio playback thread.
  • the audio service 202 will Compare the service priorities of the audio service of the tablet 300 and the audio service of the mobile phone 200.
  • the audio service 202 sends a service pause instruction to the Bluetooth headset 100 through the Bluetooth service 203.
  • the service pause instruction is used to instruct the Bluetooth headset 100 to pause processing of the audio service currently being executed on the tablet 300, and pass the audio data corresponding to the audio service of the mobile phone 200 to the Bluetooth headset 100 corresponding to the device identifier of the Bluetooth headset 100 specified in the audio device stack through the hardware abstraction layer 208 based on the set audio playback thread.
  • Perception 206 is used to perceive the device information parameters of the Bluetooth headset connected to the Bluetooth service 203 and the Bluetooth headset 100 detected by AMS207, and send the information to the audio manager 204. After receiving the information, the audio manager 204 detects that the user has turned on the audio manager 204, and displays the various parameters of the Bluetooth headset 100 connected to the mobile phone 200 by Bluetooth to the user (such as earphone in-ear detection, battery display, etc.).
  • the audio control center 205 is used to display icons related to the audio service processed by the mobile phone 200 and pause/play button icons on the control center interface of the mobile phone 200.
  • the tablet 300 also has the same functional structure as the mobile phone 200. Specifically, the tablet 300 includes applications 301, audio services 302, Bluetooth services 303, audio managers 304, audio control centers 305, perception 306, AMS 307, hardware abstraction layer (Hardware Abstraction Layer, hal) 308 and iconnect 309.
  • applications 301 audio services 302, Bluetooth services 303, audio managers 304, audio control centers 305, perception 306, AMS 307, hardware abstraction layer (Hardware Abstraction Layer, hal) 308 and iconnect 309.
  • application 301 can include applications such as calls, music, video, alarm clock, system media APK, etc.
  • application layer can also include other applications, which are not limited in this application.
  • the Bluetooth service module 303 is used to establish a Bluetooth connection between the tablet 300 and the Bluetooth headset 100 .
  • the audio manager 304 is an application on the tablet 300.
  • the audio manager 304 is used to manage the Bluetooth headset 100 connected to the tablet 300 via Bluetooth, and when it is detected that the user turns on the audio manager 304, it displays various parameters of the Bluetooth headset connected to the tablet 300 via Bluetooth (such as earphone in-ear detection, battery display, etc.) to the user and sets corresponding function controls according to the user's operation, where the function controls include play/next song, play/pause, wake up the voice assistant, turn on/off active noise reduction, etc., and sends the audio service corresponding to the detected function control to the audio service 302, and the audio service 302 determines whether to process the detected audio service.
  • the function controls include play/next song, play/pause, wake up the voice assistant, turn on/off active noise reduction, etc.
  • the audio manager 304 includes a prompt capsule, a play control strategy engine, a one-key reclaim and a smart connection.
  • the prompt capsule is used to enable the tablet 300 to display a prompt message of the service switching event to the user after the Bluetooth headset 100 switches from processing the audio service of the tablet 300 to processing the audio service of the tablet 300.
  • the play control strategy engine is used to set the corresponding function control according to the user's operation, and send the corresponding function control instruction to the audio strategy engine in the audio service 302, and the audio strategy engine controls the flow of audio data corresponding to the audio service according to the function control instruction.
  • the audio service 302 is used to manage the Bluetooth headset 100 connected to the tablet 300 via Bluetooth, and when it is determined that the Bluetooth headset 100 has issued an instruction to process the audio service of the tablet 300, the audio data corresponding to the audio service of the tablet 300 is passed to the Bluetooth headset 100 through the hardware abstraction layer 308. After receiving the audio data, the Bluetooth headset 100 plays the audio. Alternatively, if the Bluetooth headset 100 is currently executing the audio service of the tablet 300, and at this time, the tablet 300 also detects the audio service to be processed, the audio service 302 will compare the audio service of the tablet 300 with the service priority of the audio service of the tablet 300.
  • the audio service 302 will send the service priority to the Bluetooth headset 100 via the Bluetooth service 303.
  • the service suspension instruction is used to instruct the Bluetooth headset 100 to suspend processing of the audio service currently being executed by the tablet 300 and process the audio service of the tablet 300.
  • the audio service 302 includes an audio policy engine, an audio playback and recording thread, and an audio device stack.
  • the audio policy engine is used to share the state of processing audio services with other peer devices connected to the Bluetooth headset 100 through the Bluetooth service 303 and the Bluetooth headset 100.
  • the state of processing audio services includes whether to process audio services, the audio type of the processed audio services, and the priority of the audio services.
  • the audio policy engine is used to manage the Bluetooth headset 100 that is connected to the tablet 300 via Bluetooth, and upon receiving an instruction from the Bluetooth headset 100 to process the audio service of the tablet 300, the audio data corresponding to the audio service of the tablet 300 is passed to the Bluetooth headset 100 corresponding to the device identifier of the Bluetooth headset 100 specified in the audio device stack through the hardware abstraction layer 308 based on the set audio playback thread.
  • the audio service 302 will compare the service priorities of the audio service of the tablet 300 and the audio service of the tablet 300.
  • the audio service 302 sends a service pause instruction to the Bluetooth headset 100 through the Bluetooth service 303.
  • the service pause instruction is used to instruct the Bluetooth headset 100 to pause processing of the audio service currently being executed by the tablet 300, and pass the audio data corresponding to the audio service of the tablet 300 to the Bluetooth headset 100 corresponding to the device identifier of the Bluetooth headset 100 specified in the audio device stack through the hardware abstraction layer 308 based on the set audio playback thread.
  • Perception 306 is used to perceive the device information parameters of the Bluetooth headset connected to the Bluetooth service 303 and the Bluetooth headset detected by AMS307, and send the information to the audio manager 304. After receiving the information, the audio manager 304 detects that the user has turned on the audio manager 304, and displays the various parameters of the Bluetooth headset connected to the tablet 300 by Bluetooth to the user (such as earphone in-ear detection, battery display, etc.).
  • the audio control center 305 is used to display icons related to the audio services processed by the tablet 300 and pause/play button icons on the control center interface of the tablet 300.
  • the audio service processing scheme provided by the embodiment of the present application is applied in a standard software architecture (such as the software architecture described in FIG. 6 above), the algorithm of the software architecture itself may be affected. In order to avoid the occurrence of such problems, the compatibility of the audio service processing scheme provided by the embodiment of the present application is improved.
  • the relevant functional modules for implementing the audio service processing scheme provided by the embodiment of the present application can be placed in a non-standard software architecture (such as the software architecture described in FIG. 6 above), but in the functional modules of the electronic device itself. Specifically, see the description of FIG. 7 below.
  • FIG 7 shows a schematic diagram of the structure of an audio policy engine according to some embodiments of the present application.
  • the audio policy engine that implements the audio service processing solution provided by the embodiment of the present application is mainly in the framework layer (java layer and native layer) of the software architecture, and the modules involved are AudioService, AudioSystem, and AudioPolicyService.
  • the implementation of this part is placed in the AudioPolicyManagerCustomInterface of the non-standard software architecture (non-AOSP module).
  • AudioService senses the status of the audio service currently played on the electronic device (such as mobile phone 200 and tablet 300), including the status changes of audio services such as calls, Bluetooth recording, ringtones, music, movies, alarms, notifications, etc., and broadcasts the status to the Bluetooth service (203, 303) of the electronic device (such as mobile phone 200 and tablet 300) when the audio service starts using the dual-connected Bluetooth headset and when the audio service ends and releases the dual-connected Bluetooth headset.
  • AudioSystem receives the audio service status information of the peer device of the dual-connected headset broadcast by the Bluetooth service (203, 303), and sends the information to In AudioPolicyManagerCustomInterface, AudioPolicyManagerCustomInterface executes the audio service processing solution provided in the embodiment of the present application.
  • the audio control center (205, 305) can synchronously display the actual audio playback device on the current device in real time.
  • the AudioSystem receives the earphone status broadcast by the Bluetooth service (203, 303), it also notifies the audio control center (205, 305) to refresh the audio playback device display to display the latest audio playback device.
  • the following describes a process in which the Bluetooth headset 100 is connected to the mobile phone 200 and the tablet 300 at the same time, and after the user wears the Bluetooth headset 100, the mobile phone 200 uses the Bluetooth headset 100 to play music, and when the tablet 300 detects a music service, it seizes the Bluetooth headset 100 and uses the Bluetooth headset 100 to play music.
  • FIG8 shows a schematic flow chart of an audio service processing method according to some embodiments of the present application, corresponding to FIG4. As shown in FIG8, the flow chart includes the following steps:
  • the Bluetooth headset 100 establishes a wireless communication channel with the mobile phone 200 through the Bluetooth service 201 , and establishes a wireless communication channel with the tablet 300 through the Bluetooth service 301 .
  • the Bluetooth headset 100 sends a message to the mobile phone 200 and the tablet 300 that the user has worn the Bluetooth headset 100 through the communication channel between the Bluetooth headset 100 and the mobile phone 200 and the tablet 300.
  • the method of the embodiment of the present application may further include steps 802-803.
  • the Bluetooth headset 100 sends a wearing notification to the mobile phone 200 via the Bluetooth service 201 , and the Bluetooth headset 100 sends a wearing notification to the tablet 300 via the Bluetooth service 301 .
  • the Bluetooth service 201 broadcasts the wearing status to the audio service 202
  • the Bluetooth service 301 broadcasts the wearing status to the audio service 302 .
  • Application 203 detects a music service.
  • the application 203 can detect the music service initiated by the user in response to the user's operation of playing the selected music.
  • the application 203 sends a music playing request to the audio service 202 .
  • the audio service 202 determines that the Bluetooth headset 100 is idle and can play music.
  • the audio service 202 and the audio service 302 can share the status of their respective devices processing audio services using the Bluetooth headset 100. Therefore, the audio service 202 can determine whether the Bluetooth headset 100 is idle and can play music based on the aforementioned shared information.
  • the audio service 202 sends a music playing instruction to the Bluetooth headset 100 through the Bluetooth service 201, where the music playing instruction includes an audio stream name field.
  • the audio stream name field is used to determine the service type of the audio service, and the service type of the audio service can be used to determine the service priority of playing music.
  • the audio stream name field and its corresponding service type can be shown in Table 1:
  • the audio service 1 belongs to the multimedia service, and its service type identifier is 2.
  • the audio service 1 belongs to the call service, and its service type identifier is 1; or, if the name field of the audio stream 1 is Stream_Notification, the audio service 1 belongs to the notification service, and its service type identifier is 3.
  • each audio stream name field may correspond to a type of audio stream.
  • the electronic device may also include more types of audio streams in Table 1, which are not specifically limited here.
  • the electronic device may also include More types of services may be included, for example, "Stream_TTS" and "Stream_Accessibility” may be classified as other types.
  • the service type identifier corresponding to each service type in Table 1 is only an example, and the service type identifier may also be other.
  • the play music instruction also includes a service priority and/or service type field of the audio service, but is not limited thereto.
  • the Bluetooth headset 100 Upon receiving the music playing instruction sent by the audio service 202 , the Bluetooth headset 100 plays music.
  • the Bluetooth headset 100 After receiving the music playing instruction sent by the audio service 202, the Bluetooth headset 100 receives the audio data sent by the audio service 202 and plays the music based on the audio data.
  • the Bluetooth headset 100 sends notification information of the audio service processing status of the Bluetooth headset 100 to the audio service 302 via the Bluetooth service 301 .
  • the audio service 202 and the audio service 302 can share the status of their respective devices processing audio services using the Bluetooth headset 100.
  • Application 303 detects music service.
  • the application 303 can detect the music service initiated by the user in response to the user's operation of playing the selected music.
  • the application 303 sends a music playing request to the audio service 302.
  • the audio service 302 compares the service priorities of the music service of the tablet 300 and the music service of the mobile phone 200; if the service priority of the music service of the tablet 300 is equal to the service priority of the music service of the mobile phone 200, it is determined that the Bluetooth headset 100 can be preempted to play music.
  • the audio service 302 sends a service suspension instruction to the audio service 202 through the Bluetooth service 301 , the Bluetooth headset 100 and the Bluetooth service 201 .
  • the audio service 202 After receiving the service suspension instruction, the audio service 202 does not send audio data to the Bluetooth headset 100 .
  • the audio service 302 sends the music data to the Bluetooth headset 100 via the Bluetooth service 301 .
  • the Bluetooth headset 100 plays music based on the music data.
  • the tablet 300 requests the Bluetooth headset 100 to pause playing the music of the mobile phone 200, and uses the Bluetooth headset 100 to play the music of the tablet 300.
  • the Bluetooth headset 100 pauses playing the music of the mobile phone 200.
  • the mobile phone 200 uses its own speaker, plugs in and out headphones or receivers, etc. to play music, and at the same time displays the current audio service processing device (audio input and output device) on the display interface of the mobile phone 200.
  • FIG9 shows a schematic diagram of a notification management interface according to some embodiments of the present application. As shown in FIG9, the display interface of the mobile phone 200 shows that the current audio service processing device (audio input and output device) is the local device.
  • FIG10 shows a schematic diagram of the structure of a Bluetooth headset 100 according to some embodiments of the present application.
  • the Bluetooth headset 100 may include at least one processor 101, at least one memory 102, a wireless communication module 103, an audio module 104, a power module 105, and an input/output interface 106, etc.
  • the processor may include one or more interfaces for connecting to other components of the Bluetooth headset 100.
  • the Bluetooth headset 100 is stored in an earphone box.
  • the various components of the Bluetooth headset 100 are specifically introduced below in conjunction with FIG10 .
  • the memory 102 can be used to store program codes, such as for physically connecting the Bluetooth headset 100 with multiple electronic devices, and for connecting with electronic devices in accordance with business regulations, processing audio services of electronic devices (such as music playback, answering/calling, etc.), and for charging the Bluetooth headset 100.
  • the memory 102 may also be used to store other information, such as the priority of the electronic device.
  • the processor 101 can be used to execute the above application code and call related modules to implement the functions of the Bluetooth headset 100 in the embodiment of the present application.
  • the Bluetooth headset 100 can be connected physically to multiple electronic devices (such as electronic device 1 and electronic device 2), and can be connected to different electronic devices according to device priority.
  • the physical connection is a connection based on a physical link, which may include an ACL connection or a low energy asynchronous connection link (low energy asynchronous connection link/logical transport, LE ACL) connection.
  • the Bluetooth headset when the Bluetooth headset establishes a physical connection with the electronic device 1 and is processing the audio service 1 of the electronic device 1 (such as playing music), if the Bluetooth headset receives the connection request information of the electronic device 2, the Bluetooth headset can process the audio service 2 of the electronic device 2 (such as answering/making a call) based on the physical connection with the electronic device 2, so as to realize the service preemption function of the audio service 2 of the electronic device 2.
  • the processor 101 may include one or more processing units, and different processing units may be independent devices or integrated into one or more processors 101.
  • the processor 101 may specifically be an integrated control chip, or may be composed of a circuit including various active and/or passive components, and the circuit is configured to perform the functions of the processor 101 described in the embodiments of the present application.
  • the wireless communication module 103 can be used to support data exchange between the Bluetooth headset 100 and other electronic devices or earphone boxes through wireless communication technology, such as BT, WLAN (such as Wi-Fi), Zigbee, FM, NFC, IR, or general 2.4G/5G wireless communication technology.
  • wireless communication technology such as BT, WLAN (such as Wi-Fi), Zigbee, FM, NFC, IR, or general 2.4G/5G wireless communication technology.
  • the wireless communication module 103 may be a Bluetooth chip.
  • the Bluetooth headset 100 may be paired with a Bluetooth chip of another electronic device through the Bluetooth chip and establish a wireless connection to achieve wireless communication and service processing between the Bluetooth headset 100 and the other electronic device through the wireless connection.
  • the Bluetooth chip may support basic rate (BR)/enhanced data rate (EDR) Bluetooth and BLE, for example, it may receive/send paging information, receive/send BLE broadcast messages, etc.
  • BR basic rate
  • EDR enhanced data rate
  • the wireless communication module 103 may also include an antenna, and the wireless communication module 103 receives electromagnetic waves via the antenna, modulates the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 101.
  • the wireless communication module 103 may also receive a signal to be sent from the processor 101, modulate the frequency of the signal, amplify the signal, and convert it into an electromagnetic wave for radiation through the antenna.
  • the audio module 104 can be used to manage audio data and implement the input and output audio streams of the Bluetooth headset 100.
  • the audio module 104 can obtain an audio stream from the wireless communication module 103, or transmit an audio stream to the wireless communication module 103, to implement functions such as making and receiving calls, playing music, starting/turning off the voice assistant of the electronic device connected to the headset, and receiving/sending the user's voice data through the Bluetooth headset.
  • the audio module 104 may include a speaker (or earpiece, receiver) component for outputting an audio stream, a microphone (or microphone, microphone), a microphone receiving circuit matched with the microphone, etc.
  • the speaker can be used to convert an audio electrical signal into a sound signal and play it.
  • the microphone can be used to convert a sound signal into an audio electrical signal.
  • the power module 105 can be used to provide system power for the Bluetooth headset 100, power each module of the Bluetooth headset 100, and support the Bluetooth headset 100 to receive charging input.
  • the power module 105 may include a power management unit (PMU) and a battery.
  • the power management unit can receive external charging input; transform the electrical signal input from the charging circuit and provide it to the battery for charging; and can also transform the electrical signal provided by the battery and provide it to the battery for charging. Supplying other modules such as the audio module 104 and the wireless communication module 103; and preventing the battery from being overcharged, over-discharged, short-circuited or over-current, etc.
  • the power module 105 may also include a wireless charging coil for wirelessly charging the Bluetooth headset 100.
  • the power management unit may also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc.
  • the multiple input/output interfaces 106 can be used to provide a wired connection for charging or communication between the Bluetooth headset 100 and the headset box.
  • the input/output interface can be a USB interface.
  • the input/output interface 106 can be a headset electrical connector.
  • the Bluetooth headset 100 can establish an electrical connection with the electrical connector in the headset box through the headset electrical connector, thereby charging the battery in the Bluetooth headset 100.
  • the Bluetooth headset 100 can also communicate data with the headset box, for example, it can receive a pairing instruction from the headset box.
  • the Bluetooth headset 100 may further include a sensor 107.
  • the sensor 107 may be a distance sensor or a proximity light sensor, which may be used to determine whether the Bluetooth headset 100 is worn by the user.
  • the Bluetooth headset 100 may use the distance sensor to detect whether there is an object near the Bluetooth headset 100, thereby determining whether the Bluetooth headset 100 is worn by the user. When it is determined that the Bluetooth headset 100 is worn, the Bluetooth headset 100 may turn on the speaker.
  • the sensor 107 may also include a bone conduction sensor, combined into a bone conduction headset.
  • the Bluetooth headset 100 can obtain the vibration signal of the human vocal bone, parse the voice signal, implement the voice function, and thus receive the user's voice command.
  • the Bluetooth headset 100 can also perform voice authentication based on the user's voice signal obtained by the bone conduction headset to authenticate the user's identity in business scenarios such as payment transactions.
  • the sensor 107 may also include: a touch sensor for detecting a user's touch operation; a fingerprint sensor for detecting a user's fingerprint and identifying the user's identity; an ambient light sensor that can adaptively adjust some parameters (such as volume) according to the perceived brightness of the ambient light; and other possible sensors.
  • a touch sensor for detecting a user's touch operation
  • a fingerprint sensor for detecting a user's fingerprint and identifying the user's identity
  • an ambient light sensor that can adaptively adjust some parameters (such as volume) according to the perceived brightness of the ambient light
  • the touch sensor can detect the user's touch operations such as single click, double click, multiple clicks, long press, and heavy pressure, and can also perform user fingerprint recognition to authenticate the user's identity in business scenarios such as payment transactions.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the Bluetooth headset 100. It may have more or fewer components than those shown in FIG. 10, may combine two or more components, or may have different component configurations.
  • the outer surface of the Bluetooth headset 100 may also include a button 108, an indicator light (which may indicate battery level, incoming/outgoing call, pairing mode, etc.), a display screen (which may prompt the user with relevant information), a dust screen (which may be used in conjunction with a handset), and other components.
  • the button 108 may be a physical button or a touch button (used in conjunction with a touch sensor), etc., which is used to trigger operations such as power on, power off, pause, play, record, start pairing, and reset.
  • the Bluetooth headset 100 may include an earphone body (also called the left earplug, or the first part) worn on the left ear and an earphone body (also called the right earplug, or the second part) worn on the right ear.
  • the earphone body may include a housing and internal components.
  • the internal components are arranged in a cavity formed by the housing.
  • the internal components may include devices in modules such as the above-mentioned audio module, power module, and wireless communication module.
  • the Bluetooth headset is a TWS headset
  • the user can use the TWS headset in binaural mode or monaural mode.
  • monaural mode the user wears the left earbud or the right earbud to listen to music or answer/make phone calls and other audio services.
  • binaural mode the user can wear two earbuds to enjoy music or perform other audio services.
  • binaural mode the two earbuds are divided into main earbuds and auxiliary earbuds.
  • the main and auxiliary roles of the two earbuds can also be switched based on different conditions. For example, the earbud with higher power can be switched to the main earbud, and the earbud with lower power can be switched to the auxiliary earbud.
  • the Bluetooth headset is usually stored in an earphone box.
  • the earphone box may have one or more magnets inside to attract the earphone body into the cavity in the earphone box.
  • the earphone box may include a battery and multiple input/output interfaces.
  • the input/output interface may be a box electrical connector.
  • the headset box may be provided with at least one touch control, which can be used to trigger the Bluetooth headset to perform pairing reset or charge the Bluetooth headset.
  • the headset box may also be provided with one or more power indicator lights to prompt the user the power level of the battery in the headset box and the power level of the battery in each headset body in the headset box.
  • the earphone box may further include components such as a processor and a memory.
  • the memory may be used to store application code, and the processor of the earphone box controls execution to implement various functions of the earphone box.
  • the processor of the earphone box executes the application code stored in the memory, and charges the Bluetooth headset after detecting that the Bluetooth headset is placed in the earphone box and the lid of the earphone box is closed.
  • the earphone box may be provided with a charging interface for charging the battery of the earphone box.
  • the earphone box may also include a wireless charging coil for wirelessly charging the battery of the earphone box. It is understandable that the earphone box may also include other components, which will not be described one by one here.
  • the components shown in FIG. 10 do not constitute a specific limitation on the Bluetooth headset 100 , and the Bluetooth headset 100 may also include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange the components differently.
  • Bluetooth headsets can connect to multiple electronic devices, but they can only process the audio service of an electronic device with a higher service priority according to the service priority order set for the audio service, but cannot process the audio service of other electronic devices according to the user's wishes.
  • the flexibility of audio service switching is poor and the user experience is poor.
  • the application scenario includes a Bluetooth headset 100, a mobile phone 200, and a tablet 300.
  • the Bluetooth headset 100 simultaneously establishes wireless communication connections with the mobile phone 200 and the tablet 300, thereby cooperating with the mobile phone 200 and the tablet 300 to process audio services for the user.
  • the Bluetooth headset 100 plays the music of the mobile phone 200.
  • the tablet 300 detects an audio service of playing music and determines that the service priority of the tablet 300 playing music is greater than or equal to the service priority of the mobile phone 200 playing music, it requests the Bluetooth headset 100 to pause playing the music of the mobile phone 200 and play the music of the tablet 300, so that the Bluetooth headset 100 pauses playing the music of the mobile phone 200 and plays the music of the tablet 300.
  • the Bluetooth headset 100 cannot switch to playing the music of the mobile phone 200 again according to the user's wishes, the flexibility of audio service switching is poor, and the user experience is poor.
  • the embodiment of the present application provides an audio service recovery processing method.
  • both electronic device 1 and electronic device 2 establish a wireless communication channel with a Bluetooth headset. Then, when electronic device 1 uses the Bluetooth headset to process audio service 1, and electronic device 2 detects audio service 2, it can request the Bluetooth headset to The processing of audio service 1 is suspended, and the Bluetooth headset is used to process audio service 2.
  • the audio service priority of audio service 2 is greater than or equal to the audio service priority of audio service 1.
  • the electronic device 1 described in the embodiment of the present application is a first electronic device, the electronic device 2 is a second electronic device, the audio service 1 is a first audio service, and the audio service 2 is a second audio service.
  • the electronic device 1 may display a first prompt message, wherein the first prompt message is used to request the user to determine whether the electronic device 1 resumes processing the audio service 1 using the Bluetooth headset.
  • the Bluetooth headset is requested to suspend processing of the audio service 2, and the Bluetooth headset is used to process the audio service 1, wherein the first operation is used to trigger the electronic device 1 to resume processing the audio service 1 using the Bluetooth headset. Then, the electronic device 1 resumes processing the audio service 1 using the Bluetooth headset.
  • the audio service of an electronic device with a higher service priority is not simply decided according to the service priority order set for the audio service. After pausing an audio service, the user can decide whether to continue the audio service. Afterwards, the user can choose whether to resume the preempted audio service according to his/her wishes. In this way, the flexibility of audio service switching is improved, and the user experience is improved.
  • the software system of the mobile phone 200 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture.
  • the embodiment of the present application takes the Android system of a layered architecture as an example to exemplify the software structure of the mobile phone 200.
  • FIG. 11 shows a software structure diagram of a mobile phone 200 according to some embodiments of the present application.
  • the layered architecture divides the software into several layers, each with clear roles and division of labor.
  • the layers communicate with each other through software interfaces.
  • the Android system is divided into four layers, namely, from top to bottom, the application layer, the application framework layer, the Android Runtime and the system library, and the kernel layer.
  • the application layer may include applications such as music, video, call, ringtone, alarm, Bluetooth, navigation, audio manager, gallery, recording, etc.
  • the application layer may also include other applications, such as payment applications, shopping applications, banking applications, chat applications or financial management applications, etc., which are not limited in this application.
  • the audio manager is used to sense the state of the Bluetooth headset processing audio services: idle, processing audio services.
  • the audio manager is also used to sense the preemption event of the audio service and the state recovery event of the audio service.
  • the preemption of the audio service refers to the process of suspending the processing of the audio service being processed and processing the audio service initiated by another electronic device when the Bluetooth headset processes the audio service, and then suspending the processing of the audio service being processed and processing the audio service initiated by another electronic device.
  • the state recovery event of the audio service refers to the process of the Bluetooth headset suspending the processing of the audio service initiated by another electronic device after the preemption event of the audio service occurs, and processing the audio service that was previously suspended.
  • the audio manager is also used to display a first prompt message, which is used to instruct the user to select the preemption processing of the audio service and the state recovery processing of the audio service. For example, the audio manager is used to display the aforementioned "one-key grab back" pop-up window.
  • the application framework layer provides an application programming interface (API) and a programming framework for the applications of the application layer.
  • the application framework layer includes some predefined functions. For example, it may include a phone manager, a computing engine, a notification manager, a multimedia framework, a state perception module, a process manager, etc., and the embodiments of the present application do not impose any restrictions on this.
  • the process manager is used to create and terminate processes and threads.
  • the phone manager is used to provide the communication functions of the mobile phone 200. For example, the management of the call status (including connecting, hanging up, etc.) wait).
  • the notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
  • the state perception module is mainly responsible for confirming the state of the mobile phone 200 itself and the state of the wireless device (e.g., Bluetooth headset 100) connected to the mobile phone 200 via Bluetooth.
  • the state of the mobile phone 200 itself may include an activated state and an inactivated state
  • the state of the device connected to the mobile phone via Bluetooth may include an idle state or a non-idle state.
  • the state perception module can confirm the state of the mobile phone 200 itself by monitoring various application processes and threads.
  • the state perception module can determine the state of the device connected to the mobile phone 200 via Bluetooth through the received broadcast information (e.g., BLE broadcast).
  • the multimedia framework can receive audio services sent by various applications in the application layer, identify the type of audio services, and perform service arbitration and preemption.
  • the multimedia framework is used to determine the type of audio service based on the audio stream type in the audio service request when receiving a request to process an audio service sent by an application, and then select an audio playback device based on the state of the Bluetooth headset processing the audio service.
  • the multimedia framework is also used to send an audio service preemption notification to the Bluetooth module when receiving an audio service preemption notification sent by an audio manager.
  • the system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (e.g., OpenGL ES), 2D graphics processing library (e.g., SGL), etc.
  • surface manager e.g., media library
  • 3D graphics processing library e.g., OpenGL ES
  • 2D graphics processing library e.g., SGL
  • the surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • OpenGL ES is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • SGL is a graphics engine for 2D graphics.
  • Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for scheduling and management of the Android system.
  • the core library consists of two parts: one is the function that the Java language needs to call, and the other is the Android core library.
  • the application layer and the application framework layer run in the virtual machine.
  • the virtual machine executes the Java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display driver, camera driver, audio driver, sensor driver, and Bluetooth module.
  • the Bluetooth module may include hardware units for Bluetooth connection and data interaction: wireless radio unit (Radio), baseband or link control unit (link controller), link management unit (link manager), etc.
  • the wireless radio unit is used to realize the wireless radio unit (Radio) for sending/receiving data and voice;
  • the link management unit is used to convert radio frequency signals into digital or voice signals to realize Baseband protocol and other underlying connection procedures;
  • the link management unit is responsible for managing the communication between Bluetooth devices and implementing operations such as link establishment, verification, and link configuration.
  • the method of the embodiment of the present application is introduced by taking the electronic device 1 (i.e., the first electronic device) as a mobile phone 200, the electronic device 2 (i.e., the second electronic device) as a tablet 300, and the Bluetooth headset as a Bluetooth headset 100 as an example.
  • the audio service 1 is the first audio service
  • the audio service 2 is the second audio service.
  • both the mobile phone 200 and the tablet 300 can establish a wireless communication channel (such as a physical connection) with the Bluetooth headset 100.
  • the mobile phone 200 can use the Bluetooth headset 100 to process the audio service 1, such as using the Bluetooth headset 100 to play the music of the mobile phone 200.
  • the tablet 300 may detect the audio service 2.
  • the tablet 300 may receive an incoming call and need to answer the call using the Bluetooth headset 100; or, the tablet 300 may need to play music using the Bluetooth headset 100.
  • the service priority of the audio service 2 may be greater than or equal to the service priority of the audio service 1.
  • the service priority of the audio service 2 is higher than the service priority of the audio service 1.
  • the service priority of the audio service 2 is equal to the service priority of the audio service 1.
  • tablet 300 can request Bluetooth headset 100 to suspend processing of audio service 1 (such as playing music from mobile phone 200) and use Bluetooth headset 100 to process audio service 2 (such as answering a call from tablet 300). At this time, audio service 1 of mobile phone 200 is preempted by audio service 2 of tablet 300.
  • the mobile phone 200 can provide the user with a "one-key retake" service. Specifically, the mobile phone 200 can display a first prompt message after the Bluetooth headset 100 suspends processing of the audio service 1. The first prompt message is used to request the user to determine whether the mobile phone 200 resumes using the Bluetooth headset 100 to process the audio service 1. In other words, the first prompt message is used to request the user to determine whether the audio service 1 is to re-seize the right to use the Bluetooth headset 100. For example, FIG.
  • FIG. 12 shows a schematic diagram of an application scenario of an audio service recovery processing method according to some embodiments of the present application.
  • the mobile phone 200 displays a "one-key retake” pop-up window.
  • FIG. 13 shows a schematic diagram of an operation interface of a "one-key retake” window according to some embodiments of the present application.
  • the mobile phone 200 displays a "one-key retake” pop-up window 1.
  • the "one-click reclaim" pop-up window 1 includes a prompt message: "Do you want to resume using the Bluetooth headset 100 to process the audio service 1?", as well as a confirmation option and a cancel option.
  • FIG 14 shows an application scenario schematic diagram of an audio service recovery processing method according to some embodiments of the present application.
  • the mobile phone 200 can request the Bluetooth headset 100 to pause playing the music of the tablet 300, and use the Bluetooth headset 100 to play the music of the mobile phone 200, so that the Bluetooth headset 100 resumes playing the music of the mobile phone 200.
  • the first prompt message can be displayed on the desktop of the mobile phone 200, can also be displayed in the interface of the audio application, and can also be displayed in the drop-down notification management menu of the mobile phone 200.
  • the priority of processing services is not determined simply according to the service priority order set for audio services.
  • audio services may correspond to different priorities. Audio services with higher priorities are usually important and critical audio services, and audio services with higher priorities may be processed preferentially by Bluetooth headsets.
  • audio services may include multiple types, such as audio services may include call services, multimedia services, notification services, etc.
  • Call services may include playing the voice data of the other end for the user in scenarios such as phone calls (including incoming and outgoing calls), video calls, audio calls, voice messages, games or voice assistants, or collecting the user's voice data and sending it to the other end, as well as playing incoming call ringtones, etc.
  • Multimedia services may include playing music, videos, recordings, background music for games, text-to-speech sounds, etc.
  • Notification services may include playing SMS prompts, push notification prompts, alarm ringtones, system sounds (such as sounds when adjusting the volume, shutter sounds when shooting, etc.).
  • the priorities of notification services, multimedia services, and call services increase in sequence.
  • audio services may include more types, which are not specifically limited here. Among them, the priority of the audio service may be pre-set or actively set by the user, which is not specifically limited here. For example, the service priority of the call service is higher than the service priority of the multimedia service, and the service priority of the multimedia service is higher than the service priority of the notification service.
  • FIG. 15 shows a schematic diagram of an application scenario of an audio service recovery processing method according to some embodiments of the present application.
  • the tablet 300 detects the audio service 2.
  • the tablet 300 may receive an incoming call and needs to use the Bluetooth headset 100 to answer the call; or, the tablet 300 may need to use the Bluetooth headset 100 to play music.
  • the tablet 300 sends a service suspension instruction to the mobile phone 200 through the Bluetooth headset 100.
  • the mobile phone 200 can receive the service suspension instruction.
  • the mobile phone 200 can stop sending audio data of the audio service 1 to the Bluetooth headset 100, such as playing the audio data corresponding to the music of the mobile phone 200.
  • the tablet 300 can send audio data of the audio service 2 to the Bluetooth headset 100.
  • the Bluetooth headset 100 receives the audio data of the audio service 2 and processes the audio service 2, such as using the Bluetooth headset 100 to play the music of the tablet 300.
  • the tablet 300 can request the Bluetooth headset 100 to suspend processing of the audio service 1 through a service suspension instruction, and use the Bluetooth headset 100 to process the audio service 2, so that the audio service 2 preempts the audio service 1.
  • the Bluetooth headset 100 can play the role of transferring data or signaling (such as the above-mentioned service suspension instruction) between the tablet 300 and the mobile phone 200.
  • the Bluetooth headset 100 can transparently transmit the data or signaling received from the tablet 300 to the mobile phone 200, and can also transparently transmit the data or signaling received from the mobile phone 200 to the tablet 300.
  • the Bluetooth headset 100 after receiving data or signaling from the tablet 300 or the mobile phone 200, the Bluetooth headset 100 will also respond to the data or signaling and perform some corresponding operations. For example, after receiving a service suspension instruction from the tablet 300, the Bluetooth headset 100 will not only transmit the service suspension instruction to the mobile phone 200, but also stop processing the audio service 1 of the mobile phone 200 in response to the service suspension instruction.
  • the tablet 300 after the tablet 300 detects the audio service 2, it requests the Bluetooth headset 100 to suspend processing the audio service 1, and uses the Bluetooth headset 100 to process the audio service 2, including the following specific implementation scheme: the mobile phone 200 indicates the service priority of the audio service 1 to the tablet 300 through the Bluetooth headset 100; the tablet 300 detects the audio service 2, and the Bluetooth headset 100 suspends processing the audio service 1. After processing audio service 2, the tablet 300 compares the service priorities of audio service 2 and audio service 1; if the service priority of audio service 2 is greater than the service priority of audio service 1, the tablet 300 requests the Bluetooth headset 100 to suspend processing audio service 1 and use the Bluetooth headset 100 to process audio service 2.
  • the service suspension instruction is used to indicate the service priority of audio service 2; the mobile phone 200 receives the service suspension instruction and stops sending the audio data of audio service 1 to the Bluetooth headset 100, including the following specific implementation scheme: the mobile phone 200 receives the service suspension instruction, and if the service priority of audio service 2 indicated by the service suspension instruction is greater than the service priority of audio service 1, stops sending the audio data of audio service 1 to the Bluetooth headset 100.
  • the mobile phone 200 after receiving the service suspension instruction, the mobile phone 200 will reconfirm the service priorities of audio service 2 and audio service 1, further ensuring the accuracy of the mobile phone 200 executing the service suspension instruction.
  • the tablet 300 that initiates the audio service later can display a prompt message for requesting the user to determine whether the tablet 300 preempts the Bluetooth headset 100 to process the audio service 2. In this way, the user's willingness can determine whether to process the audio service 2 initiated later first, thereby improving the user experience.
  • the tablet 300 displays a second prompt message; wherein the second prompt message is used to request the user to determine whether the tablet 300 preempts the Bluetooth headset 100 to process the audio service 2; the tablet 300 responds to the user's third operation on the second prompt message, requests the Bluetooth headset 100 to suspend the processing of the audio service 1, and uses the Bluetooth headset 100 to process the audio service 2; wherein the third operation is used to trigger the tablet 300 to preempt the Bluetooth headset 100 to process the audio service 2.
  • the second prompt message can be displayed on the desktop of the tablet 300, can also be displayed on the interface of the audio application of the tablet 300, and can also be displayed in the drop-down notification management menu of the tablet 300.
  • the operation interface of the tablet 300 may include the second prompt information and a corresponding confirmation option button at the same time, and the third operation may be a selection operation of the user on the confirmation option button corresponding to the second prompt information, for example, the user clicks the confirmation option button.
  • the display time of the first prompt information needs to be controlled within a certain time. If the user's first operation on the first prompt information is detected within the control time, mobile phone 200 resumes the originally suspended audio service.
  • the mobile phone 200 if the mobile phone 200 receives a first operation of the user on the first prompt information within a first preset time, the mobile phone 200, in response to the first operation, requests the Bluetooth headset 100 to suspend processing of audio service 2, and uses the Bluetooth headset 100 to process audio service 1.
  • the first preset time can be any time from 10 seconds to 1 minute.
  • the mobile phone 200 can automatically resume using the Bluetooth headset 100 to process the audio service 1 after the Bluetooth headset 100 has processed the audio service 2. Specifically, if the mobile phone 200 does not receive the user's operation on the first prompt information within the first preset time, the mobile phone 200 can automatically resume using the Bluetooth headset 100 to process the audio service 1 after the Bluetooth headset 100 has processed the audio service 2. In this way, after the Bluetooth headset 100 has processed the audio service 2, the mobile phone 200 can automatically resume using the Bluetooth headset 100 to process the audio service 1 without the user's operation, thereby improving the user experience.
  • the mobile phone 200 can automatically resume processing the audio service 1 using the Bluetooth headset 100 after the Bluetooth headset 100 completes processing the audio service 2.
  • the second operation is used to trigger the mobile phone 200 not to resume using the Bluetooth headset 100 to process the audio service 1, and the mobile phone 200 automatically resumes using the Bluetooth headset 100 to process the audio service 1 after the Bluetooth headset 100 completes the processing of the audio service 2.
  • the first prompt information can be displayed on the desktop of the mobile phone 200, or can be displayed on the interface of the audio application, or can be displayed in the drop-down notification management menu of the mobile phone 200.
  • the operation interface of the mobile phone 200 can include the first prompt information and the corresponding cancel option button at the same time, and the second operation can be the user's selection operation of the cancel option button corresponding to the first prompt information, for example, the user clicks the cancel option button.
  • the mobile phone 200 can automatically resume using the Bluetooth headset 100 to process the audio service 1 without the need for user operation, thereby improving the user experience.
  • the idle Bluetooth headset 100 can be fully utilized to resume processing of the audio service 1, thereby improving the user experience.
  • the mobile phone 200 uses the Bluetooth headset to process the first audio service after the Bluetooth headset suspends processing the second audio service; wherein the second operation is used to trigger the mobile phone 200 not to resume using the Bluetooth headset to process the first audio service.
  • the mobile phone 200 can automatically resume using the Bluetooth headset 100 to process audio service 1 after the Bluetooth headset 100 has completed processing audio service 2, or when the processing of audio service 2 is paused, thereby improving the user experience.
  • the mobile phone 200 responds to the user's second operation on the first prompt information. If the tablet 300 uses the Bluetooth headset 100 to process the audio service 2 within the second preset time, the mobile phone 200 uses the Bluetooth headset 100 to process the audio service 1 after the Bluetooth headset 100 processes the audio service 2; or, the mobile phone 200 responds to the user's second operation on the first prompt information. If the tablet 300 pauses using the Bluetooth headset 100 to process the audio service 2 within the second preset time, the mobile phone 200 uses the Bluetooth headset 100 to process the audio service 1 after the Bluetooth headset 100 pauses processing the audio service 2; wherein the second operation is used to trigger the mobile phone 200 not to resume using the Bluetooth headset 100 to process the audio service 1.
  • the second preset time can be any time between 3 minutes and 4 minutes.
  • the Bluetooth headset 100 pauses playing the media of the mobile phone 200 and plays the call of the tablet 300. If the call on the tablet 300 is hung up, if the media of the mobile phone 200 is still in a waiting state, and the duration from when the Bluetooth headset 100 paused playing the media of the mobile phone 200 to the current time is less than 3 minutes, the Bluetooth headset 100 resumes playing the media of the mobile phone 200.
  • the mobile phone 200 can also automatically process the pending audio service 1 to improve the completion of the audio service.
  • the tablet 300 detects the audio service 2, it requests the Bluetooth headset 100 to suspend processing of the audio service 1, and after using the Bluetooth headset 100 to process the audio service 2, the method also includes the following steps: the mobile phone 200 can mute or suspend the audio service 1, or use the audio component of the mobile phone 200 to process the audio service 1.
  • the audio component can be a speaker, a plug-in headset, or a receiver. Specifically, if the audio service 1 is audio such as a call, Bluetooth recording, notification, or system, it can be directly switched to the audio component of the mobile phone 200 to continue the audio service. If the audio service 1 is a media type service, it can be paused (such as music, video), or muted (such as a game).
  • FIG. 16 shows a method for implementing the audio industry provided by the embodiments of the present application according to some embodiments of the present application.
  • the mobile phone 200 includes an audio application 201 , an audio manager 202 , a multimedia framework 203 and a Bluetooth module 204 .
  • the audio application 201 may include various types of applications for playing audio.
  • the audio application 201 detects an audio service, it sends a request to the multimedia framework 203 to process the audio service.
  • the audio manager 202 is used to sense the state of the Bluetooth headset 100 processing audio services: idle, processing audio services.
  • the audio manager 202 is also used to sense the preemption of audio services and the state recovery events of audio services.
  • the preemption of audio services refers to the process in which the Bluetooth headset 100 detects a pending audio service initiated by another electronic device while processing an audio service, and then suspends the processing of the audio service being processed and processes the pending audio service initiated by another electronic device.
  • the state recovery event of the audio service refers to the process in which the Bluetooth headset 100 suspends the processing of the pending audio service initiated by another electronic device after the preemption event of the audio service occurs, and processes the audio service that was previously suspended.
  • the audio manager 202 is also used to display a first prompt message, which is used to instruct the user to select the preemption processing of the audio service and the state recovery processing of the audio service.
  • the audio manager 202 is used to display the aforementioned "one-key recovery" pop-up window.
  • the multimedia framework 203 is used to determine the type of audio service according to the audio stream type in the audio service request when receiving the audio service processing request sent by the audio application 201, and then select the audio playback device according to the state of the audio service processing by the Bluetooth headset 100.
  • the multimedia framework 203 is also used to send an audio service preemption notification to the Bluetooth module 204 when receiving the audio service preemption notification (referred to as the preemption notification in the figure) sent by the audio manager 302.
  • the Bluetooth module 204 is used to support the transmission of various instructions and data.
  • the Bluetooth headset 100 is used to support audio data transmission, audio service processing or/or pause request, audio service preemption notification, and audio service processing status transmission.
  • the tablet 300 includes an audio application 301 , an audio manager 302 , a multimedia framework 303 and a Bluetooth module 304 .
  • the audio application 301 may include various types of applications for playing audio.
  • the audio application 301 detects an audio service, it sends a request to the multimedia framework 303 to process the audio service.
  • the audio manager 302 is used to sense the state of the Bluetooth headset 100 processing audio services: idle, processing audio services.
  • the audio manager 302 is also used to sense the preemption of audio services and the state recovery events of audio services.
  • the preemption of audio services refers to the process in which the Bluetooth headset 100 detects a pending audio service initiated by another electronic device while processing an audio service, and then suspends the processing of the audio service being processed and processes the pending audio service initiated by another electronic device.
  • the state recovery event of the audio service refers to the process in which the Bluetooth headset 100 suspends the processing of the pending audio service initiated by another electronic device after the preemption event of the audio service occurs, and processes the audio service that was previously suspended.
  • the audio manager 302 is also used to display a first prompt message, which is used to instruct the user to select the preemption processing of the audio service and the state recovery processing of the audio service.
  • the audio manager 302 is used to display the aforementioned "one-key recapture" pop-up window.
  • the multimedia framework 303 is used to determine the type of audio service according to the audio stream type in the audio service request when receiving the audio service processing request sent by the audio application 301, and then select the audio playback device according to the state of the Bluetooth headset 100 processing the audio service.
  • the multimedia framework 303 is also used to send audio to the Bluetooth module 304 when receiving the audio service preemption notification (referred to as preemption notification in the figure) sent by the audio manager 302. Service preemption notification.
  • the Bluetooth module 304 is used to support the transmission of various instructions and data.
  • the Bluetooth headset 100 is used to support audio data transmission, audio service processing or/or pause request, audio service preemption notification, and audio service processing status transmission.
  • FIG17 corresponds to FIG12 , and shows a schematic diagram of the interaction logic of various modules of the mobile phone 200 whose audio service is preempted when an audio service preemption event occurs. As shown in FIG17 :
  • the Bluetooth headset 100 receives a music playing request initiated by the tablet 300, and the Bluetooth headset 100 determines that the status of the Bluetooth headset 100 processing the audio service is preempted, then a preemption notification is sent to the mobile phone 200, and the Bluetooth module 204 receives the preemption event and the status of the Bluetooth headset 100 processing the audio service (referred to as the headset status).
  • the Bluetooth headset 100 forwards the preemption notification and headset status to the audio manager 202 and the multimedia framework 203 respectively.
  • the multimedia framework 203 confirms whether it is necessary to preempt the audio service according to the service priority of the audio service being processed by the Bluetooth headset 100 indicated by the headset status and the service priority of the audio service initiated by the tablet 300. If it is necessary to preempt the audio service, the audio application 201 is notified to pause the playback, and the pause result is sent to the audio manager 202. When the audio manager 202 receives the pause notification, it displays a "one-key retake" window.
  • the audio manager 202 When receiving the preemption notification, the audio manager 202 first displays the preemption notification window, which is used to request the user whether to mute their own audio service or switch to their own receiver, plug in or unplug headphones, or play music on the speaker. If it is detected that the user selects any of the above options, the corresponding action is performed according to the content of the option.
  • FIG18 corresponds to FIG14 , and shows an interactive logic diagram of a mobile phone 200 whose audio service has been seized and resumes playing music using a Bluetooth headset 100 . As shown in FIG18 :
  • the mobile phone 200 After the tablet 300 plays music using the Bluetooth headset 100, the mobile phone 200 detects that the user clicks the confirmation option in the "One-click Recover" pop-up window, and then calls the interface of the multimedia framework 203 to notify the multimedia framework 203 to play music. Then, the multimedia framework 203 notifies the audio application 201 to play music using the Bluetooth headset 100. The Bluetooth module 204 then notifies the Bluetooth headset 100 of the playing status. After receiving the playing notification from the tablet 300, the Bluetooth headset 100 plays the music of the mobile phone 200 and notifies the tablet 300 of the status of the Bluetooth headset 100 processing the audio service (referred to as the headset status).
  • FIG. 19 shows an interactive logic diagram of a tablet 300 pausing the music playing, the Bluetooth headset 100 is in an idle state, and the mobile phone 200 resumes the use of the Bluetooth headset 100 to play music according to some embodiments of the present application. As shown in FIG.
  • the tablet 300 detects that the user has paused the operation of playing music, then the Bluetooth headset 100 is paused to play music, the Bluetooth headset 100 is idle, and the mobile phone 200 is notified of the notification of resuming the music playing (referred to as the resume notification in the figure) and the headset status.
  • the Bluetooth headset 100 forwards the notification of resuming the music playing and the headset status to the audio manager 202 and the multimedia framework 203 respectively.
  • the audio manager 202 calls the interface of the multimedia framework 203, and then the multimedia framework 203 notifies the audio application 201 to play music.
  • FIG20 shows a flowchart of an audio service recovery processing method according to some embodiments of the present application, corresponding to the application scenarios corresponding to FIG2, FIG3, FIG12 and FIG14. As shown in FIG20, the process includes the following: step:
  • the Bluetooth headset 100 establishes wireless communication channels with the mobile phone 200 and the tablet 300 respectively.
  • the Bluetooth headset 100 plays music from the mobile phone 200.
  • the tablet 300 detects that music is being played.
  • the tablet 300 can detect a music service initiated by the user in response to the user's operation of playing selected music.
  • the Bluetooth headset 100 determines that the audio service priority of playing the music of the tablet 300 is greater than the audio service priority of playing the music of the mobile phone 200, and requests to pause playing the music of the mobile phone 200 and play the music of the tablet 300.
  • audio services of the electronic device may correspond to different priorities. Audio services with higher priorities are usually important and critical audio services, and audio services with higher priorities may be processed preferentially by Bluetooth headsets.
  • audio services may include multiple types, for example, audio services may include call services, multimedia services, notification services, etc.
  • Call services may include playing the voice data of the other end for the user in scenarios such as phone calls (including incoming and outgoing calls), video calls, audio calls, voice messages, games or voice assistants, or collecting the user's voice data and sending it to the other end, as well as playing incoming call ringtones, etc.
  • Multimedia services may include playing music, videos, recordings, background music of games, text-to-speech sounds, etc.
  • Notification services may include playing SMS prompts, push notification prompts, alarm ringtones, system sounds (such as sounds when adjusting the volume, shutter sounds when shooting, etc.).
  • the priorities of notification services, multimedia services, and call services increase in sequence.
  • audio services may include more types, which are not specifically limited here. Among them, the priority of the audio service may be pre-set or actively set by the user, which is not specifically limited here. For example, the service priority of the call service is higher than the service priority of the multimedia service, and the service priority of the multimedia service is higher than the service priority of the notification service.
  • the Bluetooth headset 100 pauses playing the music on the mobile phone 200 and plays the music on the tablet 300.
  • the Bluetooth headset 100 sends a pause notification message to the mobile phone 200.
  • the mobile phone 200 displays a first prompt message, where the first prompt message is used to request the user whether to resume using the Bluetooth headset 100 to play the music audio service of the mobile phone 200.
  • the mobile phone 200 responds to the user's confirmation operation on the first prompt information.
  • the first prompt information is used to request the user to determine whether the mobile phone 200 resumes playing music using the Bluetooth headset 100.
  • the first prompt information may be a pop-up window of "One-click Retrieval".
  • the confirmation operation may be that the user clicks on the confirmation option in the pop-up window of "One-click Retrieval".
  • the mobile phone 200 requests the Bluetooth headset 100 to pause playing the music on the tablet 300.
  • the Bluetooth headset 100 pauses playing the music of the tablet 300.
  • the tablet 300 can play the music using its own speakers, plugging and unplugging headphones or receivers, etc.
  • the audio service 1 is audio such as calls, Bluetooth recordings, notifications, or systems, the audio service can be directly switched to the audio component of the tablet 300 to continue.
  • the audio service 1 is a media type service, it can be paused (such as music, video), or muted (such as games).
  • the Bluetooth headset 100 when the tablet 300 is using the Bluetooth headset 100 to play music and is preempted by the music playing service initiated by the mobile phone 200, the Bluetooth headset 100 will record the music playing status of the mobile phone 200 in order to resume the tablet 300 using the Bluetooth headset 100 to play music when the Bluetooth headset 100 is released.
  • FIG. 19 When the board 300 detects the user's operation of pausing music playing, it pauses the use of the Bluetooth headset 100 to play music.
  • the Bluetooth headset 100 is idle, and notifies the mobile phone 200 of a notification of resuming music playing (referred to as the resume notification in the figure) and the headset status.
  • the Bluetooth headset 100 forwards the notification of resuming music playing and the headset status to the audio manager 202 and the multimedia framework 203 respectively.
  • the audio manager 202 calls the interface of the multimedia framework 203, and then the multimedia framework 203 notifies the audio application 201 to play music.
  • the Bluetooth headset 100 plays music from the mobile phone 200.
  • the decision to process the audio service of an electronic device with a higher service priority is not made simply according to the service priority order set for the audio service.
  • the user can decide whether to continue the audio service. Afterwards, the user can choose whether to restore the preempted audio service according to his or her wishes. In this way, the flexibility of audio service switching is improved and the user experience is improved.
  • the various embodiments of the mechanism disclosed in the present application can be implemented in hardware, software, firmware, or a combination of these implementation methods.
  • the embodiments of the present application can be implemented as a computer program or program code executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device.
  • a programmable system which includes at least one processor, a storage system (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device.
  • Program code may be applied to input instructions to perform the functions described herein and to generate output information.
  • the output information may be applied to one or more output devices in a known manner.
  • a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system.
  • program code can also be implemented with assembly language or machine language.
  • the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.
  • the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof.
  • the disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors.
  • the instructions may be distributed over a network or through other computer-readable storage media.
  • machine-readable storage media may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including, but not limited to, floppy disks, optical disks, optical discs, CD-ROMs, magneto-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or tangible machine-readable storage for transmitting information via electrical, optical, acoustic or other forms of propagation signals (e.g., carrier waves, infrared signals, digital signals, etc.) over the Internet. Therefore, machine-readable storage media include any type of machine-readable storage media suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).
  • a machine e.g., a computer
  • a logical unit/module can be a physical unit/module, or a part of a physical unit/module, or can be implemented as a combination of multiple physical units/modules.
  • the physical implementation method of these logical units/modules themselves is not the most important.
  • the combination of functions implemented by these logical units/modules is the key to solving the technical problems proposed by the present application.
  • the above-mentioned device embodiments of the present application do not introduce units/modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units/modules in the above-mentioned device embodiments.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)

Abstract

The present application relates to the technical field of communications, and in particular, to an audio service processing method, an electronic device, and a computer storage medium. In the present application, the electronic device can control a Bluetooth headset to handle a more important audio service according to preset service priorities, to improve user experience. The method comprises: a first electronic device and a second electronic device both establish wireless communication channels with the Bluetooth headset; the first electronic device processes a first audio service using the Bluetooth headset; after detecting a second audio service, the second electronic device determines whether the service priority of the second audio service is greater than the service priority of the first audio service; and if the service priority of the second audio service is greater than the service priority of the first audio service, the second electronic device requests the Bluetooth headset to pause processing of the first audio service and processes the second audio service using the Bluetooth headset.

Description

一种音频业务处理方法、电子设备及计算机存储介质Audio service processing method, electronic device and computer storage medium
本申请要求于2022年10月20日提交国家知识产权局、申请号为202211288799.X、发明名称为“一种音频业务处理方法、电子设备及计算机存储介质”的中国专利申请的优先权,以及于2022年10月20日提交国家知识产权局、申请号为202211289367.0、发明名称为“一种音频业务恢复处理方法、电子设备及计算机存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed with the State Intellectual Property Office on October 20, 2022, with application number 202211288799.X, and invention name “A method for processing audio services, an electronic device, and a computer storage medium”, as well as the priority of the Chinese patent application filed with the State Intellectual Property Office on October 20, 2022, with application number 202211289367.0, and invention name “A method for processing audio services, an electronic device, and a computer storage medium”, the entire contents of which are incorporated by reference in this application.
技术领域Technical Field
本申请涉及通信技术领域,尤其涉及一种音频业务处理方法、电子设备及计算机存储介质。The present application relates to the field of communication technology, and in particular to an audio service processing method, electronic equipment and computer storage medium.
背景技术Background technique
蓝牙耳机凭借其无需收纳整理耳机线、便携、使用便捷的特点,受到越来越多用户的青睐。蓝牙耳机的作用是,蓝牙耳机可以与电子设备建立无线连接,从而配合电子设备为用户处理音频业务。例如,蓝牙耳机可以与手机建立无线连接,配合手机为用户播放音乐、播放接/打电话通话等。Bluetooth headsets are becoming more and more popular with users due to their portability and convenience, as they do not need to store or organize the headphone cables. The function of Bluetooth headsets is that they can establish a wireless connection with electronic devices, thereby cooperating with electronic devices to process audio services for users. For example, Bluetooth headsets can establish a wireless connection with mobile phones, and cooperate with mobile phones to play music, make/receive calls, etc. for users.
目前,用户通常使用多个电子设备,例如手机、平板、个人电脑(personal computer,PC)等,为了方便工作和生活,蓝牙耳机可以同时连接多个电子设备。例如,有一种蓝牙耳机内置蓝牙音频传输模型协议(advanced audio distribution profile,A2DP)音频设备,该A2DP音频设备用于高清播放媒体。该耳机的A2DP音频设备可以同时连接两台电子设备,并且能通过发现连接机制自动连接新靠近的电子设备,同时随机断开一个之前已连接的电子设备,确保同一时刻只有两个电子设备连接。又如,有一种蓝牙耳机内置两种音频输入输出设备:一种免提规格(hands-free profile,HFP),用于高清通话;一种A2DP,用于高清播放媒体。该耳机最多可以连接三台电子设备。具体地,该耳机的A2DP音频设备如前所述,可以同时连接两台电子设备,而该耳机的HFP设备又可以连接一个设备。At present, users usually use multiple electronic devices, such as mobile phones, tablets, personal computers (PCs), etc. In order to facilitate work and life, Bluetooth headsets can be connected to multiple electronic devices at the same time. For example, there is a Bluetooth headset with a built-in Bluetooth audio transmission model protocol (Advanced Audio Distribution Profile, A2DP) audio device, and the A2DP audio device is used for high-definition media playback. The A2DP audio device of the headset can be connected to two electronic devices at the same time, and can automatically connect to the newly approached electronic device through the discovery connection mechanism, and randomly disconnect a previously connected electronic device to ensure that only two electronic devices are connected at the same time. For another example, there is a Bluetooth headset with two built-in audio input and output devices: a hands-free profile (HFP) for high-definition calls; an A2DP for high-definition media playback. The headset can be connected to up to three electronic devices. Specifically, as mentioned above, the A2DP audio device of the headset can be connected to two electronic devices at the same time, and the HFP device of the headset can be connected to one device.
现有技术中,蓝牙耳机只能作为一个音频业务的音频输出设备。若蓝牙耳机出现业务冲突时,例如多个电子设备均向蓝牙耳机发起处理音频业务请求,或者,蓝牙耳机正在处理与之连接的电子设备1发送的音频业务,此时,又接收到另一个电子设备发送的处理音频业务请求,蓝牙耳机因为只能作为一个音频业务的音频输出设备,而搁置另一个电子设备的音频业务,无法及时完成其他电子设备发送的音频业务。若其他电子设备发送的音频业务较重要,蓝牙耳机无法及时完成较重要的音频业务,用户体验较差。In the prior art, a Bluetooth headset can only be used as an audio output device for an audio service. If a service conflict occurs in a Bluetooth headset, for example, multiple electronic devices initiate a request to the Bluetooth headset to process an audio service, or the Bluetooth headset is processing an audio service sent by an electronic device 1 connected to it, and at this time, it receives a request to process an audio service sent by another electronic device. Because the Bluetooth headset can only be used as an audio output device for an audio service, the audio service of another electronic device is put on hold, and the audio service sent by other electronic devices cannot be completed in time. If the audio service sent by other electronic devices is more important, the Bluetooth headset cannot complete the more important audio service in time, and the user experience is poor.
发明内容Summary of the invention
本申请实施例提供一种音频业务处理方法、电子设备及计算机存储介质,用于解 决现有技术中,蓝牙耳机只能作为一个音频业务的音频输出设备。若蓝牙耳机出现业务冲突时,蓝牙耳机因为只能作为一个音频业务的音频输出设备,而搁置另一个电子设备的音频业务,无法及时完成其他电子设备发送的音频业务。若其他电子设备发送的音频业务较重要,蓝牙耳机无法及时完成较重要的音频业务,用户体验较差的问题。The present invention provides an audio service processing method, an electronic device and a computer storage medium for decoding In the prior art, the Bluetooth headset can only be used as an audio output device for an audio service. If a service conflict occurs in the Bluetooth headset, the Bluetooth headset can only be used as an audio output device for an audio service, and the audio service of another electronic device will be put on hold, and the audio service sent by other electronic devices cannot be completed in time. If the audio service sent by other electronic devices is more important, the Bluetooth headset cannot complete the more important audio service in time, resulting in a poor user experience.
为达到上述目的,本申请的实施例采用如下技术方案:To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
第一方面,提供了一种音频业务处理方法,该方法包括:第一电子设备和第二电子设备均与蓝牙耳机建立无线通信通道;第一电子设备利用蓝牙耳机处理第一音频业务;第二电子设备检测到第二音频业务后,判断第二音频业务的业务优先级是否大于第一音频业务的业务优先级;若第二音频业务的业务优先级大于第一音频业务的业务优先级,第二电子设备请求蓝牙耳机暂停处理第一音频业务,利用蓝牙耳机处理第二音频业务。In a first aspect, a method for processing an audio service is provided, the method comprising: a first electronic device and a second electronic device both establish a wireless communication channel with a Bluetooth headset; the first electronic device uses the Bluetooth headset to process a first audio service; after the second electronic device detects the second audio service, it determines whether the service priority of the second audio service is greater than the service priority of the first audio service; if the service priority of the second audio service is greater than the service priority of the first audio service, the second electronic device requests the Bluetooth headset to suspend processing of the first audio service, and uses the Bluetooth headset to process the second audio service.
本方案中,电子设备可以根据预先设置的业务优先级控制蓝牙耳机处理较重要的音频业务,提高用户体验。In this solution, the electronic device can control the Bluetooth headset to process more important audio services according to the pre-set service priority, thereby improving the user experience.
在第一方面的一种可能的实现方式中,请求蓝牙耳机暂停处理第一音频业务,利用蓝牙耳机处理第二音频业务,包括:第二电子设备通过蓝牙耳机向第一电子设备发送业务暂停指令;第一电子设备接收业务暂停指令,停止向蓝牙耳机发送第一音频业务的音频数据;第二电子设备向蓝牙耳机发送第二音频业务的音频数据;蓝牙耳机接收第二音频业务的音频数据,处理第二音频业务。该实现方式中,第二电子设备可以利用向第一电子设备发送业务暂停指令的方式,指示第一电子设备停止向蓝牙耳机发送第一音频业务的音频数据,指示蓝牙耳机暂停处理第一电子设备的第一音频业务。In a possible implementation of the first aspect, requesting a Bluetooth headset to suspend processing of a first audio service and using the Bluetooth headset to process a second audio service includes: the second electronic device sends a service suspension instruction to the first electronic device through the Bluetooth headset; the first electronic device receives the service suspension instruction and stops sending audio data of the first audio service to the Bluetooth headset; the second electronic device sends audio data of the second audio service to the Bluetooth headset; the Bluetooth headset receives audio data of the second audio service and processes the second audio service. In this implementation, the second electronic device can instruct the first electronic device to stop sending audio data of the first audio service to the Bluetooth headset and instruct the Bluetooth headset to suspend processing of the first audio service of the first electronic device by sending a service suspension instruction to the first electronic device.
在第一方面的一种可能的实现方式中,在第二电子设备请求蓝牙耳机暂停处理第一音频业务,并利用蓝牙耳机处理第二音频业务之前,该方法还包括:第一电子设备通过蓝牙耳机向第二电子设备指示第一音频业务的业务优先级。其中,第一电子设备向第二电子设备同步第一音频业务的优先级后,第二电子设备检测到第二音频业务后,便可以判断第二音频业务的业务优先级是否大于第一音频业务的业务优先级,并在确定第二音频业务的业务优先级大于第一音频业务的业务优先级后,抢占蓝牙耳机的使用权,请求蓝牙耳机暂停处理第一音频业务,开始处理第二音频业务。In a possible implementation of the first aspect, before the second electronic device requests the Bluetooth headset to suspend processing of the first audio service and uses the Bluetooth headset to process the second audio service, the method further includes: the first electronic device indicates the service priority of the first audio service to the second electronic device through the Bluetooth headset. After the first electronic device synchronizes the priority of the first audio service to the second electronic device, after the second electronic device detects the second audio service, it can determine whether the service priority of the second audio service is greater than the service priority of the first audio service, and after determining that the service priority of the second audio service is greater than the service priority of the first audio service, it seizes the right to use the Bluetooth headset, requests the Bluetooth headset to suspend processing of the first audio service, and starts processing the second audio service.
在第一方面的一种可能的实现方式中,业务暂停指令用于指示第二音频业务的业务优先级;第一电子设备接收业务暂停指令,停止向蓝牙耳机发送第一音频业务的音频数据,包括:第一电子设备接收业务暂停指令,若业务暂停指令指示的第二音频业务的业务优先级大于第一音频业务的业务优先级,停止向蓝牙耳机发送第一音频业务的音频数据。In a possible implementation of the first aspect, the service pause instruction is used to indicate the service priority of the second audio service; the first electronic device receives the service pause instruction and stops sending audio data of the first audio service to the Bluetooth headset, including: the first electronic device receives the service pause instruction, and if the service priority of the second audio service indicated by the service pause instruction is greater than the service priority of the first audio service, stops sending audio data of the first audio service to the Bluetooth headset.
本方案中,第一电子设备在接收到业务暂停指令后,会再次确认第二音频业务和第一音频业务的业务优先级,进一步确保第一电子设备执行业务暂停指令的准确度。In this solution, after receiving the service suspension instruction, the first electronic device will reconfirm the service priorities of the second audio service and the first audio service, so as to further ensure the accuracy of the first electronic device in executing the service suspension instruction.
在第一方面的一种可能的实现方式中,请求蓝牙耳机暂停处理第一音频业务,并利用蓝牙耳机处理第二音频业务之后,该方法还包括:第一电子设备利用第一电子设备的音频部件处理第一音频业务。In a possible implementation manner of the first aspect, after requesting the Bluetooth headset to suspend processing of the first audio service and using the Bluetooth headset to process the second audio service, the method further includes: the first electronic device using an audio component of the first electronic device to process the first audio service.
本方案中,蓝牙耳机暂停处理第一音频业务后,第一电子设备也可以自动处理待处理的第一音频业务,提高音频业务的完成度。 In this solution, after the Bluetooth headset suspends processing of the first audio service, the first electronic device can also automatically process the first audio service to be processed, thereby improving the completion rate of the audio service.
在第一方面的一种可能的实现方式中,蓝牙耳机处理的音频业务包括通话业务、多媒体业务和通知提示业务;其中,通话业务的业务优先级大于多媒体业务的业务优先级,多媒体业务的业务优先级大于通知提示业务的业务优先级。In a possible implementation of the first aspect, the audio services processed by the Bluetooth headset include call services, multimedia services, and notification services; wherein the service priority of the call service is greater than the service priority of the multimedia service, and the service priority of the multimedia service is greater than the service priority of the notification service.
在第一方面的一种可能的实现方式中,利用蓝牙耳机处理第二音频业务之后,该方法还包括:第一电子设备在蓝牙耳机暂停处理第一音频业务后,显示第一提示信息;其中,第一提示信息用于请求用户确定第一电子设备是否恢复利用蓝牙耳机处理第一音频业务;第一电子设备响应于用户对第一提示信息的第一操作,请求蓝牙耳机暂停处理第二音频业务,并利用蓝牙耳机处理第一音频业务;其中,第一操作用于触发第一电子设备恢复利用蓝牙耳机处理第一音频业务。In a possible implementation of the first aspect, after using the Bluetooth headset to process the second audio service, the method also includes: the first electronic device displays a first prompt message after the Bluetooth headset suspends processing the first audio service; wherein the first prompt message is used to request the user to determine whether the first electronic device resumes using the Bluetooth headset to process the first audio service; the first electronic device responds to the user's first operation on the first prompt message, requests the Bluetooth headset to suspend processing the second audio service, and uses the Bluetooth headset to process the first audio service; wherein the first operation is used to trigger the first electronic device to resume using the Bluetooth headset to process the first audio service.
本方案中,不是单纯按照音频业务设定的业务优先级顺序,决定处理业务优先级较高的一个电子设备的音频业务。在暂停一个音频业务后,可以由用户决定是否继续该音频业务。之后,可以按照用户的意愿选择是否恢复被抢占的音频业务。如此,提高了音频业务切换的灵活度,提高用户体验。In this solution, the audio service of an electronic device with a higher service priority is not simply decided according to the service priority order set for the audio service. After pausing an audio service, the user can decide whether to continue the audio service. Afterwards, the user can choose whether to resume the preempted audio service according to his/her wishes. In this way, the flexibility of audio service switching is improved, and the user experience is improved.
在第一方面的一种可能的实现方式中,该方法还包括:若第二音频业务的业务优先级等于第一音频业务的业务优先级,第二电子设备则显示第二提示信息;其中,第二提示信息用于请求用户确定第二电子设备是否抢占蓝牙耳机来处理第二音频业务;第二电子设备响应于用户对第二提示信息的第三操作,请求蓝牙耳机暂停处理第一音频业务,并利用蓝牙耳机处理第二音频业务;其中,第三操作用于触发第二电子设备抢占蓝牙耳机来处理第二音频业务。In a possible implementation of the first aspect, the method also includes: if the service priority of the second audio service is equal to the service priority of the first audio service, the second electronic device displays a second prompt message; wherein the second prompt message is used to request the user to determine whether the second electronic device should preempt the Bluetooth headset to process the second audio service; the second electronic device responds to the user's third operation on the second prompt message, requests the Bluetooth headset to suspend processing the first audio service, and uses the Bluetooth headset to process the second audio service; wherein the third operation is used to trigger the second electronic device to preempt the Bluetooth headset to process the second audio service.
本方案中,当同时需要蓝牙耳机的使用权的音频业务处于同一业务优先级的情况下,后发起音频业务的第二电子设备可以显示用于请求用户确定第二电子设备是否抢占蓝牙耳机来处理第二音频业务的提示信息,如此,便可以由用户的意愿决定是否先处理后发起的第二音频业务,提高用户体验。In this solution, when audio services that simultaneously require the right to use the Bluetooth headset are at the same service priority, the second electronic device that initiates the audio service later can display a prompt message requesting the user to determine whether the second electronic device should preempt the Bluetooth headset to process the second audio service. In this way, the user can decide whether to process the second audio service initiated later first based on his or her wishes, thereby improving the user experience.
在第一方面的一种可能的实现方式中,第一电子设备响应于用户对第一提示信息的第一操作,请求蓝牙耳机暂停处理第二音频业务,并利用蓝牙耳机处理第一音频业务,包括:若第一电子设备在第一预设时长内,接收到用户对第一提示信息的第一操作,第一电子设备则响应于第一操作,请求蓝牙耳机暂停处理第二音频业务,并利用蓝牙耳机处理第一音频业务。In a possible implementation of the first aspect, the first electronic device, in response to a user's first operation on a first prompt message, requests the Bluetooth headset to suspend processing of a second audio service, and uses the Bluetooth headset to process the first audio service, including: if the first electronic device receives the user's first operation on the first prompt message within a first preset time period, the first electronic device, in response to the first operation, requests the Bluetooth headset to suspend processing of the second audio service, and uses the Bluetooth headset to process the first audio service.
本方案中,第一提示信息的显示时间需要控制在一定时间,若在该控制时间内,检测到用户对第一提示信息的第一操作,则第二电子设备恢复原本暂停的音频业务,如此,提高了第二电子设备恢复原本暂停的音频业务的效率。In this solution, the display time of the first prompt information needs to be controlled within a certain time. If the user's first operation on the first prompt information is detected within the control time, the second electronic device resumes the originally suspended audio service. In this way, the efficiency of the second electronic device in resuming the originally suspended audio service is improved.
在第一方面的一种可能的实现方式中,该方法还包括:若第一电子设备在第一预设时长内,未接收到用户对第一提示信息的操作,或者,第一电子设备在第一预设时长内接收到用户对第一提示信息的第二操作,第一电子设备则在蓝牙耳机处理完第二音频业务后,利用蓝牙耳机处理第一音频业务;或者,若第一电子设备在第一预设时长内,未接收到用户对第一提示信息的操作,或者,第一电子设备在第一预设时长内接收到用户对第一提示信息的第二操作,第一电子设备则在蓝牙耳机暂停处理第二音频业务后,利用蓝牙耳机处理第一音频业务;其中,第二操作用于触发第一电子设备不恢复利用蓝牙耳机处理第一音频业务。 In a possible implementation of the first aspect, the method also includes: if the first electronic device does not receive the user's operation on the first prompt information within a first preset time period, or the first electronic device receives the user's second operation on the first prompt information within the first preset time period, the first electronic device uses the Bluetooth headset to process the first audio service after the Bluetooth headset completes processing the second audio service; or, if the first electronic device does not receive the user's operation on the first prompt information within the first preset time period, or the first electronic device receives the user's second operation on the first prompt information within the first preset time period, the first electronic device uses the Bluetooth headset to process the first audio service after the Bluetooth headset suspends processing the second audio service; wherein the second operation is used to trigger the first electronic device to not resume using the Bluetooth headset to process the first audio service.
本方案中,第一提示信息的显示时间需要控制在一定时间,若在该控制时间内,检测到用户对第一提示信息的第一操作,则第二电子设备恢复原本暂停的音频业务,如此,提高了第二电子设备恢复原本暂停的音频业务的效率。且第一电子设备在蓝牙耳机处理完第二音频业务后,无需用户操作,便可以自动恢复利用蓝牙耳机处理第一音频业务,从而提高用户体验。In this solution, the display time of the first prompt information needs to be controlled within a certain time. If the user's first operation on the first prompt information is detected within the control time, the second electronic device resumes the originally suspended audio service, thereby improving the efficiency of the second electronic device in resuming the originally suspended audio service. After the Bluetooth headset processes the second audio service, the first electronic device can automatically resume using the Bluetooth headset to process the first audio service without user operation, thereby improving the user experience.
在第一方面的一种可能的实现方式中,该方法还包括:第一电子设备响应于用户对第一提示信息的第二操作,若第二电子设备在第二预设时长内利用蓝牙耳机处理完第二音频业务,第一电子设备则在蓝牙耳机处理完第二音频业务后,利用蓝牙耳机处理第一音频业务;或者,第一电子设备响应于用户对第一提示信息的第二操作,若第二电子设备在第二预设时长内暂停利用蓝牙耳机处理第二音频业务,第一电子设备则在蓝牙耳机暂停处理第二音频业务后,利用蓝牙耳机处理第一音频业务;其中,第二操作用于触发第一电子设备不恢复利用蓝牙耳机处理第一音频业务。In a possible implementation of the first aspect, the method also includes: the first electronic device responds to the user's second operation on the first prompt information, and if the second electronic device completes processing the second audio service using the Bluetooth headset within a second preset time period, the first electronic device uses the Bluetooth headset to process the first audio service after the Bluetooth headset completes processing the second audio service; or, the first electronic device responds to the user's second operation on the first prompt information, and if the second electronic device suspends processing the second audio service using the Bluetooth headset within the second preset time period, the first electronic device uses the Bluetooth headset to process the first audio service after the Bluetooth headset suspends processing the second audio service; wherein the second operation is used to trigger the first electronic device to not resume processing the first audio service using the Bluetooth headset.
本方案中,第一电子设备在蓝牙耳机处理完第二音频业务后,无需用户操作,便可以自动恢复利用蓝牙耳机处理第一音频业务,从而提高用户体验。In this solution, after the Bluetooth headset has processed the second audio service, the first electronic device can automatically resume processing the first audio service using the Bluetooth headset without user operation, thereby improving user experience.
在第一方面的一种可能的实现方式中,第二电子设备检测到第二音频业务后,请求蓝牙耳机暂停处理第一音频业务,并利用蓝牙耳机处理第二音频业务之后,该方法还包括:第一电子设备利用第一电子设备的音频部件处理第一音频业务。蓝牙耳机暂停处理第一音频业务后,第一电子设备也可以自动处理待处理的第一音频业务,提高音频业务的完成度。In a possible implementation of the first aspect, after the second electronic device detects the second audio service, it requests the Bluetooth headset to suspend processing of the first audio service, and after using the Bluetooth headset to process the second audio service, the method further includes: the first electronic device uses an audio component of the first electronic device to process the first audio service. After the Bluetooth headset suspends processing of the first audio service, the first electronic device may also automatically process the first audio service to be processed, thereby improving the completion of the audio service.
第二方面,提供了一种音频业务处理方法,该方法包括:第二电子设备与蓝牙耳机建立无线通信通道;其中,蓝牙耳机还与第一电子设备建立了无线通信通道,蓝牙耳机处理第一电子设备的第一音频业务;第二电子设备检测到第二音频业务后,判断第二音频业务的业务优先级是否大于第一音频业务的业务优先级;若第二音频业务的业务优先级大于第一音频业务的业务优先级,第二电子设备请求蓝牙耳机暂停处理第一音频业务,利用蓝牙耳机处理第二音频业务。In a second aspect, a method for processing an audio service is provided, the method comprising: a second electronic device establishes a wireless communication channel with a Bluetooth headset; wherein the Bluetooth headset also establishes a wireless communication channel with a first electronic device, and the Bluetooth headset processes a first audio service of the first electronic device; after the second electronic device detects the second audio service, it determines whether the service priority of the second audio service is greater than the service priority of the first audio service; if the service priority of the second audio service is greater than the service priority of the first audio service, the second electronic device requests the Bluetooth headset to suspend processing of the first audio service, and uses the Bluetooth headset to process the second audio service.
本方案中,电子设备可以根据预先设置的业务优先级控制蓝牙耳机处理较重要的音频业务,提高用户体验。In this solution, the electronic device can control the Bluetooth headset to process more important audio services according to the pre-set service priority, thereby improving the user experience.
在第二方面的一种可能的实现方式中,在第二电子设备请求蓝牙耳机暂停处理第一音频业务,利用蓝牙耳机处理第二音频业务,包括:第二电子设备通过蓝牙耳机向第一电子设备发送业务暂停指令其中,业务暂停指令用于指示第一电子设备接收业务暂停指令,停止向蓝牙耳机发送第一音频业务的音频数据;第二电子设备向蓝牙耳机发送第二音频业务的音频数据;蓝牙耳机接收第二音频业务的音频数据,处理第二音频业务。In a possible implementation of the second aspect, the second electronic device requests the Bluetooth headset to suspend processing of the first audio service and uses the Bluetooth headset to process the second audio service, including: the second electronic device sends a service suspension instruction to the first electronic device through the Bluetooth headset, wherein the service suspension instruction is used to instruct the first electronic device to receive the service suspension instruction and stop sending audio data of the first audio service to the Bluetooth headset; the second electronic device sends audio data of the second audio service to the Bluetooth headset; the Bluetooth headset receives the audio data of the second audio service and processes the second audio service.
在第二方面的一种可能的实现方式中,在第二电子设备请求蓝牙耳机暂停处理第一音频业务,并利用蓝牙耳机处理第二音频业务之前,该方法还包括:第二电子设备通过蓝牙耳机接收到第一电子设备指示的第一音频业务的业务优先级。In a possible implementation of the second aspect, before the second electronic device requests the Bluetooth headset to suspend processing of the first audio service and uses the Bluetooth headset to process the second audio service, the method also includes: the second electronic device receives the service priority of the first audio service indicated by the first electronic device through the Bluetooth headset.
第三方面,提供了一种音频业务恢复处理方法,该方法包括:第一电子设备与蓝牙耳机建立无线通信通道;其中,蓝牙耳机与第二电子设备也建立了无线通信通道;In a third aspect, a method for recovering an audio service is provided, the method comprising: establishing a wireless communication channel between a first electronic device and a Bluetooth headset; wherein the Bluetooth headset also establishes a wireless communication channel with a second electronic device;
第一电子设备利用蓝牙耳机处理第一音频业务;第一电子设备在蓝牙耳机处理第 二电子设备的第二音频业务,暂停处理第一音频业务后,显示第一提示信息;其中,第一提示信息用于请求用户确定第一电子设备是否恢复利用蓝牙耳机处理第一音频业务;第二音频业务的业务优先级大于或等于第一音频业务的业务优先级;第一电子设备响应于用户对第一提示信息的第一操作,请求蓝牙耳机暂停处理第二音频业务,并利用蓝牙耳机处理第一音频业务;其中,第一操作用于触发第一电子设备恢复利用蓝牙耳机处理第一音频业务。The first electronic device processes the first audio service using the Bluetooth headset; the first electronic device processes the first audio service using the Bluetooth headset; The second audio service of the second electronic device suspends processing of the first audio service and displays a first prompt message; wherein the first prompt message is used to request the user to determine whether the first electronic device should resume processing the first audio service using the Bluetooth headset; the service priority of the second audio service is greater than or equal to the service priority of the first audio service; the first electronic device responds to the user's first operation on the first prompt message, requests the Bluetooth headset to suspend processing of the second audio service, and uses the Bluetooth headset to process the first audio service; wherein the first operation is used to trigger the first electronic device to resume processing the first audio service using the Bluetooth headset.
在第三方面的一种可能的实现方式中,在第一电子设备在蓝牙耳机处理第二电子设备的第二音频业务,暂停处理第一音频业务后,显示第一提示信息之前,方法还包括:第一电子设备通过蓝牙耳机向第二电子设备指示第一音频业务的业务优先级。In a possible implementation of the third aspect, after the first electronic device processes the second audio service of the second electronic device in the Bluetooth headset and suspends processing of the first audio service, but before displaying the first prompt information, the method also includes: the first electronic device indicates the service priority of the first audio service to the second electronic device through the Bluetooth headset.
在第三方面的一种可能的实现方式中,在第一电子设备利用蓝牙耳机处理第一音频业务之后,第一电子设备在蓝牙耳机处理第二电子设备的第二音频业务,暂停处理第一音频业务后,显示第一提示信息之前,该方法还包括:第一电子设备通过蓝牙耳机接收来自第二电子设备的业务暂停指令,业务暂停指令用于指示第二音频业务的业务优先级;若业务暂停指令指示的第二音频业务的业务优先级大于第一音频业务的业务优先级,第一电子设备停止向蓝牙耳机发送第一音频业务的音频数据。In a possible implementation of the third aspect, after the first electronic device processes the first audio service using a Bluetooth headset, the first electronic device processes the second audio service of the second electronic device through the Bluetooth headset, and after suspending processing of the first audio service and before displaying the first prompt information, the method also includes: the first electronic device receives a service pause instruction from the second electronic device through the Bluetooth headset, the service pause instruction is used to indicate the service priority of the second audio service; if the service priority of the second audio service indicated by the service pause instruction is greater than the service priority of the first audio service, the first electronic device stops sending audio data of the first audio service to the Bluetooth headset.
在第三方面的一种可能的实现方式中,第一电子设备响应于用户对第一提示信息的第一操作,请求蓝牙耳机暂停处理第二音频业务,并利用蓝牙耳机处理第一音频业务,包括:若第一电子设备在第一预设时长内,接收到用户对第一提示信息的第一操作,第一电子设备则响应于第一操作,请求蓝牙耳机暂停处理第二音频业务,并利用蓝牙耳机处理第一音频业务。In a possible implementation of the third aspect, the first electronic device, in response to the user's first operation on the first prompt information, requests the Bluetooth headset to suspend processing the second audio service, and uses the Bluetooth headset to process the first audio service, including: if the first electronic device receives the user's first operation on the first prompt information within a first preset time period, the first electronic device, in response to the first operation, requests the Bluetooth headset to suspend processing the second audio service, and uses the Bluetooth headset to process the first audio service.
在第三方面的一种可能的实现方式中,该方法还包括:若第一电子设备在第一预设时长内,未接收到用户对第一提示信息的操作,或者,第一电子设备在第一预设时长内接收到用户对第一提示信息的第二操作,第一电子设备则在蓝牙耳机处理完第二音频业务后,利用蓝牙耳机处理第一音频业务;或者,若第一电子设备在第一预设时长内,未接收到用户对第一提示信息的操作,或者,第一电子设备在第一预设时长内接收到用户对第一提示信息的第二操作,第一电子设备则在蓝牙耳机暂停处理第二音频业务后,利用蓝牙耳机处理第一音频业务;其中,第二操作用于触发第一电子设备不恢复利用蓝牙耳机处理第一音频业务。In a possible implementation of the third aspect, the method also includes: if the first electronic device does not receive the user's operation on the first prompt information within a first preset time period, or the first electronic device receives the user's second operation on the first prompt information within the first preset time period, the first electronic device uses the Bluetooth headset to process the first audio service after the Bluetooth headset completes processing the second audio service; or, if the first electronic device does not receive the user's operation on the first prompt information within the first preset time period, or the first electronic device receives the user's second operation on the first prompt information within the first preset time period, the first electronic device uses the Bluetooth headset to process the first audio service after the Bluetooth headset suspends processing the second audio service; wherein the second operation is used to trigger the first electronic device not to resume using the Bluetooth headset to process the first audio service.
在第三方面的一种可能的实现方式中,该方法还包括:第一电子设备响应于用户对第一提示信息的第二操作,若第二电子设备在第二预设时长内利用蓝牙耳机处理完第二音频业务,第一电子设备则在蓝牙耳机处理完第二音频业务后,利用蓝牙耳机处理第一音频业务;或者,第一电子设备响应于用户对第一提示信息的第二操作,若第二电子设备在第二预设时长内暂停利用蓝牙耳机处理第二音频业务,第一电子设备则在蓝牙耳机暂停处理第二音频业务后,利用蓝牙耳机处理第一音频业务;其中,第二操作用于触发第一电子设备不恢复利用蓝牙耳机处理第一音频业务。In a possible implementation of the third aspect, the method also includes: the first electronic device responds to the user's second operation on the first prompt information, and if the second electronic device completes processing the second audio service using the Bluetooth headset within a second preset time period, the first electronic device uses the Bluetooth headset to process the first audio service after the Bluetooth headset completes processing the second audio service; or, the first electronic device responds to the user's second operation on the first prompt information, and if the second electronic device suspends processing the second audio service using the Bluetooth headset within the second preset time period, the first electronic device uses the Bluetooth headset to process the first audio service after the Bluetooth headset suspends processing the second audio service; wherein the second operation is used to trigger the first electronic device to not resume processing the first audio service using the Bluetooth headset.
在第三方面的一种可能的实现方式中,第二电子设备检测到第二音频业务后,请求蓝牙耳机暂停处理第一音频业务,并利用蓝牙耳机处理第二音频业务之后,该方法还包括:第一电子设备利用第一电子设备的音频部件处理第一音频业务。In a possible implementation of the third aspect, after the second electronic device detects the second audio service, it requests the Bluetooth headset to suspend processing the first audio service, and after using the Bluetooth headset to process the second audio service, the method also includes: the first electronic device uses the audio component of the first electronic device to process the first audio service.
第四方面,提供了一种电子设备,该电子设备包括处理器和存储器;存储器用于 存储代码指令;处理器用于运行代码指令,以执行如第一方面、第二方面和第三方面中任一种可能的设计方式中的天线控制方法。In a fourth aspect, an electronic device is provided, the electronic device comprising a processor and a memory; the memory is used to Code instructions are stored; the processor is used to run the code instructions to execute the antenna control method in any possible design manner as in the first aspect, the second aspect and the third aspect.
第五方面,提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当指令在计算机上运行时,使得计算机执行如第一方面、第二方面和第三方面中任一种可能的设计方式中的天线控制方法。In a fifth aspect, a computer-readable storage medium is provided, which stores instructions. When the instructions are executed on a computer, the computer executes an antenna control method in any possible design method in the first aspect, the second aspect, and the third aspect.
其中,第二方面、第三方面和第四方面中任一种设计方式所带来的技术效果可参见第一方面中不同设计方式所带来的技术效果,此处不再赘述。Among them, the technical effects brought about by any design method in the second aspect, the third aspect and the fourth aspect can refer to the technical effects brought about by different design methods in the first aspect, and will not be repeated here.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1根据本申请的一些实施例,示出了一种平板300的结构示意图;FIG1 shows a schematic structural diagram of a tablet 300 according to some embodiments of the present application;
图2根据本申请的一些实施例,示出了一种音频业务处理方法的应用场景示意图;FIG2 shows a schematic diagram of an application scenario of an audio service processing method according to some embodiments of the present application;
图3根据本申请的一些实施例,示出了一种音频业务处理方法的应用场景示意图;FIG3 shows a schematic diagram of an application scenario of an audio service processing method according to some embodiments of the present application;
图4根据本申请的一些实施例,示出了一种音频业务处理方法的应用场景示意图;FIG4 shows a schematic diagram of an application scenario of an audio service processing method according to some embodiments of the present application;
图5根据本申请的一些实施例,示出了一种音频业务处理方法的应用场景示意图;FIG5 shows a schematic diagram of an application scenario of an audio service processing method according to some embodiments of the present application;
图6根据本申请的一些实施例,示出了一种适用于本申请的手机200和平板300的软件结构框图;FIG6 shows a software structure block diagram of a mobile phone 200 and a tablet 300 applicable to the present application according to some embodiments of the present application;
图7根据本申请的一些实施例,示出了一种音频策略引擎的结构示意图;FIG7 shows a schematic diagram of the structure of an audio strategy engine according to some embodiments of the present application;
图8根据本申请的一些实施例,对应于图4,示出了一种音频业务处理方法的流程示意图;FIG8 , corresponding to FIG4 , shows a schematic flow chart of an audio service processing method according to some embodiments of the present application;
图9根据本申请的一些实施例,示出了一种通知管理界面的示意图;FIG9 is a schematic diagram showing a notification management interface according to some embodiments of the present application;
图10根据本申请的一些实施例,示出了一种蓝牙耳机100的结构示意图;FIG10 shows a schematic structural diagram of a Bluetooth headset 100 according to some embodiments of the present application;
图11根据本申请的一些实施例,示出了一种手机200的软件结构框图;FIG11 shows a software structure block diagram of a mobile phone 200 according to some embodiments of the present application;
图12根据本申请的一些实施例,示出了一种音频业务恢复处理方法的应用场景示意图;FIG12 shows a schematic diagram of an application scenario of an audio service recovery processing method according to some embodiments of the present application;
图13根据本申请的一些实施例,示出了一种“一键抢回”窗口的操作界面示意图;FIG13 shows a schematic diagram of an operation interface of a “one-key reclaim” window according to some embodiments of the present application;
图14根据本申请的一些实施例,示出了一种音频业务恢复处理方法的应用场景示意图;FIG14 shows a schematic diagram of an application scenario of an audio service recovery processing method according to some embodiments of the present application;
图15根据本申请的一些实施例,示出了一种音频业务恢复处理方法的应用场景示意图;FIG15 shows a schematic diagram of an application scenario of an audio service recovery processing method according to some embodiments of the present application;
图16根据本申请的一些实施例,示出了一种能够实现本申请实施例提供的音频业务恢复处理方法的手机200和平板300的功能模块示意图;FIG. 16 shows a functional module diagram of a mobile phone 200 and a tablet 300 that can implement the audio service recovery processing method provided in an embodiment of the present application according to some embodiments of the present application;
图17根据本申请的一些实施例,对应于图12,示出了一种发生音频业务抢占事件时,被抢占音频业务的手机200各模块交互逻辑示意图;FIG. 17 , corresponding to FIG. 12 , shows a schematic diagram of the interaction logic of various modules of the mobile phone 200 whose audio service is preempted when an audio service preemption event occurs according to some embodiments of the present application;
图18根据本申请的一些实施例,对应于图14,示出了一种被抢占音频业务的手机200恢复利用蓝牙耳机100播放音乐的交互逻辑示意图;FIG. 18 , corresponding to FIG. 14 , shows an interactive logic diagram of a mobile phone 200 whose audio service is seized resuming to play music using a Bluetooth headset 100 according to some embodiments of the present application;
图19根据本申请的一些实施例,示出了一种平板300播放音乐暂停时,蓝牙耳机100处于空闲状态,手机200恢复利用蓝牙耳机100播放音乐的交互逻辑示意图;FIG. 19 is a schematic diagram of an interaction logic when the tablet 300 pauses playing music and the Bluetooth headset 100 is in an idle state, and the mobile phone 200 resumes playing music using the Bluetooth headset 100 according to some embodiments of the present application;
图20根据本申请的一些实施例,对应于图2、图3、图12和图14对应的应用场 景,示出了一种音频业务恢复处理方法的流程示意图。FIG. 20 corresponds to the application scenarios corresponding to FIG. 2, FIG. 3, FIG. 12 and FIG. 14 according to some embodiments of the present application , which shows a flow chart of an audio service recovery processing method.
具体实施方式Detailed ways
本申请的说明性实施例包括但不限于一种音频业务处理方法、音频设备及存储介质。The illustrative embodiments of the present application include, but are not limited to, an audio service processing method, an audio device, and a storage medium.
下面结合附图,对本申请的实施例进行描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。本领域普通技术人员可知,随着技术的发展和新场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。The following describes the embodiments of the present application in conjunction with the accompanying drawings. Obviously, the described embodiments are only embodiments of a part of the present application, rather than all embodiments. It is known to those skilled in the art that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
如前文背景技术所述,若蓝牙耳机出现业务冲突时,蓝牙耳机因为只能作为一个音频业务的音频输出设备,而搁置另一个电子设备的音频业务,无法及时完成其他电子设备发送的音频业务。若其他电子设备发送的音频业务较重要,蓝牙耳机无法及时完成较重要的音频业务,用户体验较差。As described in the background technology above, if a service conflict occurs in a Bluetooth headset, the Bluetooth headset can only be used as an audio output device for an audio service, and the audio service of another electronic device will be put on hold, and the audio service sent by other electronic devices cannot be completed in time. If the audio service sent by other electronic devices is more important, the Bluetooth headset cannot complete the more important audio service in time, and the user experience is poor.
为了解决上述技术问题,本申请实施例提供一种音频业务处理方法,该方法包括:电子设备1和电子设备2均与蓝牙耳机建立无线通信通道。若电子设备1正在利用蓝牙耳机处理音频业务1,此时,电子设备2又检测到音频业务2后,会先判断音频业务2的业务优先级是否大于或者等于音频业务1的业务优先级。若电子设备2判断出音频业务2的业务优先级大于或者等于音频业务1的业务优先级,则会请求蓝牙耳机暂停处理音频业务1,利用蓝牙耳机处理音频业务2。于是,蓝牙耳机便会暂停处理音频业务1,处理音频业务2。In order to solve the above technical problems, an embodiment of the present application provides an audio service processing method, which includes: electronic device 1 and electronic device 2 both establish wireless communication channels with a Bluetooth headset. If electronic device 1 is using a Bluetooth headset to process audio service 1, at this time, after electronic device 2 detects audio service 2, it will first determine whether the service priority of audio service 2 is greater than or equal to the service priority of audio service 1. If electronic device 2 determines that the service priority of audio service 2 is greater than or equal to the service priority of audio service 1, it will request the Bluetooth headset to suspend processing of audio service 1 and use the Bluetooth headset to process audio service 2. As a result, the Bluetooth headset will suspend processing of audio service 1 and process audio service 2.
本申请实施例中,不同音频业务可以对应不同的优先级,优先级较高的音频业务通常是重要的、关键的音频业务,优先级较高的音频业务可以被蓝牙耳机优先处理。示例性的,音频业务可以包括多种类型,例如音频业务可以包括通话业务、多媒体业务、通知提示业务等。通话业务可以包括在电话呼叫(包括电话呼入和电话呼出)、视频通话、音频通话、语音消息、游戏或语音助手等场景下,为用户播放对端的语音数据,或者采集用户的语音数据发送给对端,以及播放来电铃声等。多媒体业务可以包括播放音乐、视频、录音、游戏的背景音乐、文本转语音的声音等。通知提示业务可以包括播放短信提示音、推送通知提示音、闹钟铃声、系统声音(例如调节音量时的声音、拍摄时的快门声音等)。通知提示业务、多媒体业务以及通话业务的优先级依次升高。在其他实施方式中,音频业务可以包括更多的类型,在此不做具体限制。其中,音频业务的优先级可以是预先设置的,也可以用户主动设置的,在此不做具体限制。例如,通话业务的业务优先级大于多媒体业务的业务优先级,多媒体业务的业务优先级大于通知提示业务的业务优先级。In the embodiment of the present application, different audio services may correspond to different priorities. Audio services with higher priorities are usually important and critical audio services. Audio services with higher priorities can be processed preferentially by Bluetooth headsets. Exemplarily, audio services may include multiple types, for example, audio services may include call services, multimedia services, notification services, etc. Call services may include playing the voice data of the other end for the user in scenarios such as phone calls (including incoming and outgoing calls), video calls, audio calls, voice messages, games or voice assistants, or collecting the user's voice data and sending it to the other end, as well as playing incoming call ringtones, etc. Multimedia services may include playing music, videos, recordings, background music of games, text-to-speech sounds, etc. Notification services may include playing SMS prompts, push notification prompts, alarm ringtones, system sounds (such as sounds when adjusting the volume, shutter sounds when shooting, etc.). The priorities of notification services, multimedia services, and call services increase in sequence. In other embodiments, audio services may include more types, which are not specifically limited here. Among them, the priority of the audio service may be pre-set or actively set by the user, which is not specifically limited here. For example, the service priority of the call service is higher than the service priority of the multimedia service, and the service priority of the multimedia service is higher than the service priority of the notification service.
如此,电子设备可以根据预先设置的业务优先级控制蓝牙耳机处理较重要的音频业务,提高用户体验。In this way, the electronic device can control the Bluetooth headset to process more important audio services according to the pre-set service priority, thereby improving the user experience.
示例性的,本申请实施例中的电子设备(如电子设备1和电子设备2)可以为手机、媒体播放器(例如MP3、MP4等)、平板电脑、笔记本电脑、超级移动个人计算机(ultra-mo bile personal computer,UMPC)、个人数字助理(personal digital assistant,PDA)、电视或智能手表等设备。本申请实施例对电子设备的具体形态不做特殊限制。电子设备1即第一电子设备,电子设备2即第二电子设备。 For example, the electronic devices (such as electronic device 1 and electronic device 2) in the embodiments of the present application may be mobile phones, media players (such as MP3, MP4, etc.), tablet computers, laptop computers, ultra-mobile personal computers (UMPC), personal digital assistants (PDA), televisions, smart watches, and other devices. The embodiments of the present application do not impose any special restrictions on the specific form of the electronic devices. Electronic device 1 is the first electronic device, and electronic device 2 is the second electronic device.
本申请实施例以电子设备1为平板(如平板300)为例进行说明。图1根据本申请的一些实施例,示出了一种平板300的结构示意图。The embodiments of the present application are described by taking the electronic device 1 as a tablet (such as the tablet 300) as an example. Fig. 1 shows a schematic diagram of the structure of a tablet 300 according to some embodiments of the present application.
如图1所示,平板300可以包括处理器310,外部存储器接口320,内部存储器321,通用串行总线(universal serial bus,USB)接口330,充电管理模块340,电源管理模块341,电池342,天线1,天线2,移动通信模块350,无线通信模块360,音频模块370,扬声器370A,受话器370B,麦克风370C,耳机接口370D,传感器模块380,按键390,马达391,指示器392,摄像头393,显示屏(触摸屏)394,以及用户标识模块(subscriber identification module,SIM)卡接口395等。As shown in FIG1 , the tablet 300 may include a processor 310, an external memory interface 320, an internal memory 321, a universal serial bus (USB) interface 330, a charging management module 340, a power management module 341, a battery 342, an antenna 1, an antenna 2, a mobile communication module 350, a wireless communication module 360, an audio module 370, a speaker 370A, a receiver 370B, a microphone 370C, an earphone interface 370D, a sensor module 380, a button 390, a motor 391, an indicator 392, a camera 393, a display screen (touch screen) 394, and a subscriber identification module (SIM) card interface 395, etc.
其中,上述传感器模块380可以包括压力传感器,陀螺仪传感器,气压传感器,磁传感器,加速度传感器,距离传感器,接近光传感器,指纹传感器,温度传感器,触摸传感器,环境光传感器和骨传导传感器等传感器。Among them, the above-mentioned sensor module 380 may include sensors such as pressure sensor, gyroscope sensor, air pressure sensor, magnetic sensor, acceleration sensor, distance sensor, proximity light sensor, fingerprint sensor, temperature sensor, touch sensor, ambient light sensor and bone conduction sensor.
可以理解的是,本实施例示意的结构并不构成对平板300的具体限定。在另一些实施例中,平板300可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It is understood that the structure shown in this embodiment does not constitute a specific limitation on the tablet 300. In other embodiments, the tablet 300 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
处理器310可以包括一个或多个处理单元,例如:处理器310可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 310 may include one or more processing units, for example, the processor 310 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
控制器可以是平板300的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the tablet 300. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
处理器310中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器310中的存储器为高速缓冲存储器。该存储器可以保存处理器310刚用过或循环使用的指令或数据。如果处理器310需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器310的等待时间,因而提高了系统的效率。本申请实施例中,电子设备1和电子设备2均与蓝牙耳机建立无线通信通道。若电子设备1正在利用蓝牙耳机处理音频业务1,此时,处理器310又检测到音频业务2后,会先判断音频业务2的业务优先级是否大于或者等于音频业务1的业务优先级。若处理器310判断出音频业务2的业务优先级大于或者等于音频业务1的业务优先级,则会请求蓝牙耳机暂停处理音频业务1,利用蓝牙耳机处理音频业务2。于是,蓝牙耳机便会暂停处理音频业务1,处理音频业务2。A memory may also be provided in the processor 310 for storing instructions and data. In some embodiments, the memory in the processor 310 is a cache memory. The memory may store instructions or data that the processor 310 has just used or cyclically used. If the processor 310 needs to use the instruction or data again, it may be directly called from the memory. Repeated access is avoided, and the waiting time of the processor 310 is reduced, thereby improving the efficiency of the system. In the embodiment of the present application, both the electronic device 1 and the electronic device 2 establish a wireless communication channel with the Bluetooth headset. If the electronic device 1 is using the Bluetooth headset to process the audio service 1, at this time, after the processor 310 detects the audio service 2 again, it will first determine whether the service priority of the audio service 2 is greater than or equal to the service priority of the audio service 1. If the processor 310 determines that the service priority of the audio service 2 is greater than or equal to the service priority of the audio service 1, it will request the Bluetooth headset to suspend the processing of the audio service 1, and use the Bluetooth headset to process the audio service 2. Then, the Bluetooth headset will suspend the processing of the audio service 1 and process the audio service 2.
在一些实施例中,处理器310可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity  module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 310 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (Subscriber Identity Module) interface, a general-purpose input/output (GPIO ... module, SIM) interface, and/or universal serial bus (USB) interface, etc.
可以理解的是,本实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对平板300的结构限定。在另一些实施例中,平板300也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It is understandable that the interface connection relationship between the modules shown in this embodiment is only a schematic illustration and does not constitute a structural limitation on the tablet 300. In other embodiments, the tablet 300 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
充电管理模块340用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。充电管理模块340为电池342充电的同时,还可以通过电源管理模块341为电子设备供电。The charging management module 340 is used to receive charging input from a charger. The charger can be a wireless charger or a wired charger. While the charging management module 340 is charging the battery 342, it can also power the electronic device through the power management module 341.
电源管理模块341用于连接电池342,充电管理模块340与处理器310。电源管理模块341接收电池342和/或充电管理模块340的输入,为处理器310,内部存储器321,外部存储器,显示屏394,摄像头393,和无线通信模块360等供电。在一些实施例中,电源管理模块341和充电管理模块340也可以设置于同一个器件中。The power management module 341 is used to connect the battery 342, the charging management module 340 and the processor 310. The power management module 341 receives input from the battery 342 and/or the charging management module 340, and supplies power to the processor 310, the internal memory 321, the external memory, the display screen 394, the camera 393, and the wireless communication module 360. In some embodiments, the power management module 341 and the charging management module 340 can also be set in the same device.
平板300的无线通信功能可以通过天线1,天线2,移动通信模块350,无线通信模块360,调制解调处理器以及基带处理器等实现。在一些实施例中,平板300的天线1和移动通信模块350耦合,天线2和无线通信模块360耦合,使得平板300可以通过无线通信技术与网络以及其他设备通信。The wireless communication function of the tablet 300 can be implemented through antenna 1, antenna 2, mobile communication module 350, wireless communication module 360, modem processor and baseband processor. In some embodiments, the antenna 1 of the tablet 300 is coupled with the mobile communication module 350, and the antenna 2 is coupled with the wireless communication module 360, so that the tablet 300 can communicate with the network and other devices through wireless communication technology.
天线1和天线2用于发射和接收电磁波信号。平板300中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如,可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the flat panel 300 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
移动通信模块350可以提供应用在平板300上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块350可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块350可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。The mobile communication module 350 can provide solutions for wireless communications including 2G/3G/4G/5G, etc., applied to the tablet 300. The mobile communication module 350 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 350 can receive electromagnetic waves from the antenna 1, and filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
移动通信模块350还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块350的至少部分功能模块可以被设置于处理器310中。在一些实施例中,移动通信模块350的至少部分功能模块可以与处理器310的至少部分模块被设置在同一个器件中。The mobile communication module 350 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some functional modules of the mobile communication module 350 can be set in the processor 310. In some embodiments, at least some functional modules of the mobile communication module 350 can be set in the same device as at least some modules of the processor 310.
无线通信模块360可以提供应用在平板300上的包括WLAN(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。平板300可以利用无线通信模块360与蓝牙耳机建立无线通信通道。具体地,平板300可以包括蓝牙模块,平板300可以利用蓝牙模块与蓝牙耳机建立蓝牙通信通道,并由该蓝牙通信通道与蓝牙耳机进行指令和/或数据的传输。其中,指令可以是暂停音频业务请求,处理音频业务请求等。数据可以是各种类型的音频数据。The wireless communication module 360 can provide wireless communication solutions including WLAN (such as wireless fidelity (Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and the like applied on the tablet 300. The tablet 300 can establish a wireless communication channel with a Bluetooth headset using the wireless communication module 360. Specifically, the tablet 300 can include a Bluetooth module, and the tablet 300 can establish a Bluetooth communication channel with a Bluetooth headset using the Bluetooth module, and transmit instructions and/or data with the Bluetooth headset through the Bluetooth communication channel. Among them, the instruction can be to pause an audio service request, process an audio service request, etc. The data can be various types of audio data.
无线通信模块360可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块360经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器310。无线通信模块360还可以从处理器310接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。 The wireless communication module 360 may be one or more devices integrating at least one communication processing module. The wireless communication module 360 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 310. The wireless communication module 360 may also receive a signal to be sent from the processor 310, modulate the signal, amplify the signal, and convert it into an electromagnetic wave for radiation via the antenna 2.
平板300通过GPU,显示屏394,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏394和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器310可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The tablet 300 implements the display function through a GPU, a display screen 394, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 394 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 310 may include one or more GPUs, which execute program instructions to generate or change display information.
显示屏394用于显示图像,视频等。该显示屏394包括显示面板。The display screen 394 is used to display images, videos, etc. The display screen 394 includes a display panel.
平板300可以通过ISP,摄像头393,视频编解码器,GPU,显示屏394以及应用处理器等实现拍摄功能。ISP用于处理摄像头393反馈的数据。摄像头393用于捕获静态图像或视频。在一些实施例中,平板300可以包括1个或N个摄像头393,N为大于1的正整数。The tablet 300 can realize the shooting function through the ISP, the camera 393, the video codec, the GPU, the display screen 394 and the application processor. The ISP is used to process the data fed back by the camera 393. The camera 393 is used to capture a static image or a video. In some embodiments, the tablet 300 may include 1 or N cameras 393, where N is a positive integer greater than 1.
外部存储器接口320可以用于连接外部存储卡,例如Micro SD卡,实现扩展平板300的存储能力。外部存储卡通过外部存储器接口320与处理器310通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 320 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the tablet 300. The external memory card communicates with the processor 310 through the external memory interface 320 to implement a data storage function. For example, files such as music and videos can be saved in the external memory card.
内部存储器321可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器310通过运行存储在内部存储器321的指令,从而执行平板300的各种功能应用以及数据处理。例如,在本申请实施例中,处理器310可以通过执行存储在内部存储器321中的指令,内部存储器321可以包括存储程序区和存储数据区。The internal memory 321 may be used to store computer executable program codes, which include instructions. The processor 310 executes various functional applications and data processing of the tablet 300 by running the instructions stored in the internal memory 321. For example, in an embodiment of the present application, the processor 310 may execute the instructions stored in the internal memory 321, and the internal memory 321 may include a program storage area and a data storage area.
其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,业务抢占功能等)等。存储数据区可存储平板300使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器321可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。The program storage area may store an operating system, an application required for at least one function (such as a sound playback function, a service preemption function, etc.), etc. The data storage area may store data created during the use of the tablet 300 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 321 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
平板300可以通过音频模块370,扬声器370A,受话器370B,麦克风370C,耳机接口370D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The tablet 300 can implement audio functions such as music playing and recording through the audio module 370, the speaker 370A, the receiver 370B, the microphone 370C, the headphone jack 370D, and the application processor.
按键390包括开机键,音量键等。按键390可以是机械按键。也可以是触摸式按键。马达391可以产生振动提示。马达391可以用于来电振动提示,也可以用于触摸振动反馈。指示器392可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。SIM卡接口395用于连接SIM卡。SIM卡可以通过插入SIM卡接口395,或从SIM卡接口395拔出,实现和平板300的接触和分离。平板300可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口395可以支持Nano SIM卡,Micro SIM卡,SIM卡等。The button 390 includes a power button, a volume button, etc. The button 390 can be a mechanical button. It can also be a touch button. The motor 391 can generate a vibration prompt. The motor 391 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. The indicator 392 can be an indicator light, which can be used to indicate the charging status, power changes, messages, missed calls, notifications, etc. The SIM card interface 395 is used to connect the SIM card. The SIM card can be inserted into the SIM card interface 395, or pulled out from the SIM card interface 395 to achieve contact and separation with the tablet 300. The tablet 300 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 395 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.
可以理解,手机200的结构与平板300的结构相同,也可以不相同,在此不再赘述。It can be understood that the structure of the mobile phone 200 may be the same as or different from that of the tablet 300, and will not be described in detail here.
示例性的,本申请实施例中,以电子设备1(即第一电子设备)是手机200,电子设备2(即第二电子设备)是平板300,蓝牙耳机是蓝牙耳机100为例,介绍本申请实施例的方法。其中,音频业务1是第一音频业务,音频业务2是第二音频业务。For example, in the embodiment of the present application, the method of the embodiment of the present application is introduced by taking the electronic device 1 (i.e., the first electronic device) as a mobile phone 200, the electronic device 2 (i.e., the second electronic device) as a tablet 300, and the Bluetooth headset as a Bluetooth headset 100 as an example. Among them, the audio service 1 is the first audio service, and the audio service 2 is the second audio service.
例如,图2根据本申请的一些实施例,示出了一种音频业务处理方法的应用场景示意图。图3根据本申请的一些实施例,示出了一种音频业务处理方法的应用场景示意图。For example, Fig. 2 shows a schematic diagram of an application scenario of an audio service processing method according to some embodiments of the present application. Fig. 3 shows a schematic diagram of an application scenario of an audio service processing method according to some embodiments of the present application.
如图2所示,该应用场景包括手机200、平板300、用户以及用户佩戴的蓝牙耳机 100。手机200、平板300均与蓝牙耳机100建立无线通信通道。其中,手机200利用蓝牙耳机100处理音频业务1,例如,利用蓝牙耳机100播放音乐。之后,如图3所示,平板300可能会检测到音乐业务2,例如,平板300可能会需要利用蓝牙耳机100播放音乐。此时,音频业务2的业务优先级可能大于或等于音频业务1的业务优先级。例如,在音频业务2为播放音乐,音频业务1为播放音乐的情况下,音频业务2的业务优先级等于音频业务1的业务优先级。本申请实施例后续介绍各音频业务的优先级的高低,此处不予赘述。As shown in FIG2 , the application scenario includes a mobile phone 200, a tablet 300, a user, and a Bluetooth headset worn by the user. 100. Both the mobile phone 200 and the tablet 300 establish wireless communication channels with the Bluetooth headset 100. Among them, the mobile phone 200 uses the Bluetooth headset 100 to process audio service 1, for example, using the Bluetooth headset 100 to play music. Afterwards, as shown in Figure 3, the tablet 300 may detect music service 2, for example, the tablet 300 may need to use the Bluetooth headset 100 to play music. At this time, the service priority of audio service 2 may be greater than or equal to the service priority of audio service 1. For example, when audio service 2 is playing music and audio service 1 is playing music, the service priority of audio service 2 is equal to the service priority of audio service 1. The subsequent embodiments of the present application will introduce the priority of each audio service, which will not be repeated here.
在平板300判断音频业务2的业务优先级大于或者等于音频业务1的业务优先级的情况下,平板300可以请求蓝牙耳机100暂停处理音频业务1(如播放手机200的音乐),并利用蓝牙耳机100处理音频业务2(如播放平板300的音乐)。此时,手机200的音频业务1被平板300的音频业务2抢占。其中,手机200、平板300可以分别与蓝牙耳机100之间通过实体连接建立无线通信通道,实体连接可以包括无线连接中的异步链路(asynchronous connection-oriented link,ACL)连接。When the tablet 300 determines that the service priority of audio service 2 is greater than or equal to the service priority of audio service 1, the tablet 300 may request the Bluetooth headset 100 to suspend processing of audio service 1 (such as playing music of the mobile phone 200) and use the Bluetooth headset 100 to process audio service 2 (such as playing music of the tablet 300). At this time, the audio service 1 of the mobile phone 200 is preempted by the audio service 2 of the tablet 300. Among them, the mobile phone 200 and the tablet 300 can respectively establish a wireless communication channel with the Bluetooth headset 100 through a physical connection, and the physical connection can include an asynchronous link (asynchronous connection-oriented link, ACL) connection in the wireless connection.
又如,图4根据本申请的一些实施例,示出了一种音频业务处理方法的应用场景示意图。如图4所示,该应用场景包括手机200、平板300、用户以及用户佩戴的蓝牙耳机100。其中,如图2所示,手机200利用蓝牙耳机100处理音频业务1,例如,利用蓝牙耳机100播放音乐。之后,如图4所示,平板300可能会检测到音乐业务2,例如,平板300可能会接收到来电,需要利用蓝牙耳机100接听电话。此时,音频业务2的业务优先级可能大于或等于音频业务1的业务优先级。例如,在音频业务2为接听来电,音频业务1为播放音乐的情况下,音频业务2的业务优先级高于音频业务1的业务优先级。As another example, FIG4 shows a schematic diagram of an application scenario of an audio service processing method according to some embodiments of the present application. As shown in FIG4, the application scenario includes a mobile phone 200, a tablet 300, a user, and a Bluetooth headset 100 worn by the user. Among them, as shown in FIG2, the mobile phone 200 uses the Bluetooth headset 100 to process audio service 1, for example, using the Bluetooth headset 100 to play music. Afterwards, as shown in FIG4, the tablet 300 may detect music service 2, for example, the tablet 300 may receive an incoming call and needs to answer the call using the Bluetooth headset 100. At this time, the service priority of audio service 2 may be greater than or equal to the service priority of audio service 1. For example, when audio service 2 is answering an incoming call and audio service 1 is playing music, the service priority of audio service 2 is higher than the service priority of audio service 1.
在平板300判断音频业务2的业务优先级大于或者等于音频业务1的业务优先级的情况下,平板300可以请求蓝牙耳机100暂停处理音频业务1(如播放手机200的音乐),并利用蓝牙耳机100处理音频业务2(如接听平板300的来电)。此时,手机200的音频业务1被平板300的音频业务2抢占。When the tablet 300 determines that the service priority of audio service 2 is greater than or equal to the service priority of audio service 1, the tablet 300 can request the Bluetooth headset 100 to suspend processing of audio service 1 (such as playing music from the mobile phone 200) and use the Bluetooth headset 100 to process audio service 2 (such as answering a call from the tablet 300). At this time, the audio service 1 of the mobile phone 200 is preempted by the audio service 2 of the tablet 300.
如此,平板300可以根据预先设置的业务优先级控制蓝牙耳机处理较重要的音频业务,提高用户体验。In this way, the tablet 300 can control the Bluetooth headset to process more important audio services according to the pre-set service priority, thereby improving the user experience.
虽然前述方案中考虑到了音频业务的业务优先级,提高了用户体验。但是,若蓝牙耳机出现业务冲突时,蓝牙耳机只会处理业务优先级较高的一个音频业务,而暂停处理业务优先级较低的其他音频业务,业务优先级较低的其他音频业务被搁置未处理,也会影响用户体验。Although the above solution takes the priority of audio services into consideration and improves the user experience, if a service conflict occurs in the Bluetooth headset, the Bluetooth headset will only process an audio service with a higher service priority, and suspend the processing of other audio services with lower service priorities. Other audio services with lower service priorities will be shelved and not processed, which will also affect the user experience.
为了解决该技术问题,在本申请实施例提供的音频业务处理方法中,电子设备2请求蓝牙耳机暂停处理音频业务1,并利用蓝牙耳机处理音频业务2之后,该方法还包括:电子设备1利用自身的音频部件处理音频业务1。如此,在蓝牙耳机与多个电子设备连接,多个音频业务并发给蓝牙耳机的情况下,多个音频业务可以被分配给相应的音频播放设备,解决了多个音频业务并发下的合适的音频播放设备选择问题,提高了用户体验。In order to solve this technical problem, in the audio service processing method provided in the embodiment of the present application, after the electronic device 2 requests the Bluetooth headset to suspend processing of the audio service 1 and uses the Bluetooth headset to process the audio service 2, the method further includes: the electronic device 1 uses its own audio component to process the audio service 1. In this way, when the Bluetooth headset is connected to multiple electronic devices and multiple audio services are sent to the Bluetooth headset in parallel, the multiple audio services can be allocated to the corresponding audio playback devices, which solves the problem of selecting a suitable audio playback device under the concurrent transmission of multiple audio services and improves the user experience.
例如,对于图4中的应用场景,平板300请求蓝牙耳机100暂停播放手机200的音乐,利用蓝牙耳机100播放平板300的通话,蓝牙耳机100暂停播放手机200的音 乐,播放平板300的通话后,手机200利用自身的扬声器、插拔耳机或受话器等播放音乐。For example, for the application scenario in FIG. 4 , the tablet 300 requests the Bluetooth headset 100 to pause playing the music of the mobile phone 200, and uses the Bluetooth headset 100 to play the call of the tablet 300, and the Bluetooth headset 100 pauses playing the music of the mobile phone 200. After playing the call on the tablet 300, the mobile phone 200 plays the music using its own speaker, plugging in or unplugging headphones or a receiver.
在一些实施例中,平板300检测到音频业务2后,请求蓝牙耳机100暂停处理音频业务1,并利用蓝牙耳机100处理音频业务2。具体包括如下实现方案:图5根据本申请的一些实施例,示出了一种音频业务处理方法的应用场景示意图。如图5所示,平板300检测到音频业务2,例如,平板300可能会接收到来电,需要利用蓝牙耳机100接听电话;或者,平板300可能会需要利用蓝牙耳机100播放音乐。平板300通过蓝牙耳机100向手机200发送业务暂停指令。手机200可以接收该业务暂停指令。手机200接收到该业务暂停指令后,可以停止向蓝牙耳机100发送音频业务1的音频数据,如播放手机200的音乐对应的音频数据。并且,平板300可以向蓝牙耳机100发送音频业务2的音频数据。蓝牙耳机100接收音频业务2的音频数据,处理音频业务2,如利用蓝牙耳机100播放平板300的音乐。In some embodiments, after the tablet 300 detects the audio service 2, it requests the Bluetooth headset 100 to suspend processing the audio service 1, and uses the Bluetooth headset 100 to process the audio service 2. Specifically, the following implementation scheme is included: FIG. 5 shows a schematic diagram of an application scenario of an audio service processing method according to some embodiments of the present application. As shown in FIG. 5, the tablet 300 detects the audio service 2. For example, the tablet 300 may receive an incoming call and needs to use the Bluetooth headset 100 to answer the call; or, the tablet 300 may need to use the Bluetooth headset 100 to play music. The tablet 300 sends a service suspension instruction to the mobile phone 200 through the Bluetooth headset 100. The mobile phone 200 can receive the service suspension instruction. After receiving the service suspension instruction, the mobile phone 200 can stop sending audio data of the audio service 1 to the Bluetooth headset 100, such as playing the audio data corresponding to the music of the mobile phone 200. In addition, the tablet 300 can send audio data of the audio service 2 to the Bluetooth headset 100. The Bluetooth headset 100 receives the audio data of the audio service 2 and processes the audio service 2, such as using the Bluetooth headset 100 to play the music of the tablet 300.
在该实施例中,平板300可以通过业务暂停指令请求蓝牙耳机100暂停处理音频业务1,并利用蓝牙耳机100处理音频业务2,以实现音频业务2对音频业务1的抢占。In this embodiment, the tablet 300 can request the Bluetooth headset 100 to suspend processing of the audio service 1 through a service suspension instruction, and use the Bluetooth headset 100 to process the audio service 2, so that the audio service 2 preempts the audio service 1.
需要说明的是,在该实施例中,蓝牙耳机100可以在平板300和手机200之间起到数据或信令(如上述业务暂停指令)中转的作用。蓝牙耳机100可以向手机200透传接收自平板300的数据或信令,也可以向平板300透传接收自手机200的数据或信令。It should be noted that, in this embodiment, the Bluetooth headset 100 can play the role of transferring data or signaling (such as the above-mentioned service suspension instruction) between the tablet 300 and the mobile phone 200. The Bluetooth headset 100 can transparently transmit the data or signaling received from the tablet 300 to the mobile phone 200, and can also transparently transmit the data or signaling received from the mobile phone 200 to the tablet 300.
在另一些实施例中,蓝牙耳机100接收到来自平板300或手机200的数据或信令后,也会响应该数据或信令做一些相应的操作。例如,蓝牙耳机100接收到来自平板300的业务暂停指令后,不仅会向手机200可以传输该业务暂停指令;还可以响应于该业务暂停指令,停止处理手机200的音频业务1。In other embodiments, after receiving data or signaling from the tablet 300 or the mobile phone 200, the Bluetooth headset 100 will also respond to the data or signaling and perform some corresponding operations. For example, after receiving a service suspension instruction from the tablet 300, the Bluetooth headset 100 will not only transmit the service suspension instruction to the mobile phone 200, but also stop processing the audio service 1 of the mobile phone 200 in response to the service suspension instruction.
在一些实施例中,上述平板300检测到音频业务2后,请求蓝牙耳机100暂停处理音频业务1,并利用蓝牙耳机100处理音频业务2,包括如下具体实现方案:手机200通过蓝牙耳机100向平板300指示音频业务1的业务优先级;平板300检测到音频业务2后,对比音频业务2与音频业务1的业务优先级;若音频业务2的业务优先级大于音频业务1的业务优先级,平板300则请求蓝牙耳机100暂停处理音频业务1,并利用蓝牙耳机100处理音频业务2。In some embodiments, after the tablet 300 detects the audio service 2, it requests the Bluetooth headset 100 to suspend processing the audio service 1, and uses the Bluetooth headset 100 to process the audio service 2, including the following specific implementation scheme: the mobile phone 200 indicates the service priority of the audio service 1 to the tablet 300 through the Bluetooth headset 100; after the tablet 300 detects the audio service 2, it compares the service priority of the audio service 2 with that of the audio service 1; if the service priority of the audio service 2 is greater than the service priority of the audio service 1, the tablet 300 requests the Bluetooth headset 100 to suspend processing the audio service 1, and uses the Bluetooth headset 100 to process the audio service 2.
在一些实施例中,业务暂停指令用于指示音频业务2的业务优先级;手机200接收业务暂停指令,停止向蓝牙耳机100发送音频业务1的音频数据,包括如下具体实现方案:手机200接收业务暂停指令,若业务暂停指令指示的音频业务2的业务优先级大于音频业务1的业务优先级,停止向蓝牙耳机100发送音频业务1的音频数据。In some embodiments, the service pause instruction is used to indicate the service priority of audio service 2; the mobile phone 200 receives the service pause instruction and stops sending audio data of audio service 1 to the Bluetooth headset 100, including the following specific implementation scheme: the mobile phone 200 receives the service pause instruction, if the service priority of audio service 2 indicated by the service pause instruction is greater than the service priority of audio service 1, stops sending audio data of audio service 1 to the Bluetooth headset 100.
本方案中,手机200在接收到业务暂停指令后,会再次确认音频业务2和音频业务1的业务优先级,进一步确保手机200执行业务暂停指令的准确度。In this solution, after receiving the service suspension instruction, the mobile phone 200 will reconfirm the service priorities of the audio service 2 and the audio service 1, so as to further ensure the accuracy of the execution of the service suspension instruction by the mobile phone 200.
图6根据本申请的一些实施例,示出了一种适用于本申请的手机200和平板300的软件结构框图。分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将系统至少分为三层,从上至下分别为应用层,框架层,以及硬件抽象层(Hardware Abstraction Layer,hal)。应用层包括应用(201、301)、音频管家(204、304)、音频控制中心(205、305)。框架 层包括感知(206、306)、AMS(207、307)、音频服务(202、302)、蓝牙服务(203、303)、iconnect模块(209、309)。FIG6 shows a software structure diagram of a mobile phone 200 and a tablet 300 applicable to the present application according to some embodiments of the present application. The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the system is divided into at least three layers, namely, the application layer, the framework layer, and the hardware abstraction layer (Hardware Abstraction Layer, hal) from top to bottom. The application layer includes applications (201, 301), audio managers (204, 304), and audio control centers (205, 305). Framework The layers include perception (206, 306), AMS (207, 307), audio service (202, 302), Bluetooth service (203, 303), and iconnect module (209, 309).
如图6所示,手机200包括应用201、音频服务202、蓝牙服务203、音频管家204、音频控制中心205、感知206、AMS207、硬件抽象层208和iconnect209。As shown in FIG. 6 , the mobile phone 200 includes an application 201 , an audio service 202 , a Bluetooth service 203 , an audio manager 204 , an audio control center 205 , a perception 206 , an AMS 207 , a hardware abstraction layer 208 and an iconnect 209 .
其中,应用201可以包括通话、音乐、视频、闹钟、系统媒体APK等应用程序,当然,应用程序层还可以包括其他应用程序,本申请不做限定。应用201检测到音频业务的情况下,将音频业务发送至音频服务202,由音频服务202确定是否处理检测到的音频业务。Among them, application 201 may include applications such as calls, music, video, alarm clock, system media APK, etc. Of course, the application layer may also include other applications, which are not limited in this application. When application 201 detects an audio service, it sends the audio service to audio service 202, and audio service 202 determines whether to process the detected audio service.
蓝牙服务模块303用将手机200与蓝牙耳机100之间建立蓝牙连接。The Bluetooth service module 303 is used to establish a Bluetooth connection between the mobile phone 200 and the Bluetooth headset 100 .
音频管家204是手机200上的一个应用程序。音频管家204用于管理与手机200蓝牙连接的蓝牙耳机100,并在检测到用户打开音频管家204的情况下,向用户显示与手机200蓝牙连接的蓝牙耳机的各项参数(例如耳机入耳检测,电量显示等)并根据用户的操作设置相应的功能控制,其中,功能控制包括播放/下一首,播放/暂停,唤醒语音助手,开启/关闭主动降噪等等,并将检测到功能控制对应的音频业务发送至音频服务202,由音频服务202确定是否处理检测到的音频业务。The audio manager 204 is an application on the mobile phone 200. The audio manager 204 is used to manage the Bluetooth headset 100 connected to the mobile phone 200 via Bluetooth, and when it is detected that the user turns on the audio manager 204, it displays various parameters of the Bluetooth headset connected to the mobile phone 200 via Bluetooth to the user (such as earphone in-ear detection, battery display, etc.) and sets corresponding function controls according to the user's operation, where the function controls include play/next song, play/pause, wake up the voice assistant, turn on/off active noise reduction, etc., and sends the audio service corresponding to the detected function control to the audio service 202, and the audio service 202 determines whether to process the detected audio service.
具体的,音频管家204包括提示胶囊、播控策略引擎、一键抢回和智慧连接。其中,提示胶囊用于在蓝牙耳机100从处理手机200的音频业务切换至处理平板300的音频业务后,使得手机200向用户显示该业务切换事件的提示信息。播控策略引擎用于根据用户的操作设置相应的功能控制,并将与之对应的功能控制指令发送至音频服务202中的音频策略引擎,音频策略引擎根据功能控制指令控制音频业务对应的音频数据的流向。Specifically, the audio manager 204 includes a prompt capsule, a play control strategy engine, a one-key reclaim and a smart connection. Among them, the prompt capsule is used to enable the mobile phone 200 to display a prompt message of the service switching event to the user after the Bluetooth headset 100 switches from processing the audio service of the mobile phone 200 to processing the audio service of the tablet 300. The play control strategy engine is used to set the corresponding function control according to the user's operation, and send the corresponding function control instruction to the audio strategy engine in the audio service 202. The audio strategy engine controls the flow of audio data corresponding to the audio service according to the function control instruction.
音频服务202用于管理与手机200蓝牙连接的蓝牙耳机100,并在确定蓝牙耳机100处理手机200的音频业务的指令的情况下,将手机200的音频业务对应的音频数据通过硬件抽象层208传递给蓝牙耳机100,蓝牙耳机100接收到音频数据后,播放该音频。或者,若蓝牙耳机100当前正在执行平板300的音频业务,而此时,手机200也检测到待处理的音频业务,音频服务202就会比较平板300的音频业务和手机200的音频业务的业务优先级,若手机200的音频业务的业务优先级大于或者等于平板300的音频业务的业务优先级,则音频服务202通过蓝牙服务203向蓝牙耳机100发送业务暂停指令,该业务暂停指令用于指示蓝牙耳机100暂停处理当前正在执行平板300的音频业务,并处理手机200的音频业务。The audio service 202 is used to manage the Bluetooth headset 100 connected to the mobile phone 200 via Bluetooth, and when the Bluetooth headset 100 is determined to process the audio service of the mobile phone 200, the audio data corresponding to the audio service of the mobile phone 200 is passed to the Bluetooth headset 100 through the hardware abstraction layer 208. After receiving the audio data, the Bluetooth headset 100 plays the audio. Alternatively, if the Bluetooth headset 100 is currently executing the audio service of the tablet 300, and at this time, the mobile phone 200 also detects the audio service to be processed, the audio service 202 will compare the service priorities of the audio service of the tablet 300 and the audio service of the mobile phone 200. If the service priority of the audio service of the mobile phone 200 is greater than or equal to the service priority of the audio service of the tablet 300, the audio service 202 sends a service suspension instruction to the Bluetooth headset 100 through the Bluetooth service 203. The service suspension instruction is used to instruct the Bluetooth headset 100 to suspend the processing of the audio service currently being executed on the tablet 300 and process the audio service of the mobile phone 200.
具体的,音频服务202包括音频策略引擎、音频播录线程、音频设备栈。其中,音频策略引擎用于通过蓝牙服务203和蓝牙耳机100与其他连接蓝牙耳机100的对端设备共享彼此处理音频业务的状态,处理音频业务的状态包括是否处理音频业务,以及处理的音频业务的音频类型,以及音频业务的优先级等。Specifically, the audio service 202 includes an audio policy engine, an audio playback and recording thread, and an audio device stack. The audio policy engine is used to share the state of processing audio services with other peer devices connected to the Bluetooth headset 100 through the Bluetooth service 203 and the Bluetooth headset 100. The state of processing audio services includes whether to process audio services, the audio type of the processed audio services, and the priority of the audio services.
音频策略引擎用于管理与手机200蓝牙连接的蓝牙耳机100,并在接收到蓝牙耳机100处理手机200的音频业务的指令的情况下,将手机200的音频业务对应的音频数据基于设定的音频播录线程,通过硬件抽象层208传递给音频设备栈中指定的蓝牙耳机100的设备标识对应的蓝牙耳机100。或者,若蓝牙耳机100当前正在执行平板300的音频业务,而此时,手机200也检测到待处理的音频业务,音频服务202就会 比较平板300的音频业务和手机200的音频业务的业务优先级,若手机200的音频业务的业务优先级大于或者等于平板300的音频业务的业务优先级,则音频服务202通过蓝牙服务203向蓝牙耳机100发送业务暂停指令,该业务暂停指令用于指示蓝牙耳机100暂停处理当前正在执行平板300的音频业务,并将手机200的音频业务对应的音频数据基于设定的音频播录线程,通过硬件抽象层208传递给音频设备栈中指定的蓝牙耳机100的设备标识对应的蓝牙耳机100。The audio policy engine is used to manage the Bluetooth headset 100 connected to the mobile phone 200 via Bluetooth, and when receiving the instruction of the Bluetooth headset 100 to process the audio service of the mobile phone 200, the audio data corresponding to the audio service of the mobile phone 200 is passed to the Bluetooth headset 100 corresponding to the device identifier of the Bluetooth headset 100 specified in the audio device stack through the hardware abstraction layer 208 based on the set audio playback thread. Alternatively, if the Bluetooth headset 100 is currently executing the audio service of the tablet 300, and at this time, the mobile phone 200 also detects the audio service to be processed, the audio service 202 will Compare the service priorities of the audio service of the tablet 300 and the audio service of the mobile phone 200. If the service priority of the audio service of the mobile phone 200 is greater than or equal to the service priority of the audio service of the tablet 300, the audio service 202 sends a service pause instruction to the Bluetooth headset 100 through the Bluetooth service 203. The service pause instruction is used to instruct the Bluetooth headset 100 to pause processing of the audio service currently being executed on the tablet 300, and pass the audio data corresponding to the audio service of the mobile phone 200 to the Bluetooth headset 100 corresponding to the device identifier of the Bluetooth headset 100 specified in the audio device stack through the hardware abstraction layer 208 based on the set audio playback thread.
感知206用于感知蓝牙服务203连接的蓝牙耳机和AMS207检测到的蓝牙耳机100的设备信息参数,并将该些信息发送至音频管家204,音频管家204接收到该些信息后,检测到用户打开音频管家204的情况下,向用户显示与手机200蓝牙连接的蓝牙耳机100的各项参数(例如耳机入耳检测,电量显示等)。Perception 206 is used to perceive the device information parameters of the Bluetooth headset connected to the Bluetooth service 203 and the Bluetooth headset 100 detected by AMS207, and send the information to the audio manager 204. After receiving the information, the audio manager 204 detects that the user has turned on the audio manager 204, and displays the various parameters of the Bluetooth headset 100 connected to the mobile phone 200 by Bluetooth to the user (such as earphone in-ear detection, battery display, etc.).
音频控制中心205用于在手机200的控制中心界面显示与手机200处理的音频业务有关的图标、以及暂停/播放按钮图标。The audio control center 205 is used to display icons related to the audio service processed by the mobile phone 200 and pause/play button icons on the control center interface of the mobile phone 200.
同理,平板300也具有与手机200相同的上述功能结构。具体的,平板300包括应用301、音频服务302、蓝牙服务303、音频管家304、音频控制中心305、感知306、AMS307、硬件抽象层(Hardware Abstraction Layer,hal)308和iconnect309。Similarly, the tablet 300 also has the same functional structure as the mobile phone 200. Specifically, the tablet 300 includes applications 301, audio services 302, Bluetooth services 303, audio managers 304, audio control centers 305, perception 306, AMS 307, hardware abstraction layer (Hardware Abstraction Layer, hal) 308 and iconnect 309.
其中,应用301可以包括通话、音乐、视频、闹钟、系统媒体APK等应用程序,当然,应用程序层还可以包括其他应用程序,本申请不做限定。应用301检测到音频业务的情况下,将音频业务发送至音频服务302,由音频服务302确定是否处理检测到的音频业务。Among them, application 301 can include applications such as calls, music, video, alarm clock, system media APK, etc. Of course, the application layer can also include other applications, which are not limited in this application. When application 301 detects an audio service, it sends the audio service to audio service 302, and audio service 302 determines whether to process the detected audio service.
蓝牙服务模块303用将平板300与蓝牙耳机100之间建立蓝牙连接。The Bluetooth service module 303 is used to establish a Bluetooth connection between the tablet 300 and the Bluetooth headset 100 .
音频管家304是平板300上的一个应用程序。音频管家304用于管理与平板300蓝牙连接的蓝牙耳机100,并在检测到用户打开音频管家304的情况下,向用户显示与平板300蓝牙连接的蓝牙耳机的各项参数(例如耳机入耳检测,电量显示等)并根据用户的操作设置相应的功能控制,其中,功能控制包括播放/下一首,播放/暂停,唤醒语音助手,开启/关闭主动降噪等等,并将检测到功能控制对应的音频业务发送至音频服务302,由音频服务302确定是否处理检测到的音频业务。The audio manager 304 is an application on the tablet 300. The audio manager 304 is used to manage the Bluetooth headset 100 connected to the tablet 300 via Bluetooth, and when it is detected that the user turns on the audio manager 304, it displays various parameters of the Bluetooth headset connected to the tablet 300 via Bluetooth (such as earphone in-ear detection, battery display, etc.) to the user and sets corresponding function controls according to the user's operation, where the function controls include play/next song, play/pause, wake up the voice assistant, turn on/off active noise reduction, etc., and sends the audio service corresponding to the detected function control to the audio service 302, and the audio service 302 determines whether to process the detected audio service.
具体的,音频管家304包括提示胶囊、播控策略引擎、一键抢回和智慧连接。其中,提示胶囊用于在蓝牙耳机100从处理平板300的音频业务切换至处理平板300的音频业务后,使得平板300向用户显示该业务切换事件的提示信息。播控策略引擎用于根据用户的操作设置相应的功能控制,并将与之对应的功能控制指令发送至音频服务302中的音频策略引擎,音频策略引擎根据功能控制指令控制音频业务对应的音频数据的流向。Specifically, the audio manager 304 includes a prompt capsule, a play control strategy engine, a one-key reclaim and a smart connection. Among them, the prompt capsule is used to enable the tablet 300 to display a prompt message of the service switching event to the user after the Bluetooth headset 100 switches from processing the audio service of the tablet 300 to processing the audio service of the tablet 300. The play control strategy engine is used to set the corresponding function control according to the user's operation, and send the corresponding function control instruction to the audio strategy engine in the audio service 302, and the audio strategy engine controls the flow of audio data corresponding to the audio service according to the function control instruction.
音频服务302用于管理与平板300蓝牙连接的蓝牙耳机100,并在确定蓝牙耳机100处理平板300的音频业务的指令的情况下,将平板300的音频业务对应的音频数据通过硬件抽象层308传递给蓝牙耳机100,蓝牙耳机100接收到音频数据后,播放该音频。或者,若蓝牙耳机100当前正在执行平板300的音频业务,而此时,平板300也检测到待处理的音频业务,音频服务302就会比较平板300的音频业务和平板300的音频业务的业务优先级,若平板300的音频业务的业务优先级大于或者等于平板300的音频业务的业务优先级,则音频服务302通过蓝牙服务303向蓝牙耳机100发送业 务暂停指令,该业务暂停指令用于指示蓝牙耳机100暂停处理当前正在执行平板300的音频业务,并处理平板300的音频业务。The audio service 302 is used to manage the Bluetooth headset 100 connected to the tablet 300 via Bluetooth, and when it is determined that the Bluetooth headset 100 has issued an instruction to process the audio service of the tablet 300, the audio data corresponding to the audio service of the tablet 300 is passed to the Bluetooth headset 100 through the hardware abstraction layer 308. After receiving the audio data, the Bluetooth headset 100 plays the audio. Alternatively, if the Bluetooth headset 100 is currently executing the audio service of the tablet 300, and at this time, the tablet 300 also detects the audio service to be processed, the audio service 302 will compare the audio service of the tablet 300 with the service priority of the audio service of the tablet 300. If the service priority of the audio service of the tablet 300 is greater than or equal to the service priority of the audio service of the tablet 300, the audio service 302 will send the service priority to the Bluetooth headset 100 via the Bluetooth service 303. The service suspension instruction is used to instruct the Bluetooth headset 100 to suspend processing of the audio service currently being executed by the tablet 300 and process the audio service of the tablet 300.
具体的,音频服务302包括音频策略引擎、音频播录线程、音频设备栈。其中,音频策略引擎用于通过蓝牙服务303和蓝牙耳机100与其他连接蓝牙耳机100的对端设备共享彼此处理音频业务的状态,处理音频业务的状态包括是否处理音频业务,以及处理的音频业务的音频类型,以及音频业务的优先级等。Specifically, the audio service 302 includes an audio policy engine, an audio playback and recording thread, and an audio device stack. The audio policy engine is used to share the state of processing audio services with other peer devices connected to the Bluetooth headset 100 through the Bluetooth service 303 and the Bluetooth headset 100. The state of processing audio services includes whether to process audio services, the audio type of the processed audio services, and the priority of the audio services.
音频策略引擎用于管理与平板300蓝牙连接的蓝牙耳机100,并在接收到蓝牙耳机100处理平板300的音频业务的指令的情况下,将平板300的音频业务对应的音频数据基于设定的音频播录线程,通过硬件抽象层308传递给音频设备栈中指定的蓝牙耳机100的设备标识对应的蓝牙耳机100。或者,若蓝牙耳机100当前正在执行平板300的音频业务,而此时,平板300也检测到待处理的音频业务,音频服务302就会比较平板300的音频业务和平板300的音频业务的业务优先级,若平板300的音频业务的业务优先级大于或者等于平板300的音频业务的业务优先级,则音频服务302通过蓝牙服务303向蓝牙耳机100发送业务暂停指令,该业务暂停指令用于指示蓝牙耳机100暂停处理当前正在执行平板300的音频业务,并将平板300的音频业务对应的音频数据基于设定的音频播录线程,通过硬件抽象层308传递给音频设备栈中指定的蓝牙耳机100的设备标识对应的蓝牙耳机100。The audio policy engine is used to manage the Bluetooth headset 100 that is connected to the tablet 300 via Bluetooth, and upon receiving an instruction from the Bluetooth headset 100 to process the audio service of the tablet 300, the audio data corresponding to the audio service of the tablet 300 is passed to the Bluetooth headset 100 corresponding to the device identifier of the Bluetooth headset 100 specified in the audio device stack through the hardware abstraction layer 308 based on the set audio playback thread. Alternatively, if the Bluetooth headset 100 is currently executing the audio service of the tablet 300, and at this time, the tablet 300 also detects the audio service to be processed, the audio service 302 will compare the service priorities of the audio service of the tablet 300 and the audio service of the tablet 300. If the service priority of the audio service of the tablet 300 is greater than or equal to the service priority of the audio service of the tablet 300, the audio service 302 sends a service pause instruction to the Bluetooth headset 100 through the Bluetooth service 303. The service pause instruction is used to instruct the Bluetooth headset 100 to pause processing of the audio service currently being executed by the tablet 300, and pass the audio data corresponding to the audio service of the tablet 300 to the Bluetooth headset 100 corresponding to the device identifier of the Bluetooth headset 100 specified in the audio device stack through the hardware abstraction layer 308 based on the set audio playback thread.
感知306用于感知蓝牙服务303连接的蓝牙耳机和AMS307检测到的蓝牙耳机的设备信息参数,并将该些信息发送至音频管家304,音频管家304接收到该些信息后,检测到用户打开音频管家304的情况下,向用户显示与平板300蓝牙连接的蓝牙耳机的各项参数(例如耳机入耳检测,电量显示等)。Perception 306 is used to perceive the device information parameters of the Bluetooth headset connected to the Bluetooth service 303 and the Bluetooth headset detected by AMS307, and send the information to the audio manager 304. After receiving the information, the audio manager 304 detects that the user has turned on the audio manager 304, and displays the various parameters of the Bluetooth headset connected to the tablet 300 by Bluetooth to the user (such as earphone in-ear detection, battery display, etc.).
音频控制中心305用于在平板300的控制中心界面显示与平板300处理的音频业务有关的图标、以及暂停/播放按钮图标。The audio control center 305 is used to display icons related to the audio services processed by the tablet 300 and pause/play button icons on the control center interface of the tablet 300.
若本申请实施例提供的音频业务处理方案应用在标准的软件架构(例如上述图6中所述的软件架构)中,可能会影响软件架构本身的算法,为了避免该种问题的发生,提高本申请实施例提供的音频业务处理方案的兼容性。可以将实现本申请实施例提供的音频业务处理方案的相关功能模块放在非标准的软件架构(例如上述图6中所述的软件架构)中,而是放在电子设备本身的功能模块中。具体的,参见下文图7的描述。If the audio service processing scheme provided by the embodiment of the present application is applied in a standard software architecture (such as the software architecture described in FIG. 6 above), the algorithm of the software architecture itself may be affected. In order to avoid the occurrence of such problems, the compatibility of the audio service processing scheme provided by the embodiment of the present application is improved. The relevant functional modules for implementing the audio service processing scheme provided by the embodiment of the present application can be placed in a non-standard software architecture (such as the software architecture described in FIG. 6 above), but in the functional modules of the electronic device itself. Specifically, see the description of FIG. 7 below.
图7根据本申请的一些实施例,示出了一种音频策略引擎的结构示意图。如图7所示,实现本申请实施例提供的音频业务处理方案的音频策略引擎主要在软件架构的框架层(java层和本地(native)层,涉及到的模块是AudioService,AudioSystem,AudioPolicyService,另外为确保该部分不影响原有算法,保持兼容性,将该部分的实现放到非标准的软件架构(非AOSP模块)的AudioPolicyManagerCustomInterface。Figure 7 shows a schematic diagram of the structure of an audio policy engine according to some embodiments of the present application. As shown in Figure 7, the audio policy engine that implements the audio service processing solution provided by the embodiment of the present application is mainly in the framework layer (java layer and native layer) of the software architecture, and the modules involved are AudioService, AudioSystem, and AudioPolicyService. In addition, to ensure that this part does not affect the original algorithm and maintain compatibility, the implementation of this part is placed in the AudioPolicyManagerCustomInterface of the non-standard software architecture (non-AOSP module).
其中,AudioService感知当前电子设备(例如手机200和平板300)上播放的音频业务的状态,包括通话、蓝牙录音、铃声、音乐、电影、闹钟、通知等音频业务的状态变化,在音频业务开始使用了双连接的蓝牙耳机时和音频业务结束释放了双连接的蓝牙耳机时广播状态给电子设备(例如手机200和平板300)的蓝牙服务(203、303)。Among them, AudioService senses the status of the audio service currently played on the electronic device (such as mobile phone 200 and tablet 300), including the status changes of audio services such as calls, Bluetooth recording, ringtones, music, movies, alarms, notifications, etc., and broadcasts the status to the Bluetooth service (203, 303) of the electronic device (such as mobile phone 200 and tablet 300) when the audio service starts using the dual-connected Bluetooth headset and when the audio service ends and releases the dual-connected Bluetooth headset.
AudioSystem接收蓝牙服务(203、303)广播的双连接耳机的对端设备的音频业务状态信息,并且将该信息通过AudioPolicyService发送至 AudioPolicyManagerCustomInterface中,AudioPolicyManagerCustomInterface执行本申请实施例提供的音频业务处理方案。AudioSystem receives the audio service status information of the peer device of the dual-connected headset broadcast by the Bluetooth service (203, 303), and sends the information to In AudioPolicyManagerCustomInterface, AudioPolicyManagerCustomInterface executes the audio service processing solution provided in the embodiment of the present application.
如图5和图7所示,音频控制中心(205、305)可以要实时同步显示当前设备上实际的音频播放设备,在AudioSystem接收到蓝牙服务(203、303)广播的耳机状态时也通知音频控制中心(205、305)刷新音频播放设备显示,显示最新的音频播放设备。As shown in Figures 5 and 7, the audio control center (205, 305) can synchronously display the actual audio playback device on the current device in real time. When the AudioSystem receives the earphone status broadcast by the Bluetooth service (203, 303), it also notifies the audio control center (205, 305) to refresh the audio playback device display to display the latest audio playback device.
下面介绍蓝牙耳机100同时连接手机200和平板300,以及用户佩戴蓝牙耳机100后,手机200利用蓝牙耳机100播放音乐的同时,平板300检测到音乐业务的情况下,抢占蓝牙耳机100,利用蓝牙耳机100播放音乐的过程。The following describes a process in which the Bluetooth headset 100 is connected to the mobile phone 200 and the tablet 300 at the same time, and after the user wears the Bluetooth headset 100, the mobile phone 200 uses the Bluetooth headset 100 to play music, and when the tablet 300 detects a music service, it seizes the Bluetooth headset 100 and uses the Bluetooth headset 100 to play music.
图8根据本申请的一些实施例,对应于图4,示出了一种音频业务处理方法的流程示意图。如图8所示,该流程包括如下步骤:FIG8 shows a schematic flow chart of an audio service processing method according to some embodiments of the present application, corresponding to FIG4. As shown in FIG8, the flow chart includes the following steps:
801:蓝牙耳机100通过蓝牙服务201与手机200建立无线通信通道,通过蓝牙服务301与平板300建立无线通信通道。801 : The Bluetooth headset 100 establishes a wireless communication channel with the mobile phone 200 through the Bluetooth service 201 , and establishes a wireless communication channel with the tablet 300 through the Bluetooth service 301 .
在一些实施例中,通过蓝牙耳机100与手机200和平板300之间的通信通道,由蓝牙耳机100向手机200和平板300发送用户已佩戴蓝牙耳机100的消息。具体的,在步骤601之后,本申请实施例的方法还可以包括步骤802-步骤803。In some embodiments, the Bluetooth headset 100 sends a message to the mobile phone 200 and the tablet 300 that the user has worn the Bluetooth headset 100 through the communication channel between the Bluetooth headset 100 and the mobile phone 200 and the tablet 300. Specifically, after step 601, the method of the embodiment of the present application may further include steps 802-803.
802:蓝牙耳机100通过蓝牙服务201向手机200发送佩戴通知,蓝牙耳机100通过蓝牙服务301向平板300发送佩戴通知。802 : The Bluetooth headset 100 sends a wearing notification to the mobile phone 200 via the Bluetooth service 201 , and the Bluetooth headset 100 sends a wearing notification to the tablet 300 via the Bluetooth service 301 .
803:蓝牙服务201向音频服务202进行佩戴状态广播,蓝牙服务301向音频服务302进行佩戴状态广播。803 : The Bluetooth service 201 broadcasts the wearing status to the audio service 202 , and the Bluetooth service 301 broadcasts the wearing status to the audio service 302 .
804:应用程序203检测到音乐业务。804: Application 203 detects a music service.
在一些实施例中,应用程序203响应于用户播放选中音乐的操作,便可以检测到用户发起的音乐业务。In some embodiments, the application 203 can detect the music service initiated by the user in response to the user's operation of playing the selected music.
805:应用程序203向音频服务202发送播放音乐请求。805 : The application 203 sends a music playing request to the audio service 202 .
806:音频服务202确定蓝牙耳机100空闲可播放音乐。806: The audio service 202 determines that the Bluetooth headset 100 is idle and can play music.
可以理解,音频服务202与音频服务302之间可以共享各自所在设备利用蓝牙耳机100处理音频业务的状态,因此,音频服务202可以根据前述的共享信息确定蓝牙耳机100是否空闲可播放音乐。It can be understood that the audio service 202 and the audio service 302 can share the status of their respective devices processing audio services using the Bluetooth headset 100. Therefore, the audio service 202 can determine whether the Bluetooth headset 100 is idle and can play music based on the aforementioned shared information.
807:音频服务202通过蓝牙服务201向蓝牙耳机100发送播放音乐指令,播放音乐指令包括音频流名称字段。807: The audio service 202 sends a music playing instruction to the Bluetooth headset 100 through the Bluetooth service 201, where the music playing instruction includes an audio stream name field.
在本申请实施例中,音频流名称字段用于确定该音频业务的业务类型,音频业务的业务类型可以用于确定播放音乐的业务优先级。示例性的,音频流名称字段与其对应的业务类型可以如表1所示: In the embodiment of the present application, the audio stream name field is used to determine the service type of the audio service, and the service type of the audio service can be used to determine the service priority of playing music. Exemplarily, the audio stream name field and its corresponding service type can be shown in Table 1:
表1
Table 1
根据表1可知,若音频流1的名称字段为Stream_Music,则该音频业务1属于多媒体业务,其业务类型标识为2。当然,在其他实施例中,若音频流1的名称字段为Stream_Voice_Call,该音频业务1属于通话业务,其业务类型标识为1;又或者,若音频流1的名称字段为Stream_Notification,则该音频业务1属于通知业务,其业务类型标识为3。According to Table 1, if the name field of the audio stream 1 is Stream_Music, the audio service 1 belongs to the multimedia service, and its service type identifier is 2. Of course, in other embodiments, if the name field of the audio stream 1 is Stream_Voice_Call, the audio service 1 belongs to the call service, and its service type identifier is 1; or, if the name field of the audio stream 1 is Stream_Notification, the audio service 1 belongs to the notification service, and its service type identifier is 3.
在表1中,每个音频流名称字段可对应一类音频流。在实际应用过程中,电子设备中还可包括表1中更多种类型的音频流,在此不做具体限制。另外,电子设备还可 以包括更多种的业务类型,例如可以把“Stream_TTS”、“Stream_Accessibility”归为其他类型。表1中关于每个业务类型所对应的业务类型标识仅作为示例,业务类型标识也可以为其他。In Table 1, each audio stream name field may correspond to a type of audio stream. In actual application, the electronic device may also include more types of audio streams in Table 1, which are not specifically limited here. In addition, the electronic device may also include More types of services may be included, for example, "Stream_TTS" and "Stream_Accessibility" may be classified as other types. The service type identifier corresponding to each service type in Table 1 is only an example, and the service type identifier may also be other.
在其他一些实施例中,播放音乐指令还包括音频业务的业务优先级和/或业务类型字段,但不限于此。In some other embodiments, the play music instruction also includes a service priority and/or service type field of the audio service, but is not limited thereto.
808:蓝牙耳机100在接收到音频服务202发送的播放音乐指令的情况下,播放音乐。808 : Upon receiving the music playing instruction sent by the audio service 202 , the Bluetooth headset 100 plays music.
具体的,蓝牙耳机100在接收到音频服务202发送的播放音乐指令后,接收到音频服务202发送的音频数据,基于音频数据播放音乐。Specifically, after receiving the music playing instruction sent by the audio service 202, the Bluetooth headset 100 receives the audio data sent by the audio service 202 and plays the music based on the audio data.
809:蓝牙耳机100通过蓝牙服务301向音频服务302发送蓝牙耳机100处理音频业务状态的通知信息。809 : The Bluetooth headset 100 sends notification information of the audio service processing status of the Bluetooth headset 100 to the audio service 302 via the Bluetooth service 301 .
如此,音频服务202与音频服务302之间可以共享各自所在设备利用蓝牙耳机100处理音频业务的状态。In this way, the audio service 202 and the audio service 302 can share the status of their respective devices processing audio services using the Bluetooth headset 100.
810:应用程序303检测到音乐业务。810: Application 303 detects music service.
在一些实施例中,应用程序303响应于用户播放选中音乐的操作,便可以检测到用户发起的音乐业务。In some embodiments, the application 303 can detect the music service initiated by the user in response to the user's operation of playing the selected music.
811:应用程序303向音频服务302发送播放音乐请求。811: The application 303 sends a music playing request to the audio service 302.
812:音频服务302对比平板300的音乐业务与手机200的音乐业务的业务优先级;若平板300的音乐业务的业务优先级等于手机200的音乐业务的业务优先级,确定可抢占蓝牙耳机100播放音乐。812: the audio service 302 compares the service priorities of the music service of the tablet 300 and the music service of the mobile phone 200; if the service priority of the music service of the tablet 300 is equal to the service priority of the music service of the mobile phone 200, it is determined that the Bluetooth headset 100 can be preempted to play music.
813:音频服务302通过蓝牙服务301、蓝牙耳机100和蓝牙服务201向音频服务202发送业务暂停指令。813 : The audio service 302 sends a service suspension instruction to the audio service 202 through the Bluetooth service 301 , the Bluetooth headset 100 and the Bluetooth service 201 .
814:音频服务202接收到业务暂停指令后,不向蓝牙耳机100发送音频数据。814 : After receiving the service suspension instruction, the audio service 202 does not send audio data to the Bluetooth headset 100 .
815:音频服务302通过蓝牙服务301向蓝牙耳机100发送音乐数据。815 : The audio service 302 sends the music data to the Bluetooth headset 100 via the Bluetooth service 301 .
816:蓝牙耳机100基于音乐数据播放音乐。816: The Bluetooth headset 100 plays music based on the music data.
在一些实施例中,平板300请求蓝牙耳机100暂停播放手机200的音乐,利用蓝牙耳机100播放平板300的音乐,蓝牙耳机100暂停播放手机200的音乐,播放平板300的通话后,手机200利用自身的扬声器、插拔耳机或受话器等播放音乐,同时在手机200的显示界面显示当前音频业务处理设备(音频输入输出设备)。例如,图9根据本申请的一些实施例,示出了一种通知管理界面的示意图。如图9所示,手机200的显示界面显示当前音频业务处理设备(音频输入输出设备)为本机。In some embodiments, the tablet 300 requests the Bluetooth headset 100 to pause playing the music of the mobile phone 200, and uses the Bluetooth headset 100 to play the music of the tablet 300. The Bluetooth headset 100 pauses playing the music of the mobile phone 200. After playing the call of the tablet 300, the mobile phone 200 uses its own speaker, plugs in and out headphones or receivers, etc. to play music, and at the same time displays the current audio service processing device (audio input and output device) on the display interface of the mobile phone 200. For example, FIG9 shows a schematic diagram of a notification management interface according to some embodiments of the present application. As shown in FIG9, the display interface of the mobile phone 200 shows that the current audio service processing device (audio input and output device) is the local device.
图10根据本申请的一些实施例,示出了一种蓝牙耳机100的结构示意图。如图10所示,该蓝牙耳机100可以包括至少一个处理器101、至少一个存储器102、无线通信模块103、音频模块104、电源模块105以及输入/输出接口106等。该处理器可以包括一个或多个接口,用于与蓝牙耳机100的其他部件相连。该蓝牙耳机100通过耳机盒进行收纳。下面结合图10对蓝牙耳机100的各个部件进行具体的介绍。FIG10 shows a schematic diagram of the structure of a Bluetooth headset 100 according to some embodiments of the present application. As shown in FIG10 , the Bluetooth headset 100 may include at least one processor 101, at least one memory 102, a wireless communication module 103, an audio module 104, a power module 105, and an input/output interface 106, etc. The processor may include one or more interfaces for connecting to other components of the Bluetooth headset 100. The Bluetooth headset 100 is stored in an earphone box. The various components of the Bluetooth headset 100 are specifically introduced below in conjunction with FIG10 .
其中,存储器102可以用于存储程序代码,如用于蓝牙耳机100与多个电子设备之间进行实体连接,以及与电子设备之间的业务规范连接,处理电子设备的音频业务(例如音乐播放、接/打电话等),以及用于蓝牙耳机100进行充电,蓝牙耳机100与其 他电子设备进行无线配对连接的程序代码等。存储器102还可以用于存储其他信息,例如电子设备的优先级。The memory 102 can be used to store program codes, such as for physically connecting the Bluetooth headset 100 with multiple electronic devices, and for connecting with electronic devices in accordance with business regulations, processing audio services of electronic devices (such as music playback, answering/calling, etc.), and for charging the Bluetooth headset 100. The memory 102 may also be used to store other information, such as the priority of the electronic device.
处理器101可以用于执行上述应用程序代码,调用相关模块以实现本申请实施例中蓝牙耳机100的功能。例如,实现蓝牙耳机100与多个电子设备(例如电子设备1和电子设备2)之间进行实体连接,虚拟连接,音频播放,接/打电话,根据设备优先级切换与不同电子设备之间的业务规范连接等功能。其中,该实体连接为基于物理链路的连接,可包括ACL连接,或低功耗异步连接链路(low energy asynchronous connection link/logical transport,LE ACL)连接。示例性的,在蓝牙耳机与电子设备1建立实体连接且正在处理电子设备1的音频业务1(例如播放音乐)的情况下,若蓝牙耳机接收到电子设备2的连接请求信息,则蓝牙耳机可以基于与电子设备2的实体连接,处理电子设备2的音频业务2(例如接/打电话),以实现电子设备2的音频业务2的业务抢占功能。The processor 101 can be used to execute the above application code and call related modules to implement the functions of the Bluetooth headset 100 in the embodiment of the present application. For example, the Bluetooth headset 100 can be connected physically to multiple electronic devices (such as electronic device 1 and electronic device 2), and can be connected to different electronic devices according to device priority. The physical connection is a connection based on a physical link, which may include an ACL connection or a low energy asynchronous connection link (low energy asynchronous connection link/logical transport, LE ACL) connection. Exemplarily, when the Bluetooth headset establishes a physical connection with the electronic device 1 and is processing the audio service 1 of the electronic device 1 (such as playing music), if the Bluetooth headset receives the connection request information of the electronic device 2, the Bluetooth headset can process the audio service 2 of the electronic device 2 (such as answering/making a call) based on the physical connection with the electronic device 2, so as to realize the service preemption function of the audio service 2 of the electronic device 2.
处理器101可以包括一个或多个处理单元,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器101中。处理器101具体可以是集成的控制芯片,也可以由包括各种有源和/或无源部件的电路组成,且该电路被配置为执行本申请实施例描述的属于处理器101的功能。The processor 101 may include one or more processing units, and different processing units may be independent devices or integrated into one or more processors 101. The processor 101 may specifically be an integrated control chip, or may be composed of a circuit including various active and/or passive components, and the circuit is configured to perform the functions of the processor 101 described in the embodiments of the present application.
无线通信模块103可以用于支持通过无线通信技术实现蓝牙耳机100与其他电子设备或耳机盒之间的数据交换,无线通信技术例如为BT,WLAN(如Wi-Fi),Zigbee,FM,NFC,IR,或通用2.4G/5G无线通信技术等。The wireless communication module 103 can be used to support data exchange between the Bluetooth headset 100 and other electronic devices or earphone boxes through wireless communication technology, such as BT, WLAN (such as Wi-Fi), Zigbee, FM, NFC, IR, or general 2.4G/5G wireless communication technology.
在一些实施例中,该无线通信模块103可以为蓝牙芯片。蓝牙耳机100可以通过该蓝牙芯片,与其他电子设备的蓝牙芯片之间进行配对并建立无线连接,以通过该无线连接实现蓝牙耳机100和其他电子设备之间的无线通信和业务处理。通常,蓝牙芯片可以支持基础速率(basicrate,BR)/增强速率(enhanced data rate,EDR)蓝牙和BLE,例如可以收/发寻呼(page)信息,收/发BLE广播消息等。In some embodiments, the wireless communication module 103 may be a Bluetooth chip. The Bluetooth headset 100 may be paired with a Bluetooth chip of another electronic device through the Bluetooth chip and establish a wireless connection to achieve wireless communication and service processing between the Bluetooth headset 100 and the other electronic device through the wireless connection. Generally, the Bluetooth chip may support basic rate (BR)/enhanced data rate (EDR) Bluetooth and BLE, for example, it may receive/send paging information, receive/send BLE broadcast messages, etc.
另外,无线通信模块103还可以包括天线,无线通信模块103经由天线接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器101。无线通信模块103还可以从处理器101接收待发送的信号,对其进行调频,放大,经天线转为电磁波辐射出去。In addition, the wireless communication module 103 may also include an antenna, and the wireless communication module 103 receives electromagnetic waves via the antenna, modulates the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 101. The wireless communication module 103 may also receive a signal to be sent from the processor 101, modulate the frequency of the signal, amplify the signal, and convert it into an electromagnetic wave for radiation through the antenna.
音频模块104可以用于管理音频数据,实现蓝牙耳机100输入和输出音频流。例如,音频模块104可以从无线通信模块103获取音频流,或者向无线通信模块103传递音频流,实现通过蓝牙耳机接打电话、播放音乐、启动/关闭与耳机连接的电子设备的语音助手、接收/发送用户的语音数据等功能。音频模块104可以包括用于输出音频流的扬声器(或称听筒、受话器)组件,麦克风(或称话筒,传声器),与麦克风相配合的麦克收音电路等。扬声器可以用于将音频电信号转换成声音信号并播放。麦克风可以用于将声音信号转换为音频电信号。The audio module 104 can be used to manage audio data and implement the input and output audio streams of the Bluetooth headset 100. For example, the audio module 104 can obtain an audio stream from the wireless communication module 103, or transmit an audio stream to the wireless communication module 103, to implement functions such as making and receiving calls, playing music, starting/turning off the voice assistant of the electronic device connected to the headset, and receiving/sending the user's voice data through the Bluetooth headset. The audio module 104 may include a speaker (or earpiece, receiver) component for outputting an audio stream, a microphone (or microphone, microphone), a microphone receiving circuit matched with the microphone, etc. The speaker can be used to convert an audio electrical signal into a sound signal and play it. The microphone can be used to convert a sound signal into an audio electrical signal.
电源模块105可以用于提供蓝牙耳机100的系统电源,为蓝牙耳机100各模块供电;支持蓝牙耳机100接收充电输入等。电源模块105可以包括电源管理单元(power management unit,PMU)和电池。其中,电源管理单元可以接收外部的充电输入;将充电路输入的电信号变压后提供给电池充电,还可以将电池提供的电信号变压后提 供给音频模块104、无线通信模块103等其他模块;以及防止电池过充、过放、短路或过流等。在一些实施例中,电源模块105还可以包括无线充电线圈,用于对蓝牙耳机100进行无线充电。另外,电源管理单元还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。The power module 105 can be used to provide system power for the Bluetooth headset 100, power each module of the Bluetooth headset 100, and support the Bluetooth headset 100 to receive charging input. The power module 105 may include a power management unit (PMU) and a battery. The power management unit can receive external charging input; transform the electrical signal input from the charging circuit and provide it to the battery for charging; and can also transform the electrical signal provided by the battery and provide it to the battery for charging. Supplying other modules such as the audio module 104 and the wireless communication module 103; and preventing the battery from being overcharged, over-discharged, short-circuited or over-current, etc. In some embodiments, the power module 105 may also include a wireless charging coil for wirelessly charging the Bluetooth headset 100. In addition, the power management unit may also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc.
多个输入/输出接口106,可以用于提供蓝牙耳机100与耳机盒之间进行充电或通信的有线连接。在一些实施例中,该输入/输出接口可以为USB接口。在另一些实施例中,输入/输出接口106可以为耳机电连接器,当蓝牙耳机100放置于耳机盒中时,蓝牙耳机100可以通过耳机电连接器与耳机盒中的电连接器建立电连接,从而为蓝牙耳机100中的电池充电。在另一些实施例中,在该电连接建立后,蓝牙耳机100还可以与耳机盒进行数据通信,例如可以接收来自耳机盒的配对指令。The multiple input/output interfaces 106 can be used to provide a wired connection for charging or communication between the Bluetooth headset 100 and the headset box. In some embodiments, the input/output interface can be a USB interface. In other embodiments, the input/output interface 106 can be a headset electrical connector. When the Bluetooth headset 100 is placed in the headset box, the Bluetooth headset 100 can establish an electrical connection with the electrical connector in the headset box through the headset electrical connector, thereby charging the battery in the Bluetooth headset 100. In other embodiments, after the electrical connection is established, the Bluetooth headset 100 can also communicate data with the headset box, for example, it can receive a pairing instruction from the headset box.
另外,蓝牙耳机100还可以包括传感器107。例如,该传感器107可以是距离传感器或接近光传感器,可以用于确定蓝牙耳机100是否被用户佩戴。示例性的,蓝牙耳机100可以利用距离传感器来检测蓝牙耳机100附近是否有物体,从而确定蓝牙耳机100是否被用户佩戴。在确定蓝牙耳机100被佩戴时,蓝牙耳机100可以打开扬声器。In addition, the Bluetooth headset 100 may further include a sensor 107. For example, the sensor 107 may be a distance sensor or a proximity light sensor, which may be used to determine whether the Bluetooth headset 100 is worn by the user. Exemplarily, the Bluetooth headset 100 may use the distance sensor to detect whether there is an object near the Bluetooth headset 100, thereby determining whether the Bluetooth headset 100 is worn by the user. When it is determined that the Bluetooth headset 100 is worn, the Bluetooth headset 100 may turn on the speaker.
再例如,该传感器107还可以包括骨传导传感器,结合成骨传导耳机。利用该骨传导传感器,蓝牙耳机100可以获取人体声部振动骨块的振动信号,解析出语音信号,实现语音功能,从而接收用户的语音指令。蓝牙耳机100还可以根据骨传导耳机获取的用户语音信号进行语音鉴权,以在支付交易等业务场景中对用户身份进行认证等。For another example, the sensor 107 may also include a bone conduction sensor, combined into a bone conduction headset. Using the bone conduction sensor, the Bluetooth headset 100 can obtain the vibration signal of the human vocal bone, parse the voice signal, implement the voice function, and thus receive the user's voice command. The Bluetooth headset 100 can also perform voice authentication based on the user's voice signal obtained by the bone conduction headset to authenticate the user's identity in business scenarios such as payment transactions.
再例如,该传感器107还可以包括:触摸传感器,用于检测用户的触摸操作;指纹传感器,用于检测用户指纹,识别用户身份等;环境光传感器,可以根据感知的环境光的亮度,自适应调节一些参数(如音量大小);以及其他可能的传感器。For another example, the sensor 107 may also include: a touch sensor for detecting a user's touch operation; a fingerprint sensor for detecting a user's fingerprint and identifying the user's identity; an ambient light sensor that can adaptively adjust some parameters (such as volume) according to the perceived brightness of the ambient light; and other possible sensors.
在一些实施例中,触摸传感器可以检测用户的单击、双击、多次点击、长按、重压等触摸操作,还可以进行用户指纹识别,以在支付交易等业务场景中对用户身份进行鉴权。In some embodiments, the touch sensor can detect the user's touch operations such as single click, double click, multiple clicks, long press, and heavy pressure, and can also perform user fingerprint recognition to authenticate the user's identity in business scenarios such as payment transactions.
可以理解的是,本申请实施例示意的结构并不构成对蓝牙耳机100的具体限定。其可以具有比图10示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。例如,在蓝牙耳机100的外表面还可以包括按键108、指示灯(可以指示电量、呼入/呼出、配对模式等状态)、显示屏(可以提示用户相关信息)、防尘网(可以配合听筒使用)等部件。其中,该按键108可以是物理按键或触摸按键(与触摸传感器配合使用)等,用于触发开机、关机、暂停、播放、录音、开始配对、重置等操作。It is understandable that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the Bluetooth headset 100. It may have more or fewer components than those shown in FIG. 10, may combine two or more components, or may have different component configurations. For example, the outer surface of the Bluetooth headset 100 may also include a button 108, an indicator light (which may indicate battery level, incoming/outgoing call, pairing mode, etc.), a display screen (which may prompt the user with relevant information), a dust screen (which may be used in conjunction with a handset), and other components. Among them, the button 108 may be a physical button or a touch button (used in conjunction with a touch sensor), etc., which is used to trigger operations such as power on, power off, pause, play, record, start pairing, and reset.
图10示出的各种部件可以在包括一个或多个信号处理或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。示例性的,当该蓝牙耳机为TWS耳机时,该蓝牙耳机100可以包括分别佩戴于用于左耳的耳机本体(也称左耳塞,或第一部分)和佩戴于右耳的耳机本体(也称右耳塞,或第二部分)。该耳机本体可以包括外壳和内部部件。内部部件设置于外壳形成的腔体内。内部部件可以包括上述音频模块、电源模块和无线通信模块等模块中的器件。The various components shown in Figure 10 can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing or application-specific integrated circuits. Exemplarily, when the Bluetooth headset is a TWS headset, the Bluetooth headset 100 may include an earphone body (also called the left earplug, or the first part) worn on the left ear and an earphone body (also called the right earplug, or the second part) worn on the right ear. The earphone body may include a housing and internal components. The internal components are arranged in a cavity formed by the housing. The internal components may include devices in modules such as the above-mentioned audio module, power module, and wireless communication module.
当蓝牙耳机为TWS耳机时,用户可以在双耳模式或单耳模式下使用TWS耳机。在 单耳模式下,用户佩戴左耳塞,或者佩戴右耳塞,进行听音乐或接/打电话等音频业务。在双耳模式下,用户可以佩戴两个耳塞欣赏音乐或进行其他音频业务。在双耳模式下,两个耳塞有主耳塞和副耳塞之分。并且,在TWS耳机的使用过程中,两个耳塞的主、副角色还可以基于不同的条件进行切换,例如电量较高的耳塞可以切换为主耳塞,电量较低的耳塞可以切换为副耳塞。When the Bluetooth headset is a TWS headset, the user can use the TWS headset in binaural mode or monaural mode. In monaural mode, the user wears the left earbud or the right earbud to listen to music or answer/make phone calls and other audio services. In binaural mode, the user can wear two earbuds to enjoy music or perform other audio services. In binaural mode, the two earbuds are divided into main earbuds and auxiliary earbuds. Moreover, during the use of TWS headphones, the main and auxiliary roles of the two earbuds can also be switched based on different conditions. For example, the earbud with higher power can be switched to the main earbud, and the earbud with lower power can be switched to the auxiliary earbud.
在一些实施例中,蓝牙耳机通常收纳于耳机盒内。耳机盒内部可以具有一个或多个磁体,以将耳机本体吸引到耳机盒内的腔体中。该耳机盒可以包括电池和多个输入/输出接口。在一些实施例中,该输入/输出接口可以为盒电连接器。当耳机盒中的一对盒电连接器,分别与耳机本体中的两个耳机电连接器建立电连接后,耳机盒可以通过自身的电池为耳机本体中的电池充电。In some embodiments, the Bluetooth headset is usually stored in an earphone box. The earphone box may have one or more magnets inside to attract the earphone body into the cavity in the earphone box. The earphone box may include a battery and multiple input/output interfaces. In some embodiments, the input/output interface may be a box electrical connector. When a pair of box electrical connectors in the earphone box are electrically connected to two earphone electrical connectors in the earphone body, the earphone box can charge the battery in the earphone body through its own battery.
在另一些实施例中,该耳机盒上可以设置有至少一个触摸控件,可以用于触发蓝牙耳机进行配对复位或对蓝牙耳机进行充电等功能。耳机盒还可以设置有一个或多个电量指示灯,以向用户提示耳机盒中电池的电量大小,以及耳机盒中每个耳机本体中电池的电量大小。In other embodiments, the headset box may be provided with at least one touch control, which can be used to trigger the Bluetooth headset to perform pairing reset or charge the Bluetooth headset. The headset box may also be provided with one or more power indicator lights to prompt the user the power level of the battery in the headset box and the power level of the battery in each headset body in the headset box.
在另一些实施例中,耳机盒内还可以包括处理器,存储器等部件。该存储器可以用于存储应用程序代码,并由耳机盒的处理器来控制执行,以实现耳机盒的各项功能。例如。耳机盒的处理器通过执行存储在存储器中的应用程序代码,在检测到蓝牙耳机被放入耳机盒,且耳机盒的盖子被盖合后向蓝牙耳机充电等。In other embodiments, the earphone box may further include components such as a processor and a memory. The memory may be used to store application code, and the processor of the earphone box controls execution to implement various functions of the earphone box. For example, the processor of the earphone box executes the application code stored in the memory, and charges the Bluetooth headset after detecting that the Bluetooth headset is placed in the earphone box and the lid of the earphone box is closed.
此外,该耳机盒上还可以设置有充电接口,用于耳机盒为自身的电池进行充电。耳机盒内还可以包括无线充电线圈,用于对耳机盒自身的电池进行无线充电。可以理解的是,该耳机盒还可以包括其他部件,此处不再一一说明。In addition, the earphone box may be provided with a charging interface for charging the battery of the earphone box. The earphone box may also include a wireless charging coil for wirelessly charging the battery of the earphone box. It is understandable that the earphone box may also include other components, which will not be described one by one here.
可以理解,图10所示的部件并不构成对蓝牙耳机100的具体限定,蓝牙耳机100还可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。It can be understood that the components shown in FIG. 10 do not constitute a specific limitation on the Bluetooth headset 100 , and the Bluetooth headset 100 may also include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange the components differently.
可以理解,蓝牙耳机可以连接多个电子设备,但只能按照音频业务设定的业务优先级顺序,处理业务优先级较高的一个电子设备的音频业务,却不能按照用户意愿处理其他电子设备的音频业务,音频业务切换的灵活度较差,用户体验较差。It is understandable that Bluetooth headsets can connect to multiple electronic devices, but they can only process the audio service of an electronic device with a higher service priority according to the service priority order set for the audio service, but cannot process the audio service of other electronic devices according to the user's wishes. The flexibility of audio service switching is poor and the user experience is poor.
例如,如图2所示,该应用场景包括蓝牙耳机100、手机200和平板300。蓝牙耳机100同时与手机200和平板300建立无线通信连接,从而配合手机200和平板300为用户处理音频业务。当前,手机200向蓝牙耳机100发起播放音乐的请求后,蓝牙耳机100播放手机200的音乐。For example, as shown in FIG2 , the application scenario includes a Bluetooth headset 100, a mobile phone 200, and a tablet 300. The Bluetooth headset 100 simultaneously establishes wireless communication connections with the mobile phone 200 and the tablet 300, thereby cooperating with the mobile phone 200 and the tablet 300 to process audio services for the user. Currently, after the mobile phone 200 initiates a request to play music to the Bluetooth headset 100, the Bluetooth headset 100 plays the music of the mobile phone 200.
如图3所示,若平板300检测到播放音乐的音频业务,确定平板300播放音乐的业务优先级大于等于手机200播放音乐的业务优先级,则向蓝牙耳机100请求暂停播放手机200的音乐,播放平板300的音乐,从而蓝牙耳机100暂停播放手机200的音乐,播放平板300的音乐。此过程中,蓝牙耳机100不能按照用户意愿再次切换至播放手机200的音乐,音频业务切换的灵活度较差,用户体验较差。As shown in FIG3 , if the tablet 300 detects an audio service of playing music and determines that the service priority of the tablet 300 playing music is greater than or equal to the service priority of the mobile phone 200 playing music, it requests the Bluetooth headset 100 to pause playing the music of the mobile phone 200 and play the music of the tablet 300, so that the Bluetooth headset 100 pauses playing the music of the mobile phone 200 and plays the music of the tablet 300. In this process, the Bluetooth headset 100 cannot switch to playing the music of the mobile phone 200 again according to the user's wishes, the flexibility of audio service switching is poor, and the user experience is poor.
为了上述技术问题,本申请实施例提供一种音频业务恢复处理方法。该方法中,电子设备1和电子设备2均与蓝牙耳机建立无线通信通道。然后,当电子设备1利用蓝牙耳机处理音频业务1时,电子设备2又检测到音频业务2,则可以请求蓝牙耳机 暂停处理音频业务1,并利用蓝牙耳机处理音频业务2。其中,音频业务2的音频业务优先级大于等于音频业务1的音频业务优先级。其中,本申请实施例中所述的电子设备1是第一电子设备,电子设备2是第二电子设备,音频业务1是第一音频业务,音频业务2是第二音频业务。In order to solve the above technical problems, the embodiment of the present application provides an audio service recovery processing method. In this method, both electronic device 1 and electronic device 2 establish a wireless communication channel with a Bluetooth headset. Then, when electronic device 1 uses the Bluetooth headset to process audio service 1, and electronic device 2 detects audio service 2, it can request the Bluetooth headset to The processing of audio service 1 is suspended, and the Bluetooth headset is used to process audio service 2. The audio service priority of audio service 2 is greater than or equal to the audio service priority of audio service 1. The electronic device 1 described in the embodiment of the present application is a first electronic device, the electronic device 2 is a second electronic device, the audio service 1 is a first audio service, and the audio service 2 is a second audio service.
并且,电子设备1在蓝牙耳机暂停处理音频业务1后,可以显示第一提示信息,其中,该第一提示信息用于请求用户确定该电子设备1是否恢复利用蓝牙耳机处理音频业务1。在电子设备1响应于用户对第一提示信息的确认操作后,请求蓝牙耳机暂停处理音频业务2,并利用蓝牙耳机处理音频业务1,其中,第一操作用于触发电子设备1恢复利用蓝牙耳机处理音频业务1。然后,电子设备1恢复利用蓝牙耳机处理音频业务1。Furthermore, after the Bluetooth headset suspends processing of the audio service 1, the electronic device 1 may display a first prompt message, wherein the first prompt message is used to request the user to determine whether the electronic device 1 resumes processing the audio service 1 using the Bluetooth headset. After the electronic device 1 responds to the user's confirmation operation on the first prompt message, the Bluetooth headset is requested to suspend processing of the audio service 2, and the Bluetooth headset is used to process the audio service 1, wherein the first operation is used to trigger the electronic device 1 to resume processing the audio service 1 using the Bluetooth headset. Then, the electronic device 1 resumes processing the audio service 1 using the Bluetooth headset.
本方案中,不是单纯按照音频业务设定的业务优先级顺序,决定处理业务优先级较高的一个电子设备的音频业务。在暂停一个音频业务后,可以由用户决定是否继续该音频业务。之后,可以按照用户的意愿选择是否恢复被抢占的音频业务。如此,提高了音频业务切换的灵活度,提高用户体验。In this solution, the audio service of an electronic device with a higher service priority is not simply decided according to the service priority order set for the audio service. After pausing an audio service, the user can decide whether to continue the audio service. Afterwards, the user can choose whether to resume the preempted audio service according to his/her wishes. In this way, the flexibility of audio service switching is improved, and the user experience is improved.
手机200的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的安卓Android系统为例,示例性说明手机200的软件结构。The software system of the mobile phone 200 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of a layered architecture as an example to exemplify the software structure of the mobile phone 200.
图11根据本申请的一些实施例,示出了一种手机200的软件结构框图。分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android Runtime)和系统库,以及内核层。FIG. 11 shows a software structure diagram of a mobile phone 200 according to some embodiments of the present application. The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, namely, from top to bottom, the application layer, the application framework layer, the Android Runtime and the system library, and the kernel layer.
如图11所示,应用程序层可以包括音乐、视频、通话、铃声、闹钟、蓝牙、导航、音频管家、图库、录音等应用程序。当然,应用程序层还可以包括其他应用程序,例如支付应用,购物应用、银行应用、聊天应用或理财应用等,本申请不做限定。其中,音频管家用于感知蓝牙耳机处理音频业务的状态:空闲中、处理音频业务中。音频管家还用于感知音频业务的抢占事件和音频业务的状态恢复事件。其中,音频业务的抢占是指蓝牙耳机处理音频业务的时候,又检测到了另一个电子设备发起的待处理音频业务,然后,暂停处理正在处理的音频业务,处理另一个电子设备发起的待处理音频业务的过程。音频业务的状态恢复事件是指音频业务的抢占事件发生后,蓝牙耳机暂停处理另一个电子设备发起的待处理音频业务,处理之前暂停处理的音频业务的过程。音频管家还用于显示第一提示信息,该第一提示信息用于指示用户进行音频业务抢占处理和音频业务的状态恢复处理的选择。例如,音频管家用于显示前述“一键抢回”弹窗。As shown in Figure 11, the application layer may include applications such as music, video, call, ringtone, alarm, Bluetooth, navigation, audio manager, gallery, recording, etc. Of course, the application layer may also include other applications, such as payment applications, shopping applications, banking applications, chat applications or financial management applications, etc., which are not limited in this application. Among them, the audio manager is used to sense the state of the Bluetooth headset processing audio services: idle, processing audio services. The audio manager is also used to sense the preemption event of the audio service and the state recovery event of the audio service. Among them, the preemption of the audio service refers to the process of suspending the processing of the audio service being processed and processing the audio service initiated by another electronic device when the Bluetooth headset processes the audio service, and then suspending the processing of the audio service being processed and processing the audio service initiated by another electronic device. The state recovery event of the audio service refers to the process of the Bluetooth headset suspending the processing of the audio service initiated by another electronic device after the preemption event of the audio service occurs, and processing the audio service that was previously suspended. The audio manager is also used to display a first prompt message, which is used to instruct the user to select the preemption processing of the audio service and the state recovery processing of the audio service. For example, the audio manager is used to display the aforementioned "one-key grab back" pop-up window.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。例如可以包括电话管理器、计算引擎、通知管理器、多媒体框架、状态感知模块、进程管理器等,本申请实施例对此不做任何限制。The application framework layer provides an application programming interface (API) and a programming framework for the applications of the application layer. The application framework layer includes some predefined functions. For example, it may include a phone manager, a computing engine, a notification manager, a multimedia framework, a state perception module, a process manager, etc., and the embodiments of the present application do not impose any restrictions on this.
其中,进程管理器用于创建、中止进程和线程。Among them, the process manager is used to create and terminate processes and threads.
电话管理器用于提供手机200的通信功能。例如通话状态的管理(包括接通,挂断 等)。The phone manager is used to provide the communication functions of the mobile phone 200. For example, the management of the call status (including connecting, hanging up, etc.) wait).
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,电子设备振动,指示灯闪烁等。The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
状态感知模块主要负责确认手机200自身的状态及与手机200蓝牙连接的无线设备(例如,蓝牙耳机100)的状态。其中,手机200自身的状态可以包括激活状态和非激活状态,与手机蓝牙连接的设备的状态可以包括空闲状态或者非空闲状态。状态感知模块可通过监控各种应用进程、线程,确认手机200自身的状态。状态感知模块可通过接收到的广播信息(例如,BLE广播)确定与手机200蓝牙连接的设备的状态。The state perception module is mainly responsible for confirming the state of the mobile phone 200 itself and the state of the wireless device (e.g., Bluetooth headset 100) connected to the mobile phone 200 via Bluetooth. Among them, the state of the mobile phone 200 itself may include an activated state and an inactivated state, and the state of the device connected to the mobile phone via Bluetooth may include an idle state or a non-idle state. The state perception module can confirm the state of the mobile phone 200 itself by monitoring various application processes and threads. The state perception module can determine the state of the device connected to the mobile phone 200 via Bluetooth through the received broadcast information (e.g., BLE broadcast).
多媒体框架可以接收应用层各个应用程序发送的音频业务,识别音频业务的类型;以及进行业务仲裁和抢占。本申请实施例中,多媒体框架用于在接收到应用程序发送的处理音频业务请求的情况下,根据音频业务请求中音频流类型,确定音频业务的类型,进而再根据蓝牙耳机处理音频业务的状态,选择音频播放设备。多媒体框架还用于在接收到音频管家发送的音频业务抢占通知的情况下,向蓝牙模块发送音频业务抢占通知。The multimedia framework can receive audio services sent by various applications in the application layer, identify the type of audio services, and perform service arbitration and preemption. In an embodiment of the present application, the multimedia framework is used to determine the type of audio service based on the audio stream type in the audio service request when receiving a request to process an audio service sent by an application, and then select an audio playback device based on the state of the Bluetooth headset processing the audio service. The multimedia framework is also used to send an audio service preemption notification to the Bluetooth module when receiving an audio service preemption notification sent by an audio manager.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如,OpenGL ES),二维图形处理库(例如,SGL)等。The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (e.g., OpenGL ES), 2D graphics processing library (e.g., SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
OpenGL ES用于实现三维图形绘图,图像渲染,合成,和图层处理等。OpenGL ES is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
SGL是2D绘图的绘图引擎。SGL is a graphics engine for 2D graphics.
安卓运行时(Android Runtime)包括核心库和虚拟机。Android Runtime负责安卓系统的调度和管理。核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。Android Runtime includes core libraries and virtual machines. Android Runtime is responsible for scheduling and management of the Android system. The core library consists of two parts: one is the function that the Java language needs to call, and the other is the Android core library. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform object life cycle management, stack management, thread management, security and exception management, and garbage collection.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动,蓝牙模块。The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, sensor driver, and Bluetooth module.
除此之外,系统库以及内核层之间还包括硬件层,硬件层包括显示器、摄像头、喇叭(也可称为扬声器)以及蓝牙模块等。蓝牙模块可包括实现蓝牙连接、数据交互的硬件单元:无线射频单元(Radio)、基带或链路控制单元(link controller)、链路管理单元(link manager)等。无线射频单元用于实现数据和语音的发送/接收的无线射频单元(Radio);链路管理单元用于进行射频信号与数字或语音信号的相互转化,实现 基带协议和其它的底层连接规程;链路管理单元负责管理蓝牙设备之间的通信,实现链路的建立、验证、链路配置等操作。In addition, there is a hardware layer between the system library and the kernel layer, which includes a display, camera, speaker (also called loudspeaker) and Bluetooth module. The Bluetooth module may include hardware units for Bluetooth connection and data interaction: wireless radio unit (Radio), baseband or link control unit (link controller), link management unit (link manager), etc. The wireless radio unit is used to realize the wireless radio unit (Radio) for sending/receiving data and voice; the link management unit is used to convert radio frequency signals into digital or voice signals to realize Baseband protocol and other underlying connection procedures; the link management unit is responsible for managing the communication between Bluetooth devices and implementing operations such as link establishment, verification, and link configuration.
以下实施例结合附图介绍本申请实施例的应用场景及本申请实施例的方法。The following embodiments introduce the application scenarios of the embodiments of the present application and the methods of the embodiments of the present application in conjunction with the accompanying drawings.
示例性的,本申请实施例中,以电子设备1(即第一电子设备)是手机200,电子设备2(即第二电子设备)是平板300,蓝牙耳机是蓝牙耳机100为例,介绍本申请实施例的方法。其中,音频业务1是第一音频业务,音频业务2是第二音频业务。For example, in the embodiment of the present application, the method of the embodiment of the present application is introduced by taking the electronic device 1 (i.e., the first electronic device) as a mobile phone 200, the electronic device 2 (i.e., the second electronic device) as a tablet 300, and the Bluetooth headset as a Bluetooth headset 100 as an example. Among them, the audio service 1 is the first audio service, and the audio service 2 is the second audio service.
本申请实施例中,如图2所示,手机200和平板300均可以与蓝牙耳机100建立无线通信通道(如实体连接)。手机200可以利用蓝牙耳机100处理音频业务1,如利用蓝牙耳机100播放手机200的音乐。之后,如图3所示,平板300可能会检测到音频业务2。例如,平板300可能会接收到来电,需要利用蓝牙耳机100接听电话;或者,平板300可能会需要利用蓝牙耳机100播放音乐。此时,音频业务2的业务优先级可能大于或等于音频业务1的业务优先级。例如,在音频业务2为接听来电,音频业务1为播放音乐的情况下,音频业务2的业务优先级高于音频业务1的业务优先级。又例如,在音频业务2为播放音乐,音频业务1为播放音乐的情况下,音频业务2的业务优先级等于音频业务1的业务优先级。本申请实施例后续介绍各音频业务的优先级的高低,此处不予赘述。In the embodiment of the present application, as shown in FIG2, both the mobile phone 200 and the tablet 300 can establish a wireless communication channel (such as a physical connection) with the Bluetooth headset 100. The mobile phone 200 can use the Bluetooth headset 100 to process the audio service 1, such as using the Bluetooth headset 100 to play the music of the mobile phone 200. Afterwards, as shown in FIG3, the tablet 300 may detect the audio service 2. For example, the tablet 300 may receive an incoming call and need to answer the call using the Bluetooth headset 100; or, the tablet 300 may need to play music using the Bluetooth headset 100. At this time, the service priority of the audio service 2 may be greater than or equal to the service priority of the audio service 1. For example, when the audio service 2 is answering the incoming call and the audio service 1 is playing music, the service priority of the audio service 2 is higher than the service priority of the audio service 1. For another example, when the audio service 2 is playing music and the audio service 1 is playing music, the service priority of the audio service 2 is equal to the service priority of the audio service 1. The embodiment of the present application will later introduce the priority of each audio service, which will not be repeated here.
在音频业务2的业务优先级大于或等于音频业务1的业务优先级的情况下,平板300可以请求蓝牙耳机100暂停处理音频业务1(如播放手机200的音乐),并利用蓝牙耳机100处理音频业务2(如接听平板300的来电)。此时,手机200的音频业务1被平板300的音频业务2抢占。When the service priority of audio service 2 is greater than or equal to the service priority of audio service 1, tablet 300 can request Bluetooth headset 100 to suspend processing of audio service 1 (such as playing music from mobile phone 200) and use Bluetooth headset 100 to process audio service 2 (such as answering a call from tablet 300). At this time, audio service 1 of mobile phone 200 is preempted by audio service 2 of tablet 300.
为了保证手机200的音频业务1被平板300的音频业务2抢占后,手机200的音频业务1可以重新抢占蓝牙耳机100的使用权。手机200可以为用户提供“一键抢回”服务。具体的,手机200在蓝牙耳机100暂停处理音频业务1后,可以显示第一提示信息。该第一提示信息用于请求用户确定手机200是否恢复利用蓝牙耳机100处理音频业务1。也就是说,该第一提示信息用于请求用户确定音频业务1是否要重新抢占蓝牙耳机100的使用权。例如,图12根据本申请的一些实施例,示出了一种音频业务恢复处理方法的应用场景示意图,如图12所示,在蓝牙耳机100暂停播放手机200的音乐,播放平板300的音乐后,手机200显示“一键抢回”弹窗。图13根据本申请的一些实施例,示出了一种“一键抢回”窗口的操作界面示意图,如图13所示,手机200显示“一键抢回”弹窗1。“一键抢回”弹窗1包括提示信息:“是否恢复利用蓝牙耳机100处理音频业务1?”,以及确认选项和取消选项。手机200检测到用户点击“一键抢回”弹窗1中的确认选项,则手机200的音频业务1可以重新抢占蓝牙耳机100的使用权。图14根据本申请的一些实施例,示出了一种音频业务恢复处理方法的应用场景示意图,如图14所示,手机200检测到用户点击“一键抢回”弹窗中确认选项后,手机200可以请求蓝牙耳机100暂停播放平板300的音乐,并利用蓝牙耳机100播放手机200的音乐,于是,蓝牙耳机100又恢复播放手机200的音乐。第一提示信息可以显示在手机200的桌面,也可以显示在音频应用的界面,也可以显示在手机200的下拉通知管理菜单中。In order to ensure that the audio service 1 of the mobile phone 200 can re-seize the right to use the Bluetooth headset 100 after being preempted by the audio service 2 of the tablet 300. The mobile phone 200 can provide the user with a "one-key retake" service. Specifically, the mobile phone 200 can display a first prompt message after the Bluetooth headset 100 suspends processing of the audio service 1. The first prompt message is used to request the user to determine whether the mobile phone 200 resumes using the Bluetooth headset 100 to process the audio service 1. In other words, the first prompt message is used to request the user to determine whether the audio service 1 is to re-seize the right to use the Bluetooth headset 100. For example, FIG. 12 shows a schematic diagram of an application scenario of an audio service recovery processing method according to some embodiments of the present application. As shown in FIG. 12, after the Bluetooth headset 100 pauses playing the music of the mobile phone 200 and plays the music of the tablet 300, the mobile phone 200 displays a "one-key retake" pop-up window. FIG. 13 shows a schematic diagram of an operation interface of a "one-key retake" window according to some embodiments of the present application. As shown in FIG. 13, the mobile phone 200 displays a "one-key retake" pop-up window 1. The "one-click reclaim" pop-up window 1 includes a prompt message: "Do you want to resume using the Bluetooth headset 100 to process the audio service 1?", as well as a confirmation option and a cancel option. When the mobile phone 200 detects that the user clicks the confirmation option in the "one-click reclaim" pop-up window 1, the audio service 1 of the mobile phone 200 can re-seize the right to use the Bluetooth headset 100. Figure 14 shows an application scenario schematic diagram of an audio service recovery processing method according to some embodiments of the present application. As shown in Figure 14, after the mobile phone 200 detects that the user clicks the confirmation option in the "one-click reclaim" pop-up window, the mobile phone 200 can request the Bluetooth headset 100 to pause playing the music of the tablet 300, and use the Bluetooth headset 100 to play the music of the mobile phone 200, so that the Bluetooth headset 100 resumes playing the music of the mobile phone 200. The first prompt message can be displayed on the desktop of the mobile phone 200, can also be displayed in the interface of the audio application, and can also be displayed in the drop-down notification management menu of the mobile phone 200.
本方案中,不是单纯按照音频业务设定的业务优先级顺序,决定处理业务优先级 较高的一个电子设备的音频业务。在暂停播放手机200的音乐后,可以由用户决定是否继续该音频业务。之后,可以按照用户的意愿选择是否恢复被抢占的播放手机200的音乐。如此,提高了音频业务切换的灵活度,提高用户体验。In this solution, the priority of processing services is not determined simply according to the service priority order set for audio services. The audio service of an electronic device with a higher frequency. After pausing the music played by the mobile phone 200, the user can decide whether to continue the audio service. Afterwards, the user can choose whether to resume the preempted music played by the mobile phone 200 according to the user's wishes. In this way, the flexibility of audio service switching is improved, and the user experience is improved.
在本申请实施例中,不同音频业务可以对应不同的优先级。优先级较高的音频业务通常是重要的、关键的音频业务,优先级较高的音频业务可以被蓝牙耳机优先处理。示例性的,音频业务可以包括多种类型,例如音频业务可以包括通话业务、多媒体业务、通知提示业务等。通话业务可以包括在电话呼叫(包括电话呼入和电话呼出)、视频通话、音频通话、语音消息、游戏或语音助手等场景下,为用户播放对端的语音数据,或者采集用户的语音数据发送给对端,以及播放来电铃声等。多媒体业务可以包括播放音乐、视频、录音、游戏的背景音乐、文本转语音的声音等。通知提示业务可以包括播放短信提示音、推送通知提示音、闹钟铃声、系统声音(例如调节音量时的声音、拍摄时的快门声音等)。通知提示业务、多媒体业务以及通话业务的优先级依次升高。在其他实施方式中,音频业务可以包括更多的类型,在此不做具体限制。其中,音频业务的优先级可以是预先设置的,也可以用户主动设置的,在此不做具体限制。例如,通话业务的业务优先级大于多媒体业务的业务优先级,多媒体业务的业务优先级大于通知提示业务的业务优先级。In the embodiment of the present application, different audio services may correspond to different priorities. Audio services with higher priorities are usually important and critical audio services, and audio services with higher priorities may be processed preferentially by Bluetooth headsets. Exemplarily, audio services may include multiple types, such as audio services may include call services, multimedia services, notification services, etc. Call services may include playing the voice data of the other end for the user in scenarios such as phone calls (including incoming and outgoing calls), video calls, audio calls, voice messages, games or voice assistants, or collecting the user's voice data and sending it to the other end, as well as playing incoming call ringtones, etc. Multimedia services may include playing music, videos, recordings, background music for games, text-to-speech sounds, etc. Notification services may include playing SMS prompts, push notification prompts, alarm ringtones, system sounds (such as sounds when adjusting the volume, shutter sounds when shooting, etc.). The priorities of notification services, multimedia services, and call services increase in sequence. In other embodiments, audio services may include more types, which are not specifically limited here. Among them, the priority of the audio service may be pre-set or actively set by the user, which is not specifically limited here. For example, the service priority of the call service is higher than the service priority of the multimedia service, and the service priority of the multimedia service is higher than the service priority of the notification service.
在一些实施例中,平板300检测到音频业务2后,请求蓝牙耳机100暂停处理音频业务1,并利用蓝牙耳机100处理音频业务2。具体包括如下实现方案:图15根据本申请的一些实施例,示出了一种音频业务恢复处理方法的应用场景示意图。如图15所示,平板300检测到音频业务2,例如,平板300可能会接收到来电,需要利用蓝牙耳机100接听电话;或者,平板300可能会需要利用蓝牙耳机100播放音乐。平板300通过蓝牙耳机100向手机200发送业务暂停指令。手机200可以接收该业务暂停指令。手机200接收到该业务暂停指令后,可以停止向蓝牙耳机100发送音频业务1的音频数据,如播放手机200的音乐对应的音频数据。并且,平板300可以向蓝牙耳机100发送音频业务2的音频数据。蓝牙耳机100接收音频业务2的音频数据,处理音频业务2,如利用蓝牙耳机100播放平板300的音乐。In some embodiments, after the tablet 300 detects the audio service 2, it requests the Bluetooth headset 100 to suspend processing the audio service 1, and uses the Bluetooth headset 100 to process the audio service 2. Specifically, the following implementation schemes are included: FIG. 15 shows a schematic diagram of an application scenario of an audio service recovery processing method according to some embodiments of the present application. As shown in FIG. 15, the tablet 300 detects the audio service 2. For example, the tablet 300 may receive an incoming call and needs to use the Bluetooth headset 100 to answer the call; or, the tablet 300 may need to use the Bluetooth headset 100 to play music. The tablet 300 sends a service suspension instruction to the mobile phone 200 through the Bluetooth headset 100. The mobile phone 200 can receive the service suspension instruction. After receiving the service suspension instruction, the mobile phone 200 can stop sending audio data of the audio service 1 to the Bluetooth headset 100, such as playing the audio data corresponding to the music of the mobile phone 200. In addition, the tablet 300 can send audio data of the audio service 2 to the Bluetooth headset 100. The Bluetooth headset 100 receives the audio data of the audio service 2 and processes the audio service 2, such as using the Bluetooth headset 100 to play the music of the tablet 300.
在该实施例中,平板300可以通过业务暂停指令请求蓝牙耳机100暂停处理音频业务1,并利用蓝牙耳机100处理音频业务2,以实现音频业务2对音频业务1的抢占。In this embodiment, the tablet 300 can request the Bluetooth headset 100 to suspend processing of the audio service 1 through a service suspension instruction, and use the Bluetooth headset 100 to process the audio service 2, so that the audio service 2 preempts the audio service 1.
需要说明的是,在该实施例中,蓝牙耳机100可以在平板300和手机200之间起到数据或信令(如上述业务暂停指令)中转的作用。蓝牙耳机100可以向手机200透传接收自平板300的数据或信令,也可以向平板300透传接收自手机200的数据或信令。It should be noted that, in this embodiment, the Bluetooth headset 100 can play the role of transferring data or signaling (such as the above-mentioned service suspension instruction) between the tablet 300 and the mobile phone 200. The Bluetooth headset 100 can transparently transmit the data or signaling received from the tablet 300 to the mobile phone 200, and can also transparently transmit the data or signaling received from the mobile phone 200 to the tablet 300.
在另一些实施例中,蓝牙耳机100接收到来自平板300或手机200的数据或信令后,也会响应该数据或信令做一些相应的操作。例如,蓝牙耳机100接收到来自平板300的业务暂停指令后,不仅会向手机200可以传输该业务暂停指令;还可以响应于该业务暂停指令,停止处理手机200的音频业务1。In other embodiments, after receiving data or signaling from the tablet 300 or the mobile phone 200, the Bluetooth headset 100 will also respond to the data or signaling and perform some corresponding operations. For example, after receiving a service suspension instruction from the tablet 300, the Bluetooth headset 100 will not only transmit the service suspension instruction to the mobile phone 200, but also stop processing the audio service 1 of the mobile phone 200 in response to the service suspension instruction.
在一些实施例中,上述平板300检测到音频业务2后,请求蓝牙耳机100暂停处理音频业务1,并利用蓝牙耳机100处理音频业务2,包括如下具体实现方案:手机200通过蓝牙耳机100向平板300指示音频业务1的业务优先级;平板300检测到音 频业务2后,对比音频业务2与音频业务1的业务优先级;若音频业务2的业务优先级大于音频业务1的业务优先级,平板300则请求蓝牙耳机100暂停处理音频业务1,并利用蓝牙耳机100处理音频业务2。In some embodiments, after the tablet 300 detects the audio service 2, it requests the Bluetooth headset 100 to suspend processing the audio service 1, and uses the Bluetooth headset 100 to process the audio service 2, including the following specific implementation scheme: the mobile phone 200 indicates the service priority of the audio service 1 to the tablet 300 through the Bluetooth headset 100; the tablet 300 detects the audio service 2, and the Bluetooth headset 100 suspends processing the audio service 1. After processing audio service 2, the tablet 300 compares the service priorities of audio service 2 and audio service 1; if the service priority of audio service 2 is greater than the service priority of audio service 1, the tablet 300 requests the Bluetooth headset 100 to suspend processing audio service 1 and use the Bluetooth headset 100 to process audio service 2.
在一些实施例中,业务暂停指令用于指示音频业务2的业务优先级;手机200接收业务暂停指令,停止向蓝牙耳机100发送音频业务1的音频数据,包括如下具体实现方案:手机200接收业务暂停指令,若业务暂停指令指示的音频业务2的业务优先级大于音频业务1的业务优先级,停止向蓝牙耳机100发送音频业务1的音频数据。本方案中,手机200在接收到业务暂停指令后,会再次确认音频业务2和音频业务1的业务优先级,进一步确保手机200执行业务暂停指令的准确度。In some embodiments, the service suspension instruction is used to indicate the service priority of audio service 2; the mobile phone 200 receives the service suspension instruction and stops sending the audio data of audio service 1 to the Bluetooth headset 100, including the following specific implementation scheme: the mobile phone 200 receives the service suspension instruction, and if the service priority of audio service 2 indicated by the service suspension instruction is greater than the service priority of audio service 1, stops sending the audio data of audio service 1 to the Bluetooth headset 100. In this scheme, after receiving the service suspension instruction, the mobile phone 200 will reconfirm the service priorities of audio service 2 and audio service 1, further ensuring the accuracy of the mobile phone 200 executing the service suspension instruction.
可以理解,当同时需要蓝牙耳机100的使用权的音频业务处于同一业务优先级的情况下,后发起音频业务的平板300可以显示用于请求用户确定平板300是否抢占蓝牙耳机100来处理音频业务2的提示信息,如此,便可以由用户的意愿决定是否先处理后发起的音频业务2,提高用户体验。具体的,在一些实施例中,若音频业务2的业务优先级等于音频业务1的业务优先级,平板300则显示第二提示信息;其中,第二提示信息用于请求用户确定平板300是否抢占蓝牙耳机100来处理音频业务2;平板300响应于用户对第二提示信息的第三操作,请求蓝牙耳机100暂停处理音频业务1,并利用蓝牙耳机100处理音频业务2;其中,第三操作用于触发平板300抢占蓝牙耳机100来处理音频业务2。第二提示信息可以显示在平板300的桌面,也可以显示在平板300的音频应用的界面,也可以显示在平板300的下拉通知管理菜单中。平板300的操作界面可以同时包括第二提示信息和与之对应的确认选项按钮,第三操作可以为用户对第二提示信息对应的确认选项按钮的选择操作,例如,用户点击确认选项按钮。It can be understood that when the audio services that require the right to use the Bluetooth headset 100 at the same time are at the same service priority, the tablet 300 that initiates the audio service later can display a prompt message for requesting the user to determine whether the tablet 300 preempts the Bluetooth headset 100 to process the audio service 2. In this way, the user's willingness can determine whether to process the audio service 2 initiated later first, thereby improving the user experience. Specifically, in some embodiments, if the service priority of the audio service 2 is equal to the service priority of the audio service 1, the tablet 300 displays a second prompt message; wherein the second prompt message is used to request the user to determine whether the tablet 300 preempts the Bluetooth headset 100 to process the audio service 2; the tablet 300 responds to the user's third operation on the second prompt message, requests the Bluetooth headset 100 to suspend the processing of the audio service 1, and uses the Bluetooth headset 100 to process the audio service 2; wherein the third operation is used to trigger the tablet 300 to preempt the Bluetooth headset 100 to process the audio service 2. The second prompt message can be displayed on the desktop of the tablet 300, can also be displayed on the interface of the audio application of the tablet 300, and can also be displayed in the drop-down notification management menu of the tablet 300. The operation interface of the tablet 300 may include the second prompt information and a corresponding confirmation option button at the same time, and the third operation may be a selection operation of the user on the confirmation option button corresponding to the second prompt information, for example, the user clicks the confirmation option button.
可以理解,为了提高手机200恢复原本暂停的音频业务的效率,第一提示信息的显示时间需要控制在一定时间,若在该控制时间内,检测到用户对第一提示信息的第一操作,则手机200恢复原本暂停的音频业务。It can be understood that in order to improve the efficiency of mobile phone 200 in resuming the originally suspended audio service, the display time of the first prompt information needs to be controlled within a certain time. If the user's first operation on the first prompt information is detected within the control time, mobile phone 200 resumes the originally suspended audio service.
具体的,在一些实施例中,若手机200在第一预设时长内,接收到用户对第一提示信息的第一操作,手机200则响应于第一操作,请求蓝牙耳机100暂停处理音频业务2,并利用蓝牙耳机100处理音频业务1。第一预设时长可以是10秒至1分钟中的任一一段时长。Specifically, in some embodiments, if the mobile phone 200 receives a first operation of the user on the first prompt information within a first preset time, the mobile phone 200, in response to the first operation, requests the Bluetooth headset 100 to suspend processing of audio service 2, and uses the Bluetooth headset 100 to process audio service 1. The first preset time can be any time from 10 seconds to 1 minute.
在其他一些实施例中,即使手机200未检测到用户及时进行恢复原本暂停的音频业务的选择操作,手机200也可以在蓝牙耳机100处理完音频业务2后,自动恢复利用蓝牙耳机100处理音频业务1。具体地,若手机200在第一预设时长内,未接收到用户对第一提示信息的操作,手机200则在蓝牙耳机100处理完音频业务2后,便可以自动恢复利用蓝牙耳机100处理音频业务1。如此,手机200在蓝牙耳机100处理完音频业务2后,无需用户操作,便可以自动恢复利用蓝牙耳机100处理音频业务1,从而提高用户体验。In some other embodiments, even if the mobile phone 200 does not detect that the user has timely selected to resume the originally suspended audio service, the mobile phone 200 can automatically resume using the Bluetooth headset 100 to process the audio service 1 after the Bluetooth headset 100 has processed the audio service 2. Specifically, if the mobile phone 200 does not receive the user's operation on the first prompt information within the first preset time, the mobile phone 200 can automatically resume using the Bluetooth headset 100 to process the audio service 1 after the Bluetooth headset 100 has processed the audio service 2. In this way, after the Bluetooth headset 100 has processed the audio service 2, the mobile phone 200 can automatically resume using the Bluetooth headset 100 to process the audio service 1 without the user's operation, thereby improving the user experience.
在其他一些实施例中,即使手机200检测到用户及时进行不恢复原本暂停的音频业务的选择操作,手机200也可以在蓝牙耳机100处理完音频业务2后,自动恢复利用蓝牙耳机100处理音频业务1。 In some other embodiments, even if the mobile phone 200 detects that the user promptly selects not to resume the originally paused audio service, the mobile phone 200 can automatically resume processing the audio service 1 using the Bluetooth headset 100 after the Bluetooth headset 100 completes processing the audio service 2.
具体地,若手机200在第一预设时长内接收到用户对第一提示信息的第二操作,第二操作用于触发手机200不恢复利用蓝牙耳机100处理音频业务1,手机200则在蓝牙耳机100处理完音频业务2后,自动恢复利用蓝牙耳机100处理音频业务1。其中,第一提示信息可以显示在手机200的桌面,也可以显示在音频应用的界面,也可以显示在手机200的下拉通知管理菜单中。手机200的操作界面可以同时包括第一提示信息和与之对应的取消选项按钮,第二操作可以为用户对第一提示信息对应的取消选项按钮的选择操作,例如,用户点击取消选项按钮。如此,手机200在蓝牙耳机100处理完音频业务2后,无需用户操作,便可以自动恢复利用蓝牙耳机100处理音频业务1,从而提高用户体验。Specifically, if the mobile phone 200 receives the second operation of the user on the first prompt information within the first preset time, the second operation is used to trigger the mobile phone 200 not to resume using the Bluetooth headset 100 to process the audio service 1, and the mobile phone 200 automatically resumes using the Bluetooth headset 100 to process the audio service 1 after the Bluetooth headset 100 completes the processing of the audio service 2. Among them, the first prompt information can be displayed on the desktop of the mobile phone 200, or can be displayed on the interface of the audio application, or can be displayed in the drop-down notification management menu of the mobile phone 200. The operation interface of the mobile phone 200 can include the first prompt information and the corresponding cancel option button at the same time, and the second operation can be the user's selection operation of the cancel option button corresponding to the first prompt information, for example, the user clicks the cancel option button. In this way, after the Bluetooth headset 100 completes the processing of the audio service 2, the mobile phone 200 can automatically resume using the Bluetooth headset 100 to process the audio service 1 without the need for user operation, thereby improving the user experience.
在其他一些实施例中,即使手机200检测到不进行恢复原本暂停的音频业务的指示,若在第一预设时长内,检测到平板300暂停处理音频业务2,也可以充分利用空闲的蓝牙耳机100恢复处理音频业务1,提高用户体验。In some other embodiments, even if the mobile phone 200 detects an instruction not to resume the originally paused audio service, if it detects that the tablet 300 suspends processing of the audio service 2 within the first preset time period, the idle Bluetooth headset 100 can be fully utilized to resume processing of the audio service 1, thereby improving the user experience.
具体地,若手机200在第一预设时长内,未接收到用户对第一提示信息的操作,或者,手机200在第一预设时长内接收到用户对第一提示信息的第二操作,手机200则在蓝牙耳机暂停处理第二音频业务后,利用蓝牙耳机处理第一音频业务;其中,第二操作用于触发手机200不恢复利用蓝牙耳机处理第一音频业务。Specifically, if the mobile phone 200 does not receive the user's operation on the first prompt information within the first preset time period, or the mobile phone 200 receives the user's second operation on the first prompt information within the first preset time period, the mobile phone 200 uses the Bluetooth headset to process the first audio service after the Bluetooth headset suspends processing the second audio service; wherein the second operation is used to trigger the mobile phone 200 not to resume using the Bluetooth headset to process the first audio service.
在其他一些实施例中,无论手机200检测到用户是不是进行恢复原本暂停的音频业务的选择操作,手机200都可以在蓝牙耳机100处理完音频业务2后,或者暂停处理完音频业务2的情况下,自动恢复利用蓝牙耳机100处理音频业务1,提高用户体验。In some other embodiments, regardless of whether the mobile phone 200 detects that the user has selected to resume the originally paused audio service, the mobile phone 200 can automatically resume using the Bluetooth headset 100 to process audio service 1 after the Bluetooth headset 100 has completed processing audio service 2, or when the processing of audio service 2 is paused, thereby improving the user experience.
具体地,手机200响应于用户对第一提示信息的第二操作,若平板300在第二预设时长内利用蓝牙耳机100处理完音频业务2,手机200则在蓝牙耳机100处理完音频业务2后,利用蓝牙耳机100处理音频业务1;或者,手机200响应于用户对第一提示信息的第二操作,若平板300在第二预设时长内暂停利用蓝牙耳机100处理音频业务2,手机200则在蓝牙耳机100暂停处理音频业务2后,利用蓝牙耳机100处理音频业务1;其中,第二操作用于触发手机200不恢复利用蓝牙耳机100处理音频业务1。第二预设时长可以是3分钟至4分钟中的任一一段时长。例如,蓝牙耳机100暂停播放手机200的媒体,播放平板300的通话。若平板300的通话挂断后,如手机200的媒体仍然处于待播放的状态,且蓝牙耳机100暂停播放手机200的媒体的时刻至当前的时长小于3分钟,则恢复至蓝牙耳机100播放手机200的媒体。Specifically, the mobile phone 200 responds to the user's second operation on the first prompt information. If the tablet 300 uses the Bluetooth headset 100 to process the audio service 2 within the second preset time, the mobile phone 200 uses the Bluetooth headset 100 to process the audio service 1 after the Bluetooth headset 100 processes the audio service 2; or, the mobile phone 200 responds to the user's second operation on the first prompt information. If the tablet 300 pauses using the Bluetooth headset 100 to process the audio service 2 within the second preset time, the mobile phone 200 uses the Bluetooth headset 100 to process the audio service 1 after the Bluetooth headset 100 pauses processing the audio service 2; wherein the second operation is used to trigger the mobile phone 200 not to resume using the Bluetooth headset 100 to process the audio service 1. The second preset time can be any time between 3 minutes and 4 minutes. For example, the Bluetooth headset 100 pauses playing the media of the mobile phone 200 and plays the call of the tablet 300. If the call on the tablet 300 is hung up, if the media of the mobile phone 200 is still in a waiting state, and the duration from when the Bluetooth headset 100 paused playing the media of the mobile phone 200 to the current time is less than 3 minutes, the Bluetooth headset 100 resumes playing the media of the mobile phone 200.
在一些实施例中,蓝牙耳机100暂停处理音频业务1后,手机200也可以自动处理待处理的音频业务1,提高音频业务的完成度。平板300检测到音频业务2后,请求蓝牙耳机100暂停处理音频业务1,并利用蓝牙耳机100处理音频业务2之后,该方法还包括如下步骤:手机200可以将音频业务1进行静音处理、暂停处理,也可以利用手机200的音频部件处理音频业务1。音频部件可以是扬声器、插拔耳机或受话器。具体的,若音频业务1是通话、蓝牙录音、通知或系统等音频,则可以直接切换至手机200的音频部件继续音频业务。若音频业务1是媒体类型业务,则可以暂停(如音乐、视频),或者静音(如游戏)。In some embodiments, after the Bluetooth headset 100 suspends processing of audio service 1, the mobile phone 200 can also automatically process the pending audio service 1 to improve the completion of the audio service. After the tablet 300 detects the audio service 2, it requests the Bluetooth headset 100 to suspend processing of the audio service 1, and after using the Bluetooth headset 100 to process the audio service 2, the method also includes the following steps: the mobile phone 200 can mute or suspend the audio service 1, or use the audio component of the mobile phone 200 to process the audio service 1. The audio component can be a speaker, a plug-in headset, or a receiver. Specifically, if the audio service 1 is audio such as a call, Bluetooth recording, notification, or system, it can be directly switched to the audio component of the mobile phone 200 to continue the audio service. If the audio service 1 is a media type service, it can be paused (such as music, video), or muted (such as a game).
图16根据本申请的一些实施例,示出了一种能够实现本申请实施例提供的音频业 务恢复处理方法的手机200和平板300的功能模块示意图。FIG. 16 shows a method for implementing the audio industry provided by the embodiments of the present application according to some embodiments of the present application. Schematic diagram of functional modules of mobile phone 200 and tablet 300 in a service recovery processing method.
如图16所示,手机200包括音频应用201、音频管家202、多媒体框架203和蓝牙模块204。As shown in FIG. 16 , the mobile phone 200 includes an audio application 201 , an audio manager 202 , a multimedia framework 203 and a Bluetooth module 204 .
音频应用201可以包括用于播放音频的各种类型的应用。音频应用201用于检测音频业务的情况下,向多媒体框架203发送处理音频业务请求。The audio application 201 may include various types of applications for playing audio. When the audio application 201 detects an audio service, it sends a request to the multimedia framework 203 to process the audio service.
音频管家202用于感知蓝牙耳机100处理音频业务的状态:空闲中、处理音频业务中。音频管家202还用于感知音频业务的抢占和音频业务的状态恢复事件。其中,音频业务的抢占是指蓝牙耳机100处理音频业务的时候,又检测到了另一个电子设备发起的待处理音频业务,然后,暂停处理正在处理的音频业务,处理另一个电子设备发起的待处理音频业务的过程。音频业务的状态恢复事件是指音频业务的抢占事件发生后,蓝牙耳机100暂停处理另一个电子设备发起的待处理音频业务,处理之前暂停处理的音频业务的过程。音频管家202还用于显示第一提示信息,该第一提示信息用于指示用户进行音频业务抢占处理和音频业务的状态恢复处理的选择。例如,音频管家202用于显示前述“一键抢回”弹窗。The audio manager 202 is used to sense the state of the Bluetooth headset 100 processing audio services: idle, processing audio services. The audio manager 202 is also used to sense the preemption of audio services and the state recovery events of audio services. Among them, the preemption of audio services refers to the process in which the Bluetooth headset 100 detects a pending audio service initiated by another electronic device while processing an audio service, and then suspends the processing of the audio service being processed and processes the pending audio service initiated by another electronic device. The state recovery event of the audio service refers to the process in which the Bluetooth headset 100 suspends the processing of the pending audio service initiated by another electronic device after the preemption event of the audio service occurs, and processes the audio service that was previously suspended. The audio manager 202 is also used to display a first prompt message, which is used to instruct the user to select the preemption processing of the audio service and the state recovery processing of the audio service. For example, the audio manager 202 is used to display the aforementioned "one-key recovery" pop-up window.
多媒体框架203用于在接收到音频应用201发送的处理音频业务请求的情况下,根据音频业务请求中音频流类型,确定音频业务的类型,进而再根据蓝牙耳机100处理音频业务的状态,选择音频播放设备。多媒体框架203还用于在接收到音频管家302发送的音频业务抢占通知(图中简称抢占通知)的情况下,向蓝牙模块204发送音频业务抢占通知。The multimedia framework 203 is used to determine the type of audio service according to the audio stream type in the audio service request when receiving the audio service processing request sent by the audio application 201, and then select the audio playback device according to the state of the audio service processing by the Bluetooth headset 100. The multimedia framework 203 is also used to send an audio service preemption notification to the Bluetooth module 204 when receiving the audio service preemption notification (referred to as the preemption notification in the figure) sent by the audio manager 302.
蓝牙模块204用于支持各种指令和数据的传递。本申请实施例中,蓝牙耳机100用于支持音频数据传递、音频业务处理或/或暂停请求、音频业务抢占通知、音频业务处理状态发送。The Bluetooth module 204 is used to support the transmission of various instructions and data. In the embodiment of the present application, the Bluetooth headset 100 is used to support audio data transmission, audio service processing or/or pause request, audio service preemption notification, and audio service processing status transmission.
同理,平板300包括音频应用301、音频管家302、多媒体框架303和蓝牙模块304。Similarly, the tablet 300 includes an audio application 301 , an audio manager 302 , a multimedia framework 303 and a Bluetooth module 304 .
音频应用301可以包括用于播放音频的各种类型的应用。音频应用301用于检测音频业务的情况下,向多媒体框架303发送处理音频业务请求。The audio application 301 may include various types of applications for playing audio. When the audio application 301 detects an audio service, it sends a request to the multimedia framework 303 to process the audio service.
音频管家302用于感知蓝牙耳机100处理音频业务的状态:空闲中、处理音频业务中。音频管家302还用于感知音频业务的抢占和音频业务的状态恢复事件。其中,音频业务的抢占是指蓝牙耳机100处理音频业务的时候,又检测到了另一个电子设备发起的待处理音频业务,然后,暂停处理正在处理的音频业务,处理另一个电子设备发起的待处理音频业务的过程。音频业务的状态恢复事件是指音频业务的抢占事件发生后,蓝牙耳机100暂停处理另一个电子设备发起的待处理音频业务,处理之前暂停处理的音频业务的过程。音频管家302还用于显示第一提示信息,该第一提示信息用于指示用户进行音频业务抢占处理和音频业务的状态恢复处理的选择。例如,音频管家302用于显示前述“一键抢回”弹窗。The audio manager 302 is used to sense the state of the Bluetooth headset 100 processing audio services: idle, processing audio services. The audio manager 302 is also used to sense the preemption of audio services and the state recovery events of audio services. Among them, the preemption of audio services refers to the process in which the Bluetooth headset 100 detects a pending audio service initiated by another electronic device while processing an audio service, and then suspends the processing of the audio service being processed and processes the pending audio service initiated by another electronic device. The state recovery event of the audio service refers to the process in which the Bluetooth headset 100 suspends the processing of the pending audio service initiated by another electronic device after the preemption event of the audio service occurs, and processes the audio service that was previously suspended. The audio manager 302 is also used to display a first prompt message, which is used to instruct the user to select the preemption processing of the audio service and the state recovery processing of the audio service. For example, the audio manager 302 is used to display the aforementioned "one-key recapture" pop-up window.
多媒体框架303用于在接收到音频应用301发送的处理音频业务请求的情况下,根据音频业务请求中音频流类型,确定音频业务的类型,进而再根据蓝牙耳机100处理音频业务的状态,选择音频播放设备。多媒体框架303还用于在接收到音频管家302发送的音频业务抢占通知(图中简称抢占通知)的情况下,向蓝牙模块304发送音频 业务抢占通知。The multimedia framework 303 is used to determine the type of audio service according to the audio stream type in the audio service request when receiving the audio service processing request sent by the audio application 301, and then select the audio playback device according to the state of the Bluetooth headset 100 processing the audio service. The multimedia framework 303 is also used to send audio to the Bluetooth module 304 when receiving the audio service preemption notification (referred to as preemption notification in the figure) sent by the audio manager 302. Service preemption notification.
蓝牙模块304用于支持各种指令和数据的传递。本申请实施例中,蓝牙耳机100用于支持音频数据传递、音频业务处理或/或暂停请求、音频业务抢占通知、音频业务处理状态发送。The Bluetooth module 304 is used to support the transmission of various instructions and data. In the embodiment of the present application, the Bluetooth headset 100 is used to support audio data transmission, audio service processing or/or pause request, audio service preemption notification, and audio service processing status transmission.
图17根据本申请的一些实施例,对应于图12,示出了一种发生音频业务抢占事件时,被抢占音频业务的手机200各模块交互逻辑示意图。如图17所示:FIG17 , according to some embodiments of the present application, corresponds to FIG12 , and shows a schematic diagram of the interaction logic of various modules of the mobile phone 200 whose audio service is preempted when an audio service preemption event occurs. As shown in FIG17 :
若手机200正在利用蓝牙耳机100播放音乐,蓝牙耳机100接收到平板300发起的播放音乐请求,蓝牙耳机100判断出蓝牙耳机100处理音频业务的状态为抢占中,则向手机200发送抢占通知,蓝牙模块204接收到抢占事件和蓝牙耳机100处理音频业务的状态(简称耳机状态)。If the mobile phone 200 is playing music using the Bluetooth headset 100, the Bluetooth headset 100 receives a music playing request initiated by the tablet 300, and the Bluetooth headset 100 determines that the status of the Bluetooth headset 100 processing the audio service is preempted, then a preemption notification is sent to the mobile phone 200, and the Bluetooth module 204 receives the preemption event and the status of the Bluetooth headset 100 processing the audio service (referred to as the headset status).
蓝牙耳机100将抢占通知和耳机状态分别转发给音频管家202和多媒体框架203。多媒体框架203根据耳机状态所指示的蓝牙耳机100正处理的音频业务的业务优先级以及平板300发起的音频业务的业务优先级,确认是否需要进行音频业务抢占,若需要进行音频业务抢占,则通知音频应用201暂停播放,并将暂停播放结果发送至音频管家202,音频管家202在接收到暂停播放通知的情况下,则显示“一键抢回”窗口。The Bluetooth headset 100 forwards the preemption notification and headset status to the audio manager 202 and the multimedia framework 203 respectively. The multimedia framework 203 confirms whether it is necessary to preempt the audio service according to the service priority of the audio service being processed by the Bluetooth headset 100 indicated by the headset status and the service priority of the audio service initiated by the tablet 300. If it is necessary to preempt the audio service, the audio application 201 is notified to pause the playback, and the pause result is sent to the audio manager 202. When the audio manager 202 receives the pause notification, it displays a "one-key retake" window.
音频管家202在接收到抢占通知的情况下,先显示抢占通知窗口,抢占通知窗口用于向用户请求是否将自身音频业务静音或者切换至自身受话器、插拔耳机、扬声器播放音乐,若检测到用户选择前述任意一个选项,则根据选项的内容,执行相应的动作。When receiving the preemption notification, the audio manager 202 first displays the preemption notification window, which is used to request the user whether to mute their own audio service or switch to their own receiver, plug in or unplug headphones, or play music on the speaker. If it is detected that the user selects any of the above options, the corresponding action is performed according to the content of the option.
图18根据本申请的一些实施例,对应于图14,示出了一种被抢占音频业务的手机200恢复利用蓝牙耳机100播放音乐的交互逻辑示意图。如图18所示:FIG18 , according to some embodiments of the present application, corresponds to FIG14 , and shows an interactive logic diagram of a mobile phone 200 whose audio service has been seized and resumes playing music using a Bluetooth headset 100 . As shown in FIG18 :
平板300利用蓝牙耳机100播放音乐后,手机200检测到用户点击“一键抢回”弹窗中确认选项的操作后,调用多媒体框架203的接口,通知多媒体框架203播放音乐。然后,多媒体框架203再通知音频应用201利用蓝牙耳机100播放音乐。蓝牙模块204再将播放状态通知蓝牙耳机100。蓝牙耳机100收到平板300的播放通知之后,播放手机200的音乐,并通知平板300蓝牙耳机100处理音频业务的状态(简称耳机状态)。After the tablet 300 plays music using the Bluetooth headset 100, the mobile phone 200 detects that the user clicks the confirmation option in the "One-click Recover" pop-up window, and then calls the interface of the multimedia framework 203 to notify the multimedia framework 203 to play music. Then, the multimedia framework 203 notifies the audio application 201 to play music using the Bluetooth headset 100. The Bluetooth module 204 then notifies the Bluetooth headset 100 of the playing status. After receiving the playing notification from the tablet 300, the Bluetooth headset 100 plays the music of the mobile phone 200 and notifies the tablet 300 of the status of the Bluetooth headset 100 processing the audio service (referred to as the headset status).
在其他一些实施例中,对应于图2或图13的应用场景,若平板300检测到用户暂停播放音乐的操作,则暂停利用蓝牙耳机100播放音乐,此时,手机200确定蓝牙耳机100为空闲状态时,则自动恢复利用蓝牙耳机100播放音乐。具体地,参见图19,图19根据本申请的一些实施例,示出了一种平板300播放音乐暂停时,蓝牙耳机100处于空闲状态,手机200恢复利用蓝牙耳机100播放音乐的交互逻辑示意图。如图19所示:平板300检测到用户暂停播放音乐的操作,则暂停利用蓝牙耳机100播放音乐,蓝牙耳机100空闲,通知手机200恢复播放音乐的通知(图中简称恢复通知)和耳机状态。蓝牙耳机100将恢复播放音乐的通知和耳机状态分别转发给音频管家202和多媒体框架203。音频管家202调用多媒体框架203的接口,然后,多媒体框架203再通知音频应用201播放音乐。In some other embodiments, corresponding to the application scenario of FIG. 2 or FIG. 13, if the tablet 300 detects that the user has paused the operation of playing music, the Bluetooth headset 100 is paused to play music. At this time, when the mobile phone 200 determines that the Bluetooth headset 100 is in an idle state, the Bluetooth headset 100 is automatically resumed to play music. Specifically, referring to FIG. 19, FIG. 19 shows an interactive logic diagram of a tablet 300 pausing the music playing, the Bluetooth headset 100 is in an idle state, and the mobile phone 200 resumes the use of the Bluetooth headset 100 to play music according to some embodiments of the present application. As shown in FIG. 19: the tablet 300 detects that the user has paused the operation of playing music, then the Bluetooth headset 100 is paused to play music, the Bluetooth headset 100 is idle, and the mobile phone 200 is notified of the notification of resuming the music playing (referred to as the resume notification in the figure) and the headset status. The Bluetooth headset 100 forwards the notification of resuming the music playing and the headset status to the audio manager 202 and the multimedia framework 203 respectively. The audio manager 202 calls the interface of the multimedia framework 203, and then the multimedia framework 203 notifies the audio application 201 to play music.
图20根据本申请的一些实施例,对应于图2、图3、图12和图14对应的应用场景,示出了一种音频业务恢复处理方法的流程示意图。如图20所示,该流程包括如下 步骤:FIG20 shows a flowchart of an audio service recovery processing method according to some embodiments of the present application, corresponding to the application scenarios corresponding to FIG2, FIG3, FIG12 and FIG14. As shown in FIG20, the process includes the following: step:
131:蓝牙耳机100分别与手机200和平板300建立无线通信通道。131: The Bluetooth headset 100 establishes wireless communication channels with the mobile phone 200 and the tablet 300 respectively.
132:蓝牙耳机100播放手机200的音乐。132: The Bluetooth headset 100 plays music from the mobile phone 200.
133:平板300检测到播放音乐。133: The tablet 300 detects that music is being played.
在一些实施例中,平板300响应于用户播放选中音乐的操作,便可以检测到用户发起的音乐业务。In some embodiments, the tablet 300 can detect a music service initiated by the user in response to the user's operation of playing selected music.
134:蓝牙耳机100确定播放平板300的音乐的音频业务优先级大于播放手机200的音乐的音频业务优先级,请求暂停播放手机200的音乐,播放平板300的音乐。134: The Bluetooth headset 100 determines that the audio service priority of playing the music of the tablet 300 is greater than the audio service priority of playing the music of the mobile phone 200, and requests to pause playing the music of the mobile phone 200 and play the music of the tablet 300.
在本申请实施例中,电子设备的不同音频业务可以对应不同的优先级,优先级较高的音频业务通常是重要的、关键的音频业务,优先级较高的音频业务可以被蓝牙耳机优先处理。示例性的,音频业务可以包括多种类型,例如音频业务可以包括通话业务、多媒体业务、通知提示业务等。通话业务可以包括在电话呼叫(包括电话呼入和电话呼出)、视频通话、音频通话、语音消息、游戏或语音助手等场景下,为用户播放对端的语音数据,或者采集用户的语音数据发送给对端,以及播放来电铃声等。多媒体业务可以包括播放音乐、视频、录音、游戏的背景音乐、文本转语音的声音等。通知提示业务可以包括播放短信提示音、推送通知提示音、闹钟铃声、系统声音(例如调节音量时的声音、拍摄时的快门声音等)。通知提示业务、多媒体业务以及通话业务的优先级依次升高。在其他实施方式中,音频业务可以包括更多的类型,在此不做具体限制。其中,音频业务的优先级可以是预先设置的,也可以用户主动设置的,在此不做具体限制。例如,通话业务的业务优先级大于多媒体业务的业务优先级,多媒体业务的业务优先级大于通知提示业务的业务优先级。In the embodiment of the present application, different audio services of the electronic device may correspond to different priorities. Audio services with higher priorities are usually important and critical audio services, and audio services with higher priorities may be processed preferentially by Bluetooth headsets. Exemplarily, audio services may include multiple types, for example, audio services may include call services, multimedia services, notification services, etc. Call services may include playing the voice data of the other end for the user in scenarios such as phone calls (including incoming and outgoing calls), video calls, audio calls, voice messages, games or voice assistants, or collecting the user's voice data and sending it to the other end, as well as playing incoming call ringtones, etc. Multimedia services may include playing music, videos, recordings, background music of games, text-to-speech sounds, etc. Notification services may include playing SMS prompts, push notification prompts, alarm ringtones, system sounds (such as sounds when adjusting the volume, shutter sounds when shooting, etc.). The priorities of notification services, multimedia services, and call services increase in sequence. In other embodiments, audio services may include more types, which are not specifically limited here. Among them, the priority of the audio service may be pre-set or actively set by the user, which is not specifically limited here. For example, the service priority of the call service is higher than the service priority of the multimedia service, and the service priority of the multimedia service is higher than the service priority of the notification service.
135:蓝牙耳机100暂停播放手机200的音乐,播放平板300的音乐。135: The Bluetooth headset 100 pauses playing the music on the mobile phone 200 and plays the music on the tablet 300.
136:蓝牙耳机100向手机200发送暂停通知消息。136: The Bluetooth headset 100 sends a pause notification message to the mobile phone 200.
137:手机200显示第一提示信息,该第一提示信息用于请求用户是否恢复利用蓝牙耳机100播放手机200的音乐音频业务。137: The mobile phone 200 displays a first prompt message, where the first prompt message is used to request the user whether to resume using the Bluetooth headset 100 to play the music audio service of the mobile phone 200.
138:手机200响应于用户对第一提示信息的确认操作。138: The mobile phone 200 responds to the user's confirmation operation on the first prompt information.
该第一提示信息用于请求用户确定手机200是否恢复利用蓝牙耳机100播放音乐。The first prompt information is used to request the user to determine whether the mobile phone 200 resumes playing music using the Bluetooth headset 100.
该第一提示信息可以是“一键抢回”弹窗。确定操作可以是用户点击“一键抢回”弹窗中确认选项。The first prompt information may be a pop-up window of "One-click Retrieval". The confirmation operation may be that the user clicks on the confirmation option in the pop-up window of "One-click Retrieval".
139:手机200向蓝牙耳机100请求蓝牙耳机100暂停播放平板300的音乐。139: The mobile phone 200 requests the Bluetooth headset 100 to pause playing the music on the tablet 300.
在一些实施例中,手机200向蓝牙耳机100请求蓝牙耳机100暂停播放平板300的音乐后,蓝牙耳机100暂停播放平板300的音乐,播放手机200的音乐后,平板300可以利用自身的扬声器、插拔耳机或受话器等播放音乐。具体的,若音频业务1是通话、蓝牙录音、通知或系统等音频,则可以直接切换至平板300的音频部件继续音频业务。若音频业务1是媒体类型业务,则可以暂停(如音乐、视频),或者静音(如游戏)。In some embodiments, after the mobile phone 200 requests the Bluetooth headset 100 to pause playing the music of the tablet 300, the Bluetooth headset 100 pauses playing the music of the tablet 300. After playing the music of the mobile phone 200, the tablet 300 can play the music using its own speakers, plugging and unplugging headphones or receivers, etc. Specifically, if the audio service 1 is audio such as calls, Bluetooth recordings, notifications, or systems, the audio service can be directly switched to the audio component of the tablet 300 to continue. If the audio service 1 is a media type service, it can be paused (such as music, video), or muted (such as games).
在一些实施例中,当平板300正在使用蓝牙耳机100播放音乐,而被手机200发起的播放音乐业务抢占时,蓝牙耳机100会记录手机200的音乐播放状态,以备蓝牙耳机100被释放时恢复平板300使用蓝牙耳机100播放音乐。例如,如图19所示:平 板300检测到用户暂停播放音乐的操作,则暂停利用蓝牙耳机100播放音乐,蓝牙耳机100空闲,通知手机200恢复播放音乐的通知(图中简称恢复通知)和耳机状态。蓝牙耳机100将恢复播放音乐的通知和耳机状态分别转发给音频管家202和多媒体框架203。音频管家202调用多媒体框架203的接口,然后,多媒体框架203再通知音频应用201播放音乐。In some embodiments, when the tablet 300 is using the Bluetooth headset 100 to play music and is preempted by the music playing service initiated by the mobile phone 200, the Bluetooth headset 100 will record the music playing status of the mobile phone 200 in order to resume the tablet 300 using the Bluetooth headset 100 to play music when the Bluetooth headset 100 is released. For example, as shown in FIG. 19: When the board 300 detects the user's operation of pausing music playing, it pauses the use of the Bluetooth headset 100 to play music. The Bluetooth headset 100 is idle, and notifies the mobile phone 200 of a notification of resuming music playing (referred to as the resume notification in the figure) and the headset status. The Bluetooth headset 100 forwards the notification of resuming music playing and the headset status to the audio manager 202 and the multimedia framework 203 respectively. The audio manager 202 calls the interface of the multimedia framework 203, and then the multimedia framework 203 notifies the audio application 201 to play music.
1310:蓝牙耳机100播放手机200的音乐。1310: The Bluetooth headset 100 plays music from the mobile phone 200.
本方案中,不是单纯按照音频业务设定的业务优先级顺序,决定处理业务优先级较高的一个电子设备的音频业务。在暂停一个音频业务后,可以由用户决定是否继续该音频业务。之后,可以按照用户的意愿选择是否恢复被抢占的音频业务。如此,提高了音频业务切换的灵活度,提高用户体验。本申请公开的机制的各实施例可以被实现在硬件、软件、固件或这些实现方法的组合中。本申请的实施例可实现为在可编程系统上执行的计算机程序或程序代码,该可编程系统包括至少一个处理器、存储系统(包括易失性和非易失性存储器和/或存储元件)、至少一个输入设备以及至少一个输出设备。In this solution, the decision to process the audio service of an electronic device with a higher service priority is not made simply according to the service priority order set for the audio service. After pausing an audio service, the user can decide whether to continue the audio service. Afterwards, the user can choose whether to restore the preempted audio service according to his or her wishes. In this way, the flexibility of audio service switching is improved and the user experience is improved. The various embodiments of the mechanism disclosed in the present application can be implemented in hardware, software, firmware, or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device.
可将程序代码应用于输入指令,以执行本申请描述的各功能并生成输出信息。可以按已知方式将输出信息应用于一个或多个输出设备。为了本申请的目的,处理系统包括具有诸如例如数字信号处理器(Digital Signal Processor,DSP)、微控制器、专用集成电路(Application Specific Integrated Circuit,ASIC)或微处理器之类的处理器的任何系统。Program code may be applied to input instructions to perform the functions described herein and to generate output information. The output information may be applied to one or more output devices in a known manner. For purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.
程序代码可以用高级程序化语言或面向对象的编程语言来实现,以便与处理系统通信。在需要时,也可用汇编语言或机器语言来实现程序代码。事实上,本申请中描述的机制不限于任何特定编程语言的范围。在任一情形下,该语言可以是编译语言或解释语言。Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.
在一些情况下,所公开的实施例可以以硬件、固件、软件或其任何组合来实现。所公开的实施例还可以被实现为由一个或多个暂时或非暂时性机器可读(例如,计算机可读)存储介质承载或存储在其上的指令,其可以由一个或多个处理器读取和执行。例如,指令可以通过网络或通过其他计算机可读存储介质分发。因此,机器可读存储介质可以包括用于以机器(例如,计算机)可读的形式存储或传输信息的任何机制,包括但不限于,软盘、光盘、光碟、只读存储器(CD-ROMs)、磁光盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、可擦除可编程只读存储器(Erasable Programmable Read Only Memory,EPROM)、电可擦除可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、磁卡或光卡、闪存、或用于基于因特网以电、光、声或其他形式的传播信号来传输信息(例如,载波、红外信号数字信号等)的有形的机器可读存储器。因此,机器可读存储介质包括适合于以机器(例如计算机)可读的形式存储或传输电子指令或信息的任何类型的机器可读存储介质。In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed over a network or through other computer-readable storage media. Therefore, machine-readable storage media may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including, but not limited to, floppy disks, optical disks, optical discs, CD-ROMs, magneto-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or tangible machine-readable storage for transmitting information via electrical, optical, acoustic or other forms of propagation signals (e.g., carrier waves, infrared signals, digital signals, etc.) over the Internet. Therefore, machine-readable storage media include any type of machine-readable storage media suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).
在附图中,可以以特定布置和/或顺序示出一些结构或方法特征。然而,应该理解,可能不需要这样的特定布置和/或排序。而是,在一些实施例中,这些特征可以以不同于说明性附图中所示的方式和/或顺序来布置。另外,在特定图中包括结构或方法 特征并不意味着暗示在所有实施例中都需要这样的特征,并且在一些实施例中,可以不包括这些特征或者可以与其他特征组合。In the accompanying drawings, some structural or method features may be shown in a particular arrangement and/or order. However, it should be understood that such a particular arrangement and/or order may not be required. Rather, in some embodiments, these features may be arranged in a manner and/or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure may not be necessary. Features are not meant to imply that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.
需要说明的是,本申请各设备实施例中提到的各单元/模块都是逻辑单元/模块,在物理上,一个逻辑单元/模块可以是一个物理单元/模块,也可以是一个物理单元/模块的一部分,还可以以多个物理单元/模块的组合实现,这些逻辑单元/模块本身的物理实现方式并不是最重要的,这些逻辑单元/模块所实现的功能的组合才是解决本申请所提出的技术问题的关键。此外,为了突出本申请的创新部分,本申请上述各设备实施例并没有将与解决本申请所提出的技术问题关系不太密切的单元/模块引入,这并不表明上述设备实施例并不存在其它的单元/模块。It should be noted that the units/modules mentioned in the various device embodiments of the present application are all logical units/modules. Physically, a logical unit/module can be a physical unit/module, or a part of a physical unit/module, or can be implemented as a combination of multiple physical units/modules. The physical implementation method of these logical units/modules themselves is not the most important. The combination of functions implemented by these logical units/modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units/modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units/modules in the above-mentioned device embodiments.
需要说明的是,在本专利的示例和说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "including one" do not exclude the existence of other identical elements in the process, method, article or device including the elements.
虽然通过参照本申请的某些优选实施例,已经对本申请进行了图示和描述,但本领域的普通技术人员应该明白,可以在形式上和细节上对其作各种改变,而不偏离本申请的精神和范围。 Although the present application has been illustrated and described with reference to certain preferred embodiments thereof, it will be apparent to those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application.

Claims (24)

  1. 一种音频业务处理方法,其特征在于,所述方法包括:A method for processing an audio service, characterized in that the method comprises:
    第一电子设备和第二电子设备均与蓝牙耳机建立无线通信通道;The first electronic device and the second electronic device both establish wireless communication channels with the Bluetooth headset;
    所述第一电子设备利用所述蓝牙耳机处理第一音频业务;The first electronic device processes a first audio service using the Bluetooth headset;
    所述第二电子设备检测到第二音频业务后,判断所述第二音频业务的业务优先级是否大于所述第一音频业务的业务优先级;After the second electronic device detects the second audio service, determining whether the service priority of the second audio service is greater than the service priority of the first audio service;
    若所述第二音频业务的业务优先级大于所述第一音频业务的业务优先级,所述第二电子设备请求所述蓝牙耳机暂停处理所述第一音频业务,利用所述蓝牙耳机处理所述第二音频业务。If the service priority of the second audio service is greater than the service priority of the first audio service, the second electronic device requests the Bluetooth headset to suspend processing of the first audio service and uses the Bluetooth headset to process the second audio service.
  2. 根据权利要求1所述的方法,其特征在于,所述请求所述蓝牙耳机暂停处理所述第一音频业务,利用所述蓝牙耳机处理所述第二音频业务,包括:The method according to claim 1, characterized in that the requesting the Bluetooth headset to suspend processing of the first audio service and using the Bluetooth headset to process the second audio service comprises:
    所述第二电子设备通过所述蓝牙耳机向所述第一电子设备发送业务暂停指令;The second electronic device sends a service suspension instruction to the first electronic device through the Bluetooth headset;
    所述第一电子设备接收所述业务暂停指令,停止向所述蓝牙耳机发送所述第一音频业务的音频数据;The first electronic device receives the service suspension instruction and stops sending the audio data of the first audio service to the Bluetooth headset;
    所述第二电子设备向所述蓝牙耳机发送所述第二音频业务的音频数据;The second electronic device sends the audio data of the second audio service to the Bluetooth headset;
    所述蓝牙耳机接收所述第二音频业务的音频数据,处理所述第二音频业务。The Bluetooth headset receives the audio data of the second audio service and processes the second audio service.
  3. 根据权利要求2所述的方法,其特征在于,在所述第二电子设备请求所述蓝牙耳机暂停处理所述第一音频业务,并利用所述蓝牙耳机处理所述第二音频业务之前,所述方法还包括:The method according to claim 2, characterized in that before the second electronic device requests the Bluetooth headset to suspend processing of the first audio service and uses the Bluetooth headset to process the second audio service, the method further comprises:
    所述第一电子设备通过所述蓝牙耳机向所述第二电子设备指示所述第一音频业务的业务优先级。The first electronic device indicates the service priority of the first audio service to the second electronic device through the Bluetooth headset.
  4. 根据权利要求2或3所述的方法,其特征在于,所述业务暂停指令用于指示所述第二音频业务的业务优先级;The method according to claim 2 or 3, characterized in that the service suspension instruction is used to indicate the service priority of the second audio service;
    所述第一电子设备接收所述业务暂停指令,停止向所述蓝牙耳机发送所述第一音频业务的音频数据,包括:The first electronic device receives the service suspension instruction and stops sending the audio data of the first audio service to the Bluetooth headset, including:
    所述第一电子设备接收所述业务暂停指令,若所述业务暂停指令指示的所述第二音频业务的业务优先级大于所述第一音频业务的业务优先级,停止向所述蓝牙耳机发送所述第一音频业务的音频数据。The first electronic device receives the service suspension instruction, and stops sending audio data of the first audio service to the Bluetooth headset if the service priority of the second audio service indicated by the service suspension instruction is greater than the service priority of the first audio service.
  5. 根据权利要求1-4中任一项所述的方法,其特征在于,所述请求所述蓝牙耳机暂停处理所述第一音频业务,并利用所述蓝牙耳机处理所述第二音频业务之后,所述方法还包括:The method according to any one of claims 1 to 4, characterized in that after requesting the Bluetooth headset to suspend processing of the first audio service and using the Bluetooth headset to process the second audio service, the method further comprises:
    所述第一电子设备利用所述第一电子设备的音频部件处理所述第一音频业务。The first electronic device processes the first audio service using an audio component of the first electronic device.
  6. 根据权利要求1-5中任一项所述的方法,其特征在于,所述蓝牙耳机处理的音频业务包括通话业务、多媒体业务和通知提示业务;The method according to any one of claims 1 to 5, characterized in that the audio services processed by the Bluetooth headset include call services, multimedia services and notification services;
    其中,所述通话业务的业务优先级大于所述多媒体业务的业务优先级,所述多媒体业务的业务优先级大于所述通知提示业务的业务优先级。The service priority of the call service is higher than the service priority of the multimedia service, and the service priority of the multimedia service is higher than the service priority of the notification service.
  7. 根据权利要求2-6中任一项所述的方法,其特征在于,所述利用所述蓝牙耳机处理所述第二音频业务之后,所述方法还包括:The method according to any one of claims 2 to 6, characterized in that after using the Bluetooth headset to process the second audio service, the method further comprises:
    所述第一电子设备在所述蓝牙耳机暂停处理所述第一音频业务后,显示第一提示 信息;其中,所述第一提示信息用于请求用户确定所述第一电子设备是否恢复利用所述蓝牙耳机处理所述第一音频业务;The first electronic device displays a first prompt after the Bluetooth headset suspends processing of the first audio service Information; wherein the first prompt information is used to request the user to determine whether the first electronic device resumes using the Bluetooth headset to process the first audio service;
    所述第一电子设备响应于用户对所述第一提示信息的第一操作,请求所述蓝牙耳机暂停处理所述第二音频业务,并利用所述蓝牙耳机处理所述第一音频业务;其中,所述第一操作用于触发所述第一电子设备恢复利用所述蓝牙耳机处理所述第一音频业务。The first electronic device, in response to the user's first operation on the first prompt information, requests the Bluetooth headset to suspend processing the second audio service and use the Bluetooth headset to process the first audio service; wherein the first operation is used to trigger the first electronic device to resume using the Bluetooth headset to process the first audio service.
  8. 根据权利要求7所述的方法,其特征在于,所述方法还包括:The method according to claim 7, characterized in that the method further comprises:
    若所述第二音频业务的业务优先级等于所述第一音频业务的业务优先级,所述第二电子设备则显示第二提示信息;其中,所述第二提示信息用于请求用户确定所述第二电子设备是否抢占所述蓝牙耳机来处理所述第二音频业务;If the service priority of the second audio service is equal to the service priority of the first audio service, the second electronic device displays a second prompt message; wherein the second prompt message is used to request the user to determine whether the second electronic device preempts the Bluetooth headset to process the second audio service;
    所述第二电子设备响应于用户对所述第二提示信息的第三操作,请求所述蓝牙耳机暂停处理所述第一音频业务,并利用所述蓝牙耳机处理所述第二音频业务;其中,所述第三操作用于触发所述第二电子设备抢占所述蓝牙耳机来处理所述第二音频业务。The second electronic device, in response to the user's third operation on the second prompt information, requests the Bluetooth headset to suspend processing the first audio service and use the Bluetooth headset to process the second audio service; wherein the third operation is used to trigger the second electronic device to preempt the Bluetooth headset to process the second audio service.
  9. 根据权利要求7或8所述的方法,其特征在于,所述第一电子设备响应于用户对所述第一提示信息的第一操作,请求所述蓝牙耳机暂停处理所述第二音频业务,并利用所述蓝牙耳机处理所述第一音频业务,包括:The method according to claim 7 or 8 is characterized in that, in response to the user's first operation on the first prompt information, the first electronic device requests the Bluetooth headset to suspend processing of the second audio service, and uses the Bluetooth headset to process the first audio service, comprising:
    若所述第一电子设备在第一预设时长内,接收到用户对所述第一提示信息的所述第一操作,所述第一电子设备则响应于所述第一操作,请求所述蓝牙耳机暂停处理所述第二音频业务,并利用所述蓝牙耳机处理所述第一音频业务。If the first electronic device receives the first operation of the user on the first prompt information within a first preset time period, the first electronic device, in response to the first operation, requests the Bluetooth headset to suspend processing of the second audio service and uses the Bluetooth headset to process the first audio service.
  10. 根据权利要求9所述的方法,其特征在于,所述方法还包括:The method according to claim 9, characterized in that the method further comprises:
    若所述第一电子设备在所述第一预设时长内,未接收到用户对所述第一提示信息的操作,或者,所述第一电子设备在所述第一预设时长内接收到用户对所述第一提示信息的第二操作,所述第一电子设备则在所述蓝牙耳机处理完所述第二音频业务后,利用所述蓝牙耳机处理所述第一音频业务;或者,If the first electronic device does not receive any operation of the user on the first prompt information within the first preset time period, or if the first electronic device receives a second operation of the user on the first prompt information within the first preset time period, the first electronic device uses the Bluetooth headset to process the first audio service after the Bluetooth headset completes processing the second audio service; or
    若所述第一电子设备在所述第一预设时长内,未接收到用户对所述第一提示信息的操作,或者,所述第一电子设备在所述第一预设时长内接收到用户对所述第一提示信息的第二操作,所述第一电子设备则在所述蓝牙耳机暂停处理所述第二音频业务后,利用所述蓝牙耳机处理所述第一音频业务;If the first electronic device does not receive any operation of the user on the first prompt information within the first preset time period, or if the first electronic device receives a second operation of the user on the first prompt information within the first preset time period, the first electronic device uses the Bluetooth headset to process the first audio service after the Bluetooth headset suspends processing of the second audio service;
    其中,所述第二操作用于触发所述第一电子设备不恢复利用所述蓝牙耳机处理所述第一音频业务。The second operation is used to trigger the first electronic device to not resume processing the first audio service using the Bluetooth headset.
  11. 根据权利要求7-10中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 7 to 10, characterized in that the method further comprises:
    所述第一电子设备响应于用户对所述第一提示信息的第二操作,若所述第二电子设备在第二预设时长内利用所述蓝牙耳机处理完所述第二音频业务,所述第一电子设备则在所述蓝牙耳机处理完所述第二音频业务后,利用所述蓝牙耳机处理所述第一音频业务;或者,The first electronic device responds to the user's second operation on the first prompt information, and if the second electronic device completes processing the second audio service using the Bluetooth headset within a second preset time period, the first electronic device uses the Bluetooth headset to process the first audio service after the Bluetooth headset completes processing the second audio service; or
    所述第一电子设备响应于用户对所述第一提示信息的第二操作,若所述第二电子设备在第二预设时长内暂停利用所述蓝牙耳机处理所述第二音频业务,所述第一电子设备则在所述蓝牙耳机暂停处理所述第二音频业务后,利用所述蓝牙耳机处理所述第一音频业务; In response to a second operation of the user on the first prompt information, if the second electronic device suspends processing the second audio service by the Bluetooth headset within a second preset time period, the first electronic device uses the Bluetooth headset to process the first audio service after the Bluetooth headset suspends processing the second audio service;
    其中,所述第二操作用于触发所述第一电子设备不恢复利用所述蓝牙耳机处理所述第一音频业务。The second operation is used to trigger the first electronic device to not resume processing the first audio service using the Bluetooth headset.
  12. 根据权利要求7-11中任一项所述的方法,其特征在于,所述第二电子设备检测到第二音频业务后,请求所述蓝牙耳机暂停处理所述第一音频业务,并利用所述蓝牙耳机处理所述第二音频业务之后,所述方法还包括:The method according to any one of claims 7 to 11, characterized in that after the second electronic device detects the second audio service, it requests the Bluetooth headset to suspend processing of the first audio service, and uses the Bluetooth headset to process the second audio service, the method further comprises:
    所述第一电子设备利用所述第一电子设备的音频部件处理所述第一音频业务。The first electronic device processes the first audio service using an audio component of the first electronic device.
  13. 一种音频业务处理方法,其特征在于,所述方法包括:A method for processing an audio service, characterized in that the method comprises:
    第二电子设备与蓝牙耳机建立无线通信通道;其中,所述蓝牙耳机还与第一电子设备建立了无线通信通道,所述蓝牙耳机处理所述第一电子设备的第一音频业务;The second electronic device establishes a wireless communication channel with the Bluetooth headset; wherein the Bluetooth headset also establishes a wireless communication channel with the first electronic device, and the Bluetooth headset processes a first audio service of the first electronic device;
    所述第二电子设备检测到第二音频业务后,判断所述第二音频业务的业务优先级是否大于所述第一音频业务的业务优先级;After the second electronic device detects the second audio service, determining whether the service priority of the second audio service is greater than the service priority of the first audio service;
    若所述第二音频业务的业务优先级大于所述第一音频业务的业务优先级,所述第二电子设备请求所述蓝牙耳机暂停处理所述第一音频业务,利用所述蓝牙耳机处理所述第二音频业务。If the service priority of the second audio service is greater than the service priority of the first audio service, the second electronic device requests the Bluetooth headset to suspend processing of the first audio service and uses the Bluetooth headset to process the second audio service.
  14. 根据权利要求13所述的方法,其特征在于,在所述第二电子设备请求所述蓝牙耳机暂停处理所述第一音频业务,利用所述蓝牙耳机处理所述第二音频业务,包括:The method according to claim 13, characterized in that, when the second electronic device requests the Bluetooth headset to suspend processing of the first audio service, using the Bluetooth headset to process the second audio service comprises:
    所述第二电子设备通过所述蓝牙耳机向所述第一电子设备发送业务暂停指令其中,所述业务暂停指令用于指示所述第一电子设备接收所述业务暂停指令,停止向所述蓝牙耳机发送所述第一音频业务的音频数据;The second electronic device sends a service suspension instruction to the first electronic device through the Bluetooth headset, wherein the service suspension instruction is used to instruct the first electronic device to receive the service suspension instruction and stop sending audio data of the first audio service to the Bluetooth headset;
    所述第二电子设备向所述蓝牙耳机发送所述第二音频业务的音频数据;The second electronic device sends the audio data of the second audio service to the Bluetooth headset;
    所述蓝牙耳机接收所述第二音频业务的音频数据,处理所述第二音频业务。The Bluetooth headset receives the audio data of the second audio service and processes the second audio service.
  15. 根据权利要求13所述的方法,其特征在于,在所述第二电子设备请求所述蓝牙耳机暂停处理所述第一音频业务,并利用所述蓝牙耳机处理所述第二音频业务之前,所述方法还包括:The method according to claim 13, characterized in that before the second electronic device requests the Bluetooth headset to suspend processing of the first audio service and uses the Bluetooth headset to process the second audio service, the method further comprises:
    所述第二电子设备通过所述蓝牙耳机接收到所述第一电子设备指示的所述第一音频业务的业务优先级。The second electronic device receives the service priority of the first audio service indicated by the first electronic device through the Bluetooth headset.
  16. 一种音频业务恢复处理方法,其特征在于,所述方法包括:A method for recovering an audio service, characterized in that the method comprises:
    第一电子设备与蓝牙耳机建立无线通信通道;其中,所述蓝牙耳机与第二电子设备也建立了无线通信通道;The first electronic device establishes a wireless communication channel with the Bluetooth headset; wherein the Bluetooth headset also establishes a wireless communication channel with the second electronic device;
    所述第一电子设备利用所述蓝牙耳机处理第一音频业务;The first electronic device processes a first audio service using the Bluetooth headset;
    所述第一电子设备在所述蓝牙耳机处理所述第二电子设备的第二音频业务,暂停处理所述第一音频业务后,显示第一提示信息;其中,所述第一提示信息用于请求用户确定所述第一电子设备是否恢复利用所述蓝牙耳机处理所述第一音频业务;所述第二音频业务的业务优先级大于或等于所述第一音频业务的业务优先级;The first electronic device processes the second audio service of the second electronic device through the Bluetooth headset and displays a first prompt message after suspending the processing of the first audio service; wherein the first prompt message is used to request the user to determine whether the first electronic device resumes processing the first audio service through the Bluetooth headset; and the service priority of the second audio service is greater than or equal to the service priority of the first audio service;
    所述第一电子设备响应于用户对所述第一提示信息的第一操作,请求所述蓝牙耳机暂停处理所述第二音频业务,并利用所述蓝牙耳机处理所述第一音频业务;其中,所述第一操作用于触发所述第一电子设备恢复利用所述蓝牙耳机处理所述第一音频业务。The first electronic device, in response to the user's first operation on the first prompt information, requests the Bluetooth headset to suspend processing the second audio service and use the Bluetooth headset to process the first audio service; wherein the first operation is used to trigger the first electronic device to resume using the Bluetooth headset to process the first audio service.
  17. 根据权利要求16所述的方法,其特征在于,在所述第一电子设备在所述蓝牙 耳机处理所述第二电子设备的第二音频业务,暂停处理所述第一音频业务后,显示第一提示信息之前,所述方法还包括:The method according to claim 16, characterized in that the first electronic device After the headset processes the second audio service of the second electronic device and suspends processing of the first audio service but before displaying the first prompt information, the method further includes:
    所述第一电子设备通过所述蓝牙耳机向所述第二电子设备指示所述第一音频业务的业务优先级。The first electronic device indicates the service priority of the first audio service to the second electronic device through the Bluetooth headset.
  18. 根据权利要求16或17所述的方法,其特征在于,在所述第一电子设备利用所述蓝牙耳机处理第一音频业务之后,所述第一电子设备在所述蓝牙耳机处理所述第二电子设备的第二音频业务,暂停处理所述第一音频业务后,显示第一提示信息之前,所述方法还包括:The method according to claim 16 or 17 is characterized in that after the first electronic device processes the first audio service using the Bluetooth headset, the first electronic device processes the second audio service of the second electronic device through the Bluetooth headset, and after pausing the processing of the first audio service, before displaying the first prompt information, the method further comprises:
    所述第一电子设备通过所述蓝牙耳机接收来自所述第二电子设备的业务暂停指令,所述业务暂停指令用于指示所述第二音频业务的业务优先级;The first electronic device receives a service suspension instruction from the second electronic device through the Bluetooth headset, where the service suspension instruction is used to indicate a service priority of the second audio service;
    若所述业务暂停指令指示的所述第二音频业务的业务优先级大于所述第一音频业务的业务优先级,所述第一电子设备停止向所述蓝牙耳机发送所述第一音频业务的音频数据。If the service priority of the second audio service indicated by the service suspension instruction is greater than the service priority of the first audio service, the first electronic device stops sending audio data of the first audio service to the Bluetooth headset.
  19. 根据权利要求16-18中任一项所述的方法,其特征在于,所述第一电子设备响应于用户对所述第一提示信息的第一操作,请求所述蓝牙耳机暂停处理所述第二音频业务,并利用所述蓝牙耳机处理所述第一音频业务,包括:The method according to any one of claims 16 to 18, wherein the first electronic device, in response to a first operation of a user on the first prompt information, requests the Bluetooth headset to suspend processing of the second audio service, and uses the Bluetooth headset to process the first audio service, comprising:
    若所述第一电子设备在第一预设时长内,接收到用户对所述第一提示信息的所述第一操作,所述第一电子设备则响应于所述第一操作,请求所述蓝牙耳机暂停处理所述第二音频业务,并利用所述蓝牙耳机处理所述第一音频业务。If the first electronic device receives the first operation of the user on the first prompt information within a first preset time period, the first electronic device, in response to the first operation, requests the Bluetooth headset to suspend processing of the second audio service and uses the Bluetooth headset to process the first audio service.
  20. 根据权利要求19所述的方法,其特征在于,所述方法还包括:The method according to claim 19, characterized in that the method further comprises:
    若所述第一电子设备在所述第一预设时长内,未接收到用户对所述第一提示信息的操作,或者,所述第一电子设备在所述第一预设时长内接收到用户对所述第一提示信息的第二操作,所述第一电子设备则在所述蓝牙耳机处理完所述第二音频业务后,利用所述蓝牙耳机处理所述第一音频业务;或者,If the first electronic device does not receive any operation of the user on the first prompt information within the first preset time period, or if the first electronic device receives a second operation of the user on the first prompt information within the first preset time period, the first electronic device uses the Bluetooth headset to process the first audio service after the Bluetooth headset completes processing the second audio service; or
    若所述第一电子设备在所述第一预设时长内,未接收到用户对所述第一提示信息的操作,或者,所述第一电子设备在所述第一预设时长内接收到用户对所述第一提示信息的第二操作,所述第一电子设备则在所述蓝牙耳机暂停处理所述第二音频业务后,利用所述蓝牙耳机处理所述第一音频业务;If the first electronic device does not receive any operation of the user on the first prompt information within the first preset time period, or if the first electronic device receives a second operation of the user on the first prompt information within the first preset time period, the first electronic device uses the Bluetooth headset to process the first audio service after the Bluetooth headset suspends processing of the second audio service;
    其中,所述第二操作用于触发所述第一电子设备不恢复利用所述蓝牙耳机处理所述第一音频业务。The second operation is used to trigger the first electronic device to not resume processing the first audio service using the Bluetooth headset.
  21. 根据权利要求16-18中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 16 to 18, characterized in that the method further comprises:
    所述第一电子设备响应于用户对所述第一提示信息的第二操作,若所述第二电子设备在第二预设时长内利用所述蓝牙耳机处理完所述第二音频业务,所述第一电子设备则在所述蓝牙耳机处理完所述第二音频业务后,利用所述蓝牙耳机处理所述第一音频业务;或者,The first electronic device responds to the user's second operation on the first prompt information, and if the second electronic device completes processing the second audio service using the Bluetooth headset within a second preset time period, the first electronic device uses the Bluetooth headset to process the first audio service after the Bluetooth headset completes processing the second audio service; or
    所述第一电子设备响应于用户对所述第一提示信息的第二操作,若所述第二电子设备在第二预设时长内暂停利用所述蓝牙耳机处理所述第二音频业务,所述第一电子设备则在所述蓝牙耳机暂停处理所述第二音频业务后,利用所述蓝牙耳机处理所述第一音频业务; In response to a second operation of the user on the first prompt information, if the second electronic device suspends processing the second audio service by the Bluetooth headset within a second preset time period, the first electronic device uses the Bluetooth headset to process the first audio service after the Bluetooth headset suspends processing the second audio service;
    其中,所述第二操作用于触发所述第一电子设备不恢复利用所述蓝牙耳机处理所述第一音频业务。The second operation is used to trigger the first electronic device to not resume processing the first audio service using the Bluetooth headset.
  22. 根据权利要求16-21中任一项所述的方法,其特征在于,所述第二电子设备检测到第二音频业务后,请求所述蓝牙耳机暂停处理所述第一音频业务,并利用所述蓝牙耳机处理所述第二音频业务之后,所述方法还包括:The method according to any one of claims 16 to 21, characterized in that after the second electronic device detects the second audio service, it requests the Bluetooth headset to suspend processing of the first audio service, and uses the Bluetooth headset to process the second audio service, the method further comprises:
    所述第一电子设备利用所述第一电子设备的音频部件处理所述第一音频业务。The first electronic device processes the first audio service using an audio component of the first electronic device.
  23. 一种电子设备,其特征在于,包括处理器和存储器;所述存储器用于存储代码指令;所述处理器用于运行所述代码指令,使得所述第一电子设备或所述第二电子设备执行如权利要求1-12、权利要求13-15和权利要求16-22中任一项所述的方法。An electronic device, characterized in that it includes a processor and a memory; the memory is used to store code instructions; the processor is used to run the code instructions so that the first electronic device or the second electronic device executes the method described in any one of claims 1-12, claims 13-15 and claims 16-22.
  24. 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1-12、权利要求13-15和权利要求16-22中任一项所述的方法。 A computer storage medium, characterized in that it includes computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method as described in any one of claims 1-12, claims 13-15 and claims 16-22.
PCT/CN2023/117289 2022-10-20 2023-09-06 Audio service processing method, electronic device, and computer storage medium WO2024082855A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202211288799.X 2022-10-20
CN202211289367.0 2022-10-20
CN202211289367.0A CN117956371A (en) 2022-10-20 2022-10-20 Audio service recovery processing method, electronic equipment and computer storage medium
CN202211288799.XA CN117917899A (en) 2022-10-20 2022-10-20 Audio service processing method, electronic equipment and computer storage medium

Publications (1)

Publication Number Publication Date
WO2024082855A1 true WO2024082855A1 (en) 2024-04-25

Family

ID=90736829

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/117289 WO2024082855A1 (en) 2022-10-20 2023-09-06 Audio service processing method, electronic device, and computer storage medium

Country Status (1)

Country Link
WO (1) WO2024082855A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080313080A1 (en) * 2007-06-15 2008-12-18 Sony Ericsson Mobile Communications Ab Method and Apparatus for Controlling the Transfer of Private Information in a Communication System
CN114040373A (en) * 2021-11-19 2022-02-11 Oppo广东移动通信有限公司 Audio service processing method and device, electronic equipment and storage medium
CN114173309A (en) * 2020-09-10 2022-03-11 华为技术有限公司 Audio control system
CN115002934A (en) * 2022-07-18 2022-09-02 荣耀终端有限公司 Audio service processing system, electronic equipment and Bluetooth headset

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080313080A1 (en) * 2007-06-15 2008-12-18 Sony Ericsson Mobile Communications Ab Method and Apparatus for Controlling the Transfer of Private Information in a Communication System
CN114173309A (en) * 2020-09-10 2022-03-11 华为技术有限公司 Audio control system
CN114040373A (en) * 2021-11-19 2022-02-11 Oppo广东移动通信有限公司 Audio service processing method and device, electronic equipment and storage medium
CN115002934A (en) * 2022-07-18 2022-09-02 荣耀终端有限公司 Audio service processing system, electronic equipment and Bluetooth headset

Similar Documents

Publication Publication Date Title
CN113382397B (en) Bluetooth connection method, device and system
US11683850B2 (en) Bluetooth reconnection method and related apparatus
US11778363B2 (en) Audio data transmission method applied to switching between single-earbud mode and double-earbud mode of TWS headset and device
CN115002934B (en) Audio service processing system, electronic equipment and Bluetooth headset
CN113438341B (en) Method and terminal for realizing stereo output
EP4061027B1 (en) Bluetooth communication method and apparatus
WO2021083128A1 (en) Sound processing method and apparatus thereof
CN113542839A (en) Screen projection method of electronic equipment and electronic equipment
EP3986008A1 (en) Method for using remote sim module, and electronic apparatus
CN111596885B (en) Audio data processing method, server and storage medium
WO2021031865A1 (en) Call method and apparatus
WO2023088209A1 (en) Cross-device audio data transmission method and electronic devices
WO2024156219A1 (en) Bluetooth connection method, device, and system
CN113132959B (en) Wireless audio system, wireless communication method and device
WO2024082855A1 (en) Audio service processing method, electronic device, and computer storage medium
CN113678481B (en) Wireless audio system, audio communication method and equipment
CN113271577B (en) Media data playing system, method and related device
CN117917899A (en) Audio service processing method, electronic equipment and computer storage medium
CN116017388B (en) Popup window display method based on audio service and electronic equipment
WO2022267917A1 (en) Bluetooth communication method and system
WO2024109504A1 (en) Audio playback control method, related apparatus, and communication system
CN117956371A (en) Audio service recovery processing method, electronic equipment and computer storage medium
CN116527811A (en) Audio notification display method and electronic equipment

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: 23878850

Country of ref document: EP

Kind code of ref document: A1