WO2024109399A1 - State notification method and apparatus - Google Patents

State notification method and apparatus Download PDF

Info

Publication number
WO2024109399A1
WO2024109399A1 PCT/CN2023/125061 CN2023125061W WO2024109399A1 WO 2024109399 A1 WO2024109399 A1 WO 2024109399A1 CN 2023125061 W CN2023125061 W CN 2023125061W WO 2024109399 A1 WO2024109399 A1 WO 2024109399A1
Authority
WO
WIPO (PCT)
Prior art keywords
headset
service
echo message
ble broadcast
state
Prior art date
Application number
PCT/CN2023/125061
Other languages
French (fr)
Chinese (zh)
Inventor
胡晓慧
刘开伟
王福凯
栗银伟
Original Assignee
荣耀终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Publication of WO2024109399A1 publication Critical patent/WO2024109399A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. Transmission Power Control [TPC] or power classes
    • H04W52/02Power saving arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. Transmission Power Control [TPC] or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0225Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal
    • H04W52/0229Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal where the received signal is a wanted signal
    • H04W52/0235Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal where the received signal is a wanted signal where the received signal is a power saving command
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/20Manipulation of established connections
    • H04W76/23Manipulation of direct-mode connections
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/40Connection management for selective distribution or broadcast
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the present application relates to the field of terminal technology, and in particular to a status notification method and device.
  • Bluetooth headset or simply headset
  • a Bluetooth headset can provide users with services such as playing music or answering calls.
  • some earphones can establish connections with one terminal device or two terminal devices at the same time.
  • the earphone may frequently wake up the second device while providing services to the first device, which causes additional power consumption for the second device.
  • An embodiment of the present application provides a status notification method and apparatus, so that the headset notifies a second device through a first BLE broadcast while providing services for a first device.
  • the second device in the screen-off state will not scan the first BLE broadcast, thereby reducing the power consumption of the second device.
  • the embodiment of the present application provides a status notification method, which is applied to a status notification system
  • the status notification system includes: a first device, a second device and a headset
  • the method includes: the first device establishes a connection with the headset, and the second device establishes a connection with the headset; when the first device receives the first service, the first device sends a first echo echo message to the headset; the first echo message is used to instruct the first device to use the headset to start the first service; at the first moment, the headset sends a first Bluetooth low energy BLE broadcast to the second device based on the first echo message, the second device is in a screen-off state, and the second device does not scan the first BLE broadcast; wherein the first BLE broadcast is used to indicate that the headset is processing the first service; at the second moment, the second device switches from the screen-off state to the screen-on state, and the second device scans the second BLE broadcast; the second BLE broadcast is used to indicate that the headset is processing the first service, and
  • the method further includes: when the second device receives the second service, the second device sends a second echo message to the headset; the second echo message is used to instruct the second device to use the headset to start the second service; when the headset determines that the type of the first service is the same as the type of the second service based on the first echo message and the second echo message, the headset sends a third echo message to the second device; wherein the third echo message is used to instruct the headset to refuse to provide service for the second service.
  • the headset can determine whether to allow the service to be provided to the second device based on the current state of the headset. For example, since the headset cannot preempt the same service, the headset may determine that it cannot provide services to the second device during the process in which the first device uses the audio service.
  • the method further includes: when the headset determines that the priority of the second service is higher than the priority of the first service based on the first echo message and the second echo message, the headset sends the second echo message to the first device; the first device suspends the first service based on the second echo message.
  • the second device can accurately notify the headset and the first device based on the echo message to modify the service status in time, so that the headset can provide services to the second device based on the priority of the service.
  • the first service is a media audio service
  • the second service is a call audio service
  • the method further includes: the first device sends a fourth echo message to the headset; the fourth echo message is used to instruct the first device to suspend the use of the headset to process the first service; based on the fourth echo message, the headset sends a third BLE broadcast to the second device; the third BLE broadcast is used to indicate that the headset is idle, the second device is in a screen-off state, and the second device does not scan the third BLE broadcast; when the second device switches from a screen-off state to a screen-on state, the second device scans the fourth BLE broadcast, and the fourth BLE broadcast is used to indicate that the headset is idle.
  • the second device since the second device is currently in a screen-off state and cannot scan the second BLE broadcast, the second device will not be awakened by the Bluetooth chip due to the suspension of the audio service by the first device, saving power consumption.
  • the embodiment of the present application provides a status notification method, which is applied to headphones, and the method includes: the headphones establish a connection with the first device, and the headphones establish a connection with the second device; the headphones receive a first echo message from the first device; the first echo message is used to indicate that the first device uses the headphones to start a first service; at the first moment, the headphones send a first BLE broadcast to the second device based on the first echo message, the second device is in a screen-off state, and the second device does not scan the first BLE broadcast; wherein the first BLE broadcast is used to indicate that the headphones are processing the first service.
  • the headphones notify the second device through the first BLE broadcast in the process of providing services to the first device, and the second device in the screen-off state will not scan the first BLE broadcast, thereby reducing the power consumption of the second device.
  • the method also includes: when the headset determines that the type of the first service is the same as the type of the second service based on the first echo message and the second echo message, the headset sends a third echo message to the second device; wherein the third echo message is used to instruct the headset to refuse to provide service for the second service, and the second echo message is used to instruct the second device to use the headset to start the second service.
  • the headset when the headset determines, based on the first echo message and the second echo message, that the priority of the second service is higher than the priority of the first service, the headset sends the second echo message to the first device.
  • the first service is a media audio service
  • the second service is a call audio service
  • the headset receives a fourth echo message from the first device; the fourth echo message is used to instruct the first device to suspend using the headset to process the first service; based on the fourth echo message, the headset sends a third BLE broadcast to the second device; the third BLE broadcast is used to indicate that the headset is idle, the second device is in a screen-off state, and the second device does not scan the third BLE broadcast.
  • an embodiment of the present application provides a status notification method, which is applied to a second device, and the method includes: at a first moment, the second device receives a first Bluetooth low energy BLE broadcast from the headset, the second device is in a screen-off state, and the second device does not scan the first BLE broadcast; wherein the first BLE broadcast is used to indicate that the headset is processing a first service; the first BLE broadcast is generated by the headset based on a first echo message, and the first echo message is used to indicate that the first device uses the headset to start the first service; the headset is in a connected state with the first device and the headset is in a Connected state; at the second moment, the second device switches from the screen-off state to the screen-on state, and the second device scans the second BLE broadcast; the second BLE broadcast is used to indicate that the headset is processing the first service, and the second moment is later than the first moment. In this way, the headset notifies the second device through the first BLE broadcast while providing services for the first device
  • the method further includes: when the second device receives the second service, the second device sends a second echo message to the headset; the second echo message is used to instruct the second device to start the second service using the headset.
  • the method also includes: the second device receives a third BLE broadcast from the headset; the third BLE broadcast is used to indicate that the headset is idle, the second device is in a screen-off state, and the second device does not scan the third BLE broadcast; when the second device switches from the screen-off state to the screen-on state, the second device scans the fourth BLE broadcast, and the fourth BLE broadcast is used to indicate that the headset is idle.
  • an embodiment of the present application provides a status notification device, the device comprising a communication unit of an earphone, the communication unit of the earphone being used to establish a connection with a first device, and the communication unit of the earphone being also used to establish a connection with a second device; the communication unit of the earphone being also used to receive a first echo message from the first device; the first echo message being used to instruct the first device to start a first service using the earphone; at a first moment, the communication unit of the earphone being also used to send a first BLE broadcast to the second device based on the first echo message, the second device being in a screen-off state, and the second device not scanning the first BLE broadcast; wherein the first BLE broadcast is used to indicate that the earphone is processing the first service.
  • the processing unit of the headset determines that the type of the first service is the same as the type of the second service based on the first echo message and the second echo message
  • the communication unit of the headset is further used to send a third echo message to the second device; wherein the third echo message is used to instruct the headset to refuse to provide service for the second service, and the second echo message is used to instruct the second device to use the headset to start the second service.
  • the processing unit of the headset determines that the priority of the second service is higher than the priority of the first service based on the first echo message and the second echo message
  • the communication unit of the headset is further used to send the second echo message to the first device.
  • the first service is a media audio service
  • the second service is a call audio service
  • the communication unit of the headset receives a fourth echo message sent by the first device; the fourth echo message is used to instruct the first device to suspend using the headset to process the first service; the communication unit of the headset sends a third BLE broadcast to the second device based on the fourth echo message; the third BLE broadcast is used to indicate that the headset is idle, the second device is in a screen-off state, and the second device does not scan the third BLE broadcast.
  • an embodiment of the present application provides a status notification device, which includes a processing unit of a second device and a communication unit of the second device.
  • the communication unit of the second device is used to receive a first Bluetooth low energy BLE broadcast from the headset, the second device is in a screen-off state, and the second device does not scan the first BLE broadcast; wherein, the first BLE broadcast is used to indicate that the headset is processing a first service; the first BLE broadcast is generated by the headset based on a first echo message, and the first echo message is used to indicate that the first device uses the headset to start the first service; the headset is in a connected state with the first device and the headset is in a connected state with the second device; at a second moment, the processing unit of the second device is used to switch from the screen-off state to the screen-on state, and scan the second BLE broadcast; the second BLE broadcast is used to indicate that the headset is processing the first service, and the second moment is later than the first moment.
  • the communication unit of the second device when the communication unit of the second device receives the second service, the communication unit of the second device is further configured to send a second echo message to the headset; the second echo message is used to instruct the second device to use Start a second business with headphones.
  • the communication unit of the second device receives a third BLE broadcast from the headset; the third BLE broadcast is used to indicate that the headset is idle, the second device is in a screen-off state, and the second device does not scan the third BLE broadcast; when the second device switches from the screen-off state to the screen-on state, the processing unit of the second device is used to scan a fourth BLE broadcast, and the fourth BLE broadcast is used to indicate that the headset is idle.
  • an embodiment of the present application provides a status notification system, which includes: a first device, a second device and a headset, the first device being used to establish a connection with the headset, and the second device being used to establish a connection with the headset; the first device is also used to send a first echo message to the headset when a first service is received; the first echo message is used to instruct the first device to use the headset to start the first service; at a first moment, the headset is used to: send a first BLE broadcast to the second device based on the first echo message, the second device is in a screen-off state, and the second device does not scan the first BLE broadcast; wherein the first BLE broadcast is used to indicate that the headset is processing the first service; at a second moment, the second device is used to: switch from the screen-off state to the screen-on state, and scan the second BLE broadcast; the second BLE broadcast is used to indicate that the headset is processing the first service, and the second moment is later than the first moment.
  • an embodiment of the present application provides a headset, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the headset executes the method described in the second aspect and any possible implementation manner of the second aspect.
  • an embodiment of the present application provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor.
  • the terminal device executes the method described in the third aspect or any possible implementation of the third aspect.
  • an embodiment of the present application provides a computer-readable storage medium, in which a computer program or instruction is stored.
  • the computer program or instruction is run on a computer, the computer executes the method described in the second aspect or any possible implementation of the second aspect, or the computer executes the method described in the third aspect or any possible implementation of the third aspect.
  • an embodiment of the present application provides a computer program product including a computer program.
  • the computer program runs on a computer, it enables the computer to execute the method described in the second aspect or any possible implementation of the second aspect, or enables the computer to execute the method described in the third aspect or any possible implementation of the third aspect.
  • FIG1 is a schematic diagram of the hardware structure of a terminal device provided in an embodiment of the present application.
  • FIG2 is a schematic diagram of the structure of an earphone provided in an embodiment of the present application.
  • FIG3 is a schematic diagram of a flow chart of status notification in an audio service
  • FIG4 is a schematic diagram of a flow chart of a status notification method provided in an embodiment of the present application.
  • FIG5 is a flow chart of another status notification method provided in an embodiment of the present application.
  • FIG6 is a flow chart of another state notification method provided in an embodiment of the present application.
  • FIG7 is a schematic diagram of a system architecture provided in an embodiment of the present application.
  • FIG8 is a schematic diagram of the structure of a status notification device provided in an embodiment of the present application.
  • FIG. 9 is a schematic diagram of the structure of another terminal device provided in an embodiment of the present application.
  • words such as “first” and “second” are used to distinguish between identical or similar items with substantially the same functions and effects.
  • the first value and the second value are only used to distinguish different values, and their order is not limited.
  • words such as “first” and “second” do not limit the quantity and execution order, and words such as “first” and “second” do not necessarily limit them to be different.
  • At least one means one or more
  • plural means two or more.
  • “And/or” describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and/or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character “/” generally indicates that the previous and next associated objects are in an “or” relationship. "At least one of the following” or similar expressions refers to any combination of these items, including any combination of single or plural items.
  • At least one of a, b, or c can mean: a, b, c, a and b, a and c, b and c, or a, b and c, where a, b, c can be single or multiple.
  • the structure of the terminal device (such as the embodiment corresponding to FIG. 1 ) and the structure of the headset (such as the embodiment corresponding to FIG. 2 ) in the embodiments of the present application are introduced below.
  • the terminal device and the headset in the embodiments of the present application can establish a communication connection.
  • FIG1 is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application.
  • the terminal device described in FIG1 may be the first device described in the embodiment of the present application, or may be the second device described in the embodiment of the present application; and the hardware structure of the first device and the second device may be the same or different, which is not limited in the embodiment of the present application.
  • the first device (or the second device) may include a Bluetooth chip, which can realize waking up the device according to an echo message, and waking up the device can be understood as switching the device from a screen-off state to a screen-on state.
  • the terminal device may also be referred to as a terminal, an electronic device, a user equipment (UE), a mobile station (MS), a mobile terminal (MT), etc.
  • the terminal device may be a mobile phone with communication function, a smart TV, a wearable device, a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, etc.
  • the embodiments of the present application do not limit the specific technology and specific device form adopted by the terminal device.
  • the terminal device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, Microphone 170C, headphone jack 170D, sensor module 180, button 190, indicator 192, camera 193, and display screen 194, etc.
  • a processor 110 an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, Microphone 170C, headphone jack 170D, sensor module 180, button 190, indicator 192, camera 193, and display screen 194, etc.
  • USB universal serial bus
  • the sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
  • the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the terminal device.
  • the terminal device may include more or fewer components than shown in the figure, or combine certain components, or split certain 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 110 may include one or more processing units. Different processing units may be independent devices or integrated into one or more processors.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.
  • the USB interface 130 can be used to connect a charger to charge the terminal device, and can also be used to transmit data between the terminal device and peripheral devices. It can also be used to connect headphones to play audio through the headphones.
  • the interface can also be used to connect other electronic devices, such as AR devices, etc.
  • the charging management module 140 is used to receive charging input from a charger, which may be a wireless charger or a wired charger.
  • the power management module 141 is used to connect the charging management module 140 to the processor 110 .
  • the wireless communication function of the terminal device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.
  • Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
  • the antenna in the terminal device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antenna.
  • the mobile communication module 150 can provide solutions for wireless communications including 2G/3G/4G/5G applied to terminal devices.
  • the mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the wireless communication module 160 can provide wireless communication solutions for application in terminal devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), etc.
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • the terminal device realizes the display function through the GPU, the display screen 194, and the application processor.
  • the GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • the display screen 194 is used to display images, videos, etc.
  • the display screen 194 includes a display panel.
  • the terminal device may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the terminal device can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
  • the camera 193 is used to capture static images or videos.
  • the terminal device may include 1 or N cameras 193, where N is a positive integer greater than 1.
  • the internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions.
  • the internal memory 121 can include a program storage area and a data storage area.
  • the terminal device can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals.
  • Speaker 170A also known as “speaker”
  • Receiver 170B also known as “earpiece”
  • Headphone interface 170D is used to connect wired headphones.
  • Microphone 170C also known as “microphone” or “microphone”, is used to convert sound signals into electrical signals. In the embodiment of the present application, the terminal device may have a microphone 170C.
  • the button 190 includes a power button, a volume button, etc.
  • the button 190 may be a mechanical button. It may also be a touch button.
  • the terminal device may receive the button input and generate a key signal input related to the user settings and function control of the terminal device.
  • the indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, message, missed call, notification, etc.
  • the software system of the terminal device can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture, etc., which will not be elaborated here.
  • Fig. 2 is a schematic diagram of the structure of a headset provided in an embodiment of the present application.
  • the headset described in Fig. 2 may be a smart headset, such as a Bluetooth headset, etc., which is not limited in the embodiment of the present application.
  • the headset includes one or more processors 210, one or more memories 220, a communication interface 230, an audio acquisition circuit, and an audio playback circuit.
  • the audio acquisition circuit may further include at least one microphone 240 and an analog-to-digital converter (ADC) 250.
  • the audio playback circuit may further include a speaker 260 and a digital-to-analog converter (DAC).
  • the headset may also include one or more sensors 280, such as proximity sensors, motion sensors, inertial sensors, and the like.
  • the above-mentioned hardware components may communicate on one or more communication buses. They are described as follows:
  • the processor 210 is the control center of the headset.
  • the processor may also be referred to as a control unit, a controller, a microcontroller or other appropriate terms.
  • the processor 210 uses various interfaces and lines to connect the various components of the headset.
  • the processor 210 may also include one or more processing cores.
  • the processor 210 may be integrated with a main control unit and a signal processing module.
  • the main control unit (MCU) is used to receive data collected by the sensor 280 or a monitoring signal from the signal processing module or a control signal from a terminal (such as a mobile phone APP), and finally controls the headset through comprehensive judgment and decision-making.
  • the main control unit is also used to write the filter coefficient to the position of the filter coefficient corresponding to the filter in the signal processing module, thereby realizing the configuration of the filter.
  • the main control unit can also be used to determine the volume of the downlink audio signal according to the level index.
  • the memory 220 may be coupled to the processor 210 or connected to the processor 210 via a bus, and is used to store various software programs and/or multiple sets of instructions and data.
  • the memory 220 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage devices, an embedded multimedia card (embedded).
  • the memory 220 may be a memory device such as a microprocessor, a microcontroller, a microcomputer, a multi media card (EMMC), a universal flash storage (UFS), a read-only memory (ROM) or a flash memory, or other types of static memory that can store static information and instructions.
  • the memory 220 may also store one or more computer programs, and the one or more computer programs may include program instructions for the method described in the present application.
  • the memory 203 may store computer instructions for implementing the status notification method.
  • the memory 220 may also store a communication program, which may be used to communicate with the terminal.
  • the memory 220 may also store data/program instructions, and the processor 210 may be used to call and execute the data/program instructions in the memory 220 .
  • the memory 220 may be a memory external to the MCU, or may be a storage unit built into the MCU.
  • the communication interface 230 is used to communicate with the terminal, and the communication mode can be a wired mode or a wireless mode.
  • the communication mode can be connected to the terminal through a cable.
  • the communication interface 230 is used to receive and send radio frequency signals, and the wireless communication mode supported by it can be, for example, Bluetooth communication, basic rate (BR), enhanced data rate (EDR), Bluetooth low energy (BLE) communication, wireless fidelity (Wifi) communication, infrared communication, or cellular 2/3/4/5 generation (2G/3G/4G/5G) communication and other communication modes.
  • the communication interface 230 may include but is not limited to: an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC chip, a SIM card, and a storage medium. In some embodiments, the communication interface 230 can be implemented on a separate chip.
  • the microphone 240 can be used to collect sound signals (or audio signals, which are analog signals), and the analog-to-digital converter 250 is used to convert the analog signals collected by the microphone 240 into digital signals, and send the digital signals to the processor 210 for processing.
  • the digital signals can be sent to the signal processing module for processing.
  • the signal processing module can transmit the processed signal (such as a mixed audio signal) to the digital-to-analog converter 270, and the digital-to-analog converter 270 can convert the received signal into an analog signal, and then transmit it to the speaker 260, which is used to play according to the analog signal so that the user can hear the sound.
  • the earphone is only an example provided in the embodiments of the present application.
  • the earphone may have more or fewer components than those shown, may combine two or more components, or may have different configurations of components. It should be noted that, in an optional case, the above-mentioned components of the earphone may also be coupled together.
  • earphones may also be called earplugs, headsets, walkmans, audio players, media players, head-mounted receivers, earphone devices or other suitable terms, and the embodiments of the present application are not limited to this.
  • FIG3 is a flow chart of status notification under an audio service.
  • the audio service can generally include: media audio service and call audio service.
  • the media audio service can be: a service related to playing audio or playing video, etc.
  • the call audio service can be: a service related to making a phone call or making a video call, etc.
  • the media audio service and call audio service can also have other names, which are not limited in the embodiments of the present application.
  • the flow diagram of status notification based on media audio service can refer to the steps S311-S318 in a of FIG. 3
  • the flow diagram of status notification based on call audio service can refer to the steps S321-S330 in b of FIG. 3
  • the terminal device can be the first device described in the embodiment of the present application.
  • the device may also be the second device described in the embodiment of the present application.
  • the terminal device is taken as the first device as an example for illustration, and the example does not constitute a limitation on the embodiment of the present application.
  • the method for status notification based on media audio service may include the following steps:
  • S311 The first device establishes a connection with the headset.
  • a wireless communication connection may be established between the first device and the headset based on BR/EDR, or one or more Bluetooth communication solutions in BLE, and data transmission and reception may be performed based on the wireless communication connection.
  • S312 The headset periodically sends a BLE broadcast to the first device (the headset is idle).
  • the BLE broadcast described in the step S312 is used to indicate that the headset is in an idle state, or it can be understood that the headset is not occupied by any device.
  • the first device When the first device receives a signal to start a media audio service, the first device sends an audio/video distribution transport protocol (A/V distribution transport protocol, AVDTP) start command to the headset.
  • A/V distribution transport protocol AVDTP
  • the AVDTP protocol may be a common Bluetooth audio transmission protocol, and the AVDTP start command is used to implement message transmission under the AVDTP protocol.
  • the AVDTP start command is used to instruct the first device to use the headset to implement a media audio service.
  • S314 The first device sends an audio stream to the headset.
  • the headset periodically sends a BLE broadcast to the first device (the headset is in a media audio service).
  • the first device may also continuously send an audio stream to the headset.
  • the AVDTP pause command is used to instruct the first device to pause using the headset to implement the media audio service.
  • S317 The first device stops sending the audio stream to the headset.
  • the first device can enable the headset to provide services for its media audio service based on the AVDTP command.
  • the method for status notification based on call audio service may include the following steps:
  • S321 The first device establishes a connection with the headset.
  • the method for establishing a connection between the first device and the headset can refer to the step shown in S311, which will not be repeated here.
  • the headset periodically sends a BLE broadcast to the first device (the headset is idle).
  • the AT command may be a conventional instruction in the Bluetooth protocol for realizing connection and communication.
  • the AT command (start call) is used to instruct the first device to start using the earphone to realize the call audio service.
  • S324 A Bluetooth call connection is established between the first device and the headset.
  • S325 The first device interacts with the headset through an audio stream.
  • the first device may send a received audio stream to the headset, and the headset may also send an audio stream collected by a microphone to the first device.
  • the headset periodically sends a BLE broadcast to the first device (the headset is in a call audio service).
  • the first device and the headset may maintain an interactive process of the audio stream.
  • S329 Pause the audio stream between the first device and the headset.
  • the headset periodically sends a BLE broadcast to the first device (the headset is idle).
  • the first device can enable the headset to provide service for its call audio service based on the AT command.
  • a in FIG. 3 and b in FIG. 3 can both be steps for independently completing a service between the first device and the headset, and there may be no chronological relationship between a in FIG. 3 and b in FIG. 3 .
  • the second device can also use the headset to implement the media audio service based on the step described in a in Figure 3, and the second device can also use the headset to implement the call audio service based on the step described in b in Figure 3.
  • the headset may also establish connections with the first device and the second device at the same time.
  • the first device may notify the second device of the usage of the headset through the Bluetooth protocol.
  • Fig. 4 is a flow chart of a status notification method provided in an embodiment of the present application. As shown in Fig. 4, the status notification method may include the following steps:
  • S401 A first device establishes a connection with an earphone, and a second device establishes a connection with the earphone.
  • a wireless communication connection can be established between the first device (or the second device) and the headset based on one or more Bluetooth communication solutions in BR/EDR or BLE, and data transmission and reception can be performed based on the wireless communication connection.
  • the headset can periodically send a BLE broadcast (the headset is idle) to the first device and the second device; adapted, the first device and the second device can both receive the BLE broadcast (the headset is idle) sent by the headset. Further, when the first device and the second device are both in the screen-on state, the first device or the second device can receive the BLE broadcast (the headset is idle) and obtain the status of the headset from the BLE broadcast (the headset is idle).
  • the BLE broadcast may include: the service status of the headset, such as the service status of the headset may include one or more of the following: call audio service, media audio service, idle, alarm, or prompt tone, etc., which is not limited in the embodiments of the present application.
  • the echo message described in step S402 may be used to indicate the start of a media audio service.
  • the echo message can be a common message type in the Bluetooth protocol.
  • the echo message can indicate different functions according to the content it carries.
  • the echo message can wake up the device. For example, when the Bluetooth chip of any device in the off-screen state receives an echo message, the Bluetooth chip can wake up the local device, so that the local device switches from the off-screen state to the on-screen state.
  • the first device when the first device receives a trigger operation of a user for playing an audio control, receives a voice operation of a user for playing audio, or receives a gesture operation of a user for playing audio, the first device may send an echo message (media audio service starts) to the headset.
  • the headset when the headset receives an echo message (media audio service starts) from the first device, the headset may set the service state of the headset to: media audio service, and execute the steps shown in S403.
  • the headset can periodically send a BLE broadcast to the first device and the second device (the headset is in a media audio service); adapted, the first device and the second device can both receive the BLE broadcast sent by the headset (the headset is in a media audio service).
  • the second device since the second device is currently still in the screen-off state, even if the second device receives the BLE broadcast sent by the headset (the headset is in the media audio service), but does not scan the BLE broadcast, the second device cannot know the status of the headset.
  • the headset sends an echo message to the second device (the headset is in a media audio service).
  • the role of the echo message described in the step shown in S403 may be the same as that in the step shown in S402, and will not be repeated here.
  • the Bluetooth chip of the second device can wake up the second device based on the echo message (the headset is in a media audio service), so that the second device switches from state 1: screen off to state 2: awakened by the Bluetooth chip.
  • the second device can be in a screen-on state.
  • the second device can automatically switch from the screen-on state to state 3: screen off within a time threshold of 5 seconds in the screen-on state.
  • S404 The first device interacts with the headset via an audio stream.
  • the echo described in step S405 may be used to indicate that the media audio service is paused.
  • the first device when the first device receives a trigger operation of the user for pausing the audio control, receives a voice operation of the user for pausing the audio, or receives a gesture operation of the user for pausing the audio, the first device may send an echo message (media audio service pause) to the headset.
  • the headset receives the echo message (media audio service pause) from the first device, the service state of the headset may be switched from the media audio service described in the step shown in S403 to idle, and the step shown in S406 is executed.
  • the headset can periodically send BLE broadcasts to the first device and the second device (the headset is idle); adapted, both the first device and the second device can receive the BLE broadcast sent by the headset (the headset is idle).
  • the second device since the second device is currently still in the screen-off state, even if the second device receives the BLE broadcast sent by the headset (the headset is idle), but does not scan the BLE broadcast, the second device cannot know the status of the headset.
  • the headset sends an echo message to the second device (the headset is idle).
  • the Bluetooth chip of the second device can wake up the second device based on the echo message (the headset is idle), so that the second device switches from state 3: screen off to state 4: awakened by the Bluetooth chip.
  • the second device can be in a screen-on state.
  • the second device can automatically switch from the screen-on state to state 5: screen off within a time threshold of 5 seconds in the screen-on state.
  • Pausing the audio stream between the first device and the headset can be understood as the first device will not send the audio stream to the headset, and the headset will not send the audio stream to the first device.
  • the first device can also notify the headset of the current service status based on the steps shown in S402, and the way the headset and the second device handle different messages can refer to the corresponding embodiment of Figure 4, which will not be repeated here.
  • the second device when the first device starts the media audio service and/or pauses the media audio service multiple times, the second device will be frequently awakened by the Bluetooth chip after receiving the echo message described in steps shown in S403 and S406, causing the second device to switch from the screen-off state to the screen-on state multiple times.
  • the wake-up process of the second device results in higher energy consumption.
  • the present application provides a status notification method.
  • the headset can notify the service status of the headset of the second device based on the first BLE message. Since the second device in the screen-off state will not actively scan the BLE broadcast, the second device will not be frequently awakened by the Bluetooth chip during the entire process of the first device using the media audio service, thereby reducing the power consumption of the second device. Furthermore, after the second device switches from the screen-off state to the screen-on state, it can scan the first BLE broadcast to determine the service status of the headset.
  • Fig. 5 is a flowchart of another status notification method provided in an embodiment of the present application. As shown in Fig. 5, the status notification method may include the following steps:
  • S501 A first device establishes a connection with an earphone, and a second device establishes a connection with the earphone.
  • the headset periodically sends a BLE broadcast to the first device and the second device (the headset is idle).
  • the steps shown in S501-S503 may refer to the steps shown in S401-S403 in FIG. 4 , and will not be described in detail here.
  • the headset periodically sends a BLE broadcast to the first device and the second device (the headset is in a media audio service).
  • the second device is in the screen-off state, it is unable to scan the BLE broadcast, so the second device will not be awakened by the Bluetooth chip due to the first device starting the media audio service, thus saving power consumption.
  • the process of receiving BLE broadcast by the device may be that the device opens a scanning window and scans BLE broadcast based on the scanning window within a specific time. When the device is in the screen-off state, the scanning window will not be opened and the scanning of BLE broadcast cannot be realized.
  • the first device can receive the BLE broadcast sent by the headset (the headset is in the media audio service), and the first device can determine that the first device is in the media audio service, so the first device can ignore the BLE message.
  • the first device determines that the service status indicated in the received BLE broadcast is consistent with the service status in the local device, the first device can determine that the headset is providing services for the device, and therefore the currently received BLE broadcast can be ignored.
  • S505 The first device interacts with the headset via audio stream.
  • the headset may continue to periodically send BLE broadcasts to the first device and the second device (the headset is in a media audio service).
  • the headset periodically sends a BLE broadcast to the first device and the second device (the headset is idle).
  • the second device because the second device is currently in the screen-off state and cannot scan the BLE broadcast, the second device will not be awakened by the Bluetooth chip due to the first device suspending the media audio service, thus saving power consumption.
  • the first device can receive the BLE broadcast sent by the headset (the headset is idle), and the first device can determine that the local media audio service has been suspended, so it can save the service status of the headset based on the BLE broadcast (the headset is idle) for next use.
  • S508 Pause the audio stream between the first device and the headset.
  • the headset may continue to periodically send BLE broadcasts to the first device and the second device (the headset is idle).
  • the second device when the second device switches from a screen-off state to a screen-on state, the second device can receive the BLE broadcast sent by the headset in real time, or it can be understood that the second device in the screen-on state can scan the BLE broadcast.
  • a status notification method provided in an embodiment of the present application can determine whether to allow the headset to provide services for the currently received media audio service or call audio service in a timely manner based on the echo message when the second device receives the media audio service or call audio service.
  • the lag of BLE can be understood as that since there is a duty cycle in the process of the second device opening the scanning window and receiving the BLE broadcast, for example, the second device can open the scanning window and receive the BLE broadcast at intervals, so there may be a situation where the BLE broadcast is not received in time; and some Bluetooth chips may have delays in the process of scanning the BLE broadcast and reporting the BLE broadcast, making it impossible for the Bluetooth chip to report the scanned BLE broadcast to the upper layer in real time.
  • Fig. 6 is a flowchart of another state notification method provided in an embodiment of the present application. As shown in Fig. 6, the state notification method may include the following steps:
  • S601 A first device establishes a connection with an earphone, and a second device establishes a connection with the earphone.
  • the headset periodically sends a BLE broadcast to the first device and the second device (the headset is idle).
  • the headset periodically sends a BLE broadcast to the first device and the second device (the headset is in a media audio service).
  • S605 The first device interacts with the headset via audio stream.
  • the headset may continue to periodically perform the first setting.
  • the device and the second device send a BLE broadcast (the headset is in the media audio service).
  • the steps shown in S601-S605 may refer to the steps shown in S501-S505 in FIG. 5 , and will not be described in detail here.
  • the second device can switch from the screen-off state to the screen-on state based on the user operation, and the second device can scan the BLE broadcast in the screen-on state.
  • the second device may also receive a media audio service or a call audio service in the screen-on state.
  • the second device may determine whether to allow the use of an earphone based on the steps shown in SS606-S608; or, when the second device receives a call audio service, the second device may determine whether to allow the use of an earphone based on the steps shown in S609-S611.
  • the second device may send an echo message (media audio service starts) to the headset.
  • the headset can receive the echo message (media audio service starts) sent by the second device, and determine whether to allow the second device to use the headset based on the current service state of the headset. For example, since the headset receives the echo message (media audio service starts) sent by the first device in the step shown in S603, it is determined that the headset is currently occupied, and therefore the headset that is already in the occupied state cannot continue to provide headset services for the second device, and then the headset can execute the step shown in S607.
  • the headset sends an echo message to the second device (the service is rejected by the headset).
  • the second device when the second device receives the echo message (the service is rejected by the headset), it can be determined that the headset cannot be used currently, and then the step shown in S608 is executed. In this way, the second device and the headset can recognize the headset status in real time through the echo message and determine whether the second device supports the use of the headset.
  • S608 The second device switches the sound output channel to the local device.
  • the second device may send an echo message (call audio service starts) to the headset.
  • the headset can receive an echo message (start of call audio service) sent by the second device, and determine whether to allow the second device to use the headset based on the current service status of the headset. For example, because the headset receives an echo message (start of media audio service) sent by the first device in the step shown in S603, it is determined that the headset is currently occupied, but because the priority of the media audio service currently occupying the headset is lower than the priority of the call audio service, the headset can determine that the call audio service will be provided to the second device.
  • the priority of each service can be set in the headset, so that the headset can recognize the preemption scenario and determine the service execution of the headset based on the priority of each service.
  • the second device in the screen-on state can receive the BLE broadcast (media audio service starts) periodically sent by the headset, the second device can also determine whether the call audio service can preempt the media audio service based on the priority of the media audio service and the priority of the call audio service when receiving the start of the call audio service. For example, when the second device determines that the priority of the call audio service is higher than the priority of the media audio service, the second device can execute the steps shown in S609. In this scenario, the priority of each service can be pre-set in the second device, so that the second device can recognize the preemption scenario and determine whether the headset executes the service based on the priority of each service.
  • the second device may directly seize the headset when receiving the call audio service, so that the second device executes the step shown in S609.
  • the judgment logic for determining whether the call audio service can preempt the media audio service can also be implemented in the headset and the second device at the same time to ensure the normal service of the headset for the call audio service.
  • S610 The headset sends an echo message to the first device (call audio service starts).
  • the first device when the first device receives the echo message (call audio service starts), the first device can determine based on the local media audio service that the headset will no longer provide services to the local device, and then execute the steps shown in S611.
  • S611 The first device pauses local audio.
  • the headset can determine whether to allow the provision of the service to the second device based on the current state of the headset. For example, since the headset cannot preempt the same type of service, the headset can determine that it cannot provide the second device with the service when the first device is using the media audio service.
  • the second device can accurately notify the headset based on the echo message and the first device to modify the service status in time, so that the headset can provide call services to the second device based on the priority of the service.
  • Figure 7 is a schematic diagram of a system architecture provided by an embodiment of the present application.
  • the system described in Figure 7 can also be called a status notification system.
  • the system architecture may include: a first device 701, a second device 702, and a headset 703.
  • the structure and possible implementation of the first device 701 (or the second device 702) may refer to the embodiment corresponding to Fig. 1, and the structure and possible implementation of the headset 703 may refer to the embodiment corresponding to Fig. 2, which will not be described in detail here.
  • the system architecture may also include other terminal devices in addition to the first device and the second device, and the first device, the second device and the other terminal devices may also implement the status notification method provided in the embodiment of the present application, which is not limited in the embodiment of the present application.
  • Figure 8 is a structural schematic diagram of a status notification device provided by the embodiment of the present application, and the status notification device can be the first device (or second device or headset) in the embodiment of the present application, or it can be a chip or chip system in the first device (or second device or headset).
  • a status notification device 800 can be used in a communication device, circuit, hardware component or chip, and the status notification device includes: a processing unit 801 and a communication unit 802.
  • the processing unit 801 is used to support the status notification device 800 to perform information processing steps
  • the communication unit 802 is used to support the status notification device 800 to perform information receiving and sending steps.
  • the communication unit 802 can be an input or output interface, a pin or a circuit, etc.
  • the status notification device may further include: a storage unit 803.
  • the processing unit 801 and the storage unit 803 are connected via a line.
  • the storage unit 803 may include one or more memories, and the memory may be a device used to store programs or data in one or more devices or circuits.
  • the storage unit 803 may exist independently and be connected to the processing unit 801 of the status notification device via a communication line.
  • the storage unit 803 may also be integrated with the processing unit 801.
  • the storage unit 803 may store computer-executable instructions of the method in the first device (or the second device or the headset) so that the processing unit 801 executes the method in the above embodiment.
  • the storage unit 803 may be a register, a cache or a RAM.
  • the storage unit 803 may be integrated with the processing unit 801.
  • the storage unit 803 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions.
  • the storage unit 803 may be independent of the processing unit 801.
  • the status notification device 800 may further include: a display unit (not shown in FIG. 8 ), which is used to support the step of interface display in the status notification device.
  • FIG9 is a schematic diagram of the hardware structure of another terminal device provided in an embodiment of the present application.
  • the terminal device includes a processor 901, a communication line 904, and at least one communication interface (the communication interface 903 is used as an example in FIG9 ).
  • the terminal device may be the first device or the second device described in the embodiment of the present application, and the structures of the first device and the second device may be the same or different.
  • Processor 901 can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.
  • CPU central processing unit
  • ASIC application-specific integrated circuit
  • Communications link 904 may include circuitry to transmit information between the above-described components.
  • the communication interface 903 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, wireless local area networks (WLAN), etc.
  • the terminal device may further include a memory 902 .
  • the memory 902 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
  • the memory may be independent and connected to the processor via a communication line 904. The memory may also be integrated with the processor.
  • the memory 902 is used to store computer-executable instructions for executing the solution of the present application, and the execution is controlled by the processor 901.
  • the processor 901 is used to execute the computer-executable instructions stored in the memory 902, thereby implementing the method provided by the embodiment of the present application.
  • the computer-executable instructions in the embodiments of the present application may also be referred to as application code, and the embodiments of the present application do not specifically limit this.
  • the processor 901 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 9 .
  • the terminal device may include multiple processors, such as processor 901 and processor 905 in FIG. 9.
  • processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor.
  • the processor here may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
  • a computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
  • the computer instructions may be stored in a computer-readable storage medium. Or from one computer-readable storage medium to another computer-readable storage medium, for example, a computer instruction can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
  • wired e.g., coaxial cable, optical fiber, digital subscriber line (DSL)
  • wireless e.g., infrared, wireless, microwave, etc.
  • the computer-readable storage medium can be any available medium that can be stored by a computer or a data storage device such as a server or data center that includes one or more available media integrated.
  • the available media can include magnetic media (e.g., floppy disks, hard disks or tapes), optical media (e.g., digital versatile discs (DVD)), or semiconductor media (e.g., solid state disks (SSD)), etc.
  • Computer-readable media may include computer storage media and communication media, and may also include any medium that can transfer a computer program from one place to another.
  • the storage medium may be any target medium that can be accessed by a computer.
  • the computer-readable medium may include a compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM or other optical disc storage; the computer-readable medium may include a magnetic disk storage or other magnetic disk storage device.
  • any connecting line may also be appropriately referred to as a computer-readable medium.
  • the software is transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave
  • the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of the medium.
  • Disks and optical discs as used herein include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy disks and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs reproduce data optically using lasers.
  • user information including but not limited to user device information, user personal information, etc.
  • data including but not limited to data used for analysis, stored data, displayed data, etc.
  • user information including but not limited to user device information, user personal information, etc.
  • data including but not limited to data used for analysis, stored data, displayed data, etc.

Landscapes

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

Abstract

Embodiments of the present application provide a state notification method and apparatus. The method comprises: a first device establishes connection with an earphone, and a second device establishes connection with the earphone; when the first device receives a first service, the first device sends a first echo message to the earphone, the first echo message being used for instructing the first device to start the first service using the earphone; at a first moment, the earphone sends a first Bluetooth low energy (BLE) broadcast to the second device on the basis of the first echo message, the second device is in a screen-off state, and the second device does not scan the first BLE broadcast; and at a second moment, the second device switches from the screen-off state to a screen-on state, and the second device scans the first BLE broadcast, the second moment being later than the first moment. Therefore, the earphone can notify the second device by means of the first BLE broadcast in the process of providing services for the first device, and the second device in the screen-off state does not scan the first BLE broadcast, thus reducing the power consumption of the second device.

Description

状态通知方法和装置Status notification method and device
本申请要求于2022年11月22日提交中国国家知识产权局、申请号为202211467953.X、申请名称为“状态通知方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on November 22, 2022, with application number 202211467953.X and application name “Status Notification Method and Device”, the entire contents of which are incorporated by reference in this application.
技术领域Technical Field
本申请涉及终端技术领域,尤其涉及一种状态通知方法和装置。The present application relates to the field of terminal technology, and in particular to a status notification method and device.
背景技术Background technique
随着蓝牙技术的发展,基于蓝牙技术的设备广泛应用于人们的日常生活中。例如,蓝牙耳机(或简称耳机)在与终端设备建立蓝牙连接后,可为用户提供播放音乐、或者接听电话等服务。With the development of Bluetooth technology, devices based on Bluetooth technology are widely used in people's daily life. For example, after a Bluetooth headset (or simply headset) establishes a Bluetooth connection with a terminal device, it can provide users with services such as playing music or answering calls.
通常情况下,部分耳机可以与一台终端设备、或者两台终端设备同时建立连接。在耳机与第一设备建立连接、且耳机与第二设备建立连接的场景中,可能存在耳机为第一设备提供服务的过程中,频繁唤醒第二设备的情况,为第二设备带来额外的功耗。Generally, some earphones can establish connections with one terminal device or two terminal devices at the same time. In the scenario where the earphone is connected to the first device and the earphone is connected to the second device, the earphone may frequently wake up the second device while providing services to the first device, which causes additional power consumption for the second device.
发明内容Summary of the invention
本申请实施例提供一种状态通知方法和装置,使得耳机在为第一设备提供服务的过程中,通过第一BLE广播通知第二设备,处于灭屏状态下的第二设备将不会扫描该第一BLE广播,因此可以降低第二设备的功耗。An embodiment of the present application provides a status notification method and apparatus, so that the headset notifies a second device through a first BLE broadcast while providing services for a first device. The second device in the screen-off state will not scan the first BLE broadcast, thereby reducing the power consumption of the second device.
第一方面,本申请实施例提供一种状态通知方法,应用于状态通知系统,状态通知系统中包括:第一设备、第二设备以及耳机,方法包括:第一设备与耳机建立连接,且第二设备与耳机建立连接;当第一设备接收到第一业务时,第一设备向耳机发送第一回声echo消息;第一echo消息用于指示第一设备使用耳机开始第一业务;第一时刻,耳机基于第一echo消息,向第二设备发送第一蓝牙低功耗BLE广播,第二设备处于灭屏状态,且第二设备不扫描第一BLE广播;其中,第一BLE广播用于指示耳机在处理第一业务;第二时刻,第二设备由灭屏状态切换至亮屏状态,第二设备扫描第二BLE广播;第二BLE广播用于指示耳机在处理第一业务,第二时刻晚于第一时刻。这样,使得耳机在为第一设备提供服务的过程中,通过第一BLE广播通知第二设备,处于灭屏状态下的第二设备将不会扫描该第一BLE广播,因此可以降低第二设备的功耗。In the first aspect, the embodiment of the present application provides a status notification method, which is applied to a status notification system, and the status notification system includes: a first device, a second device and a headset, and the method includes: the first device establishes a connection with the headset, and the second device establishes a connection with the headset; when the first device receives the first service, the first device sends a first echo echo message to the headset; the first echo message is used to instruct the first device to use the headset to start the first service; at the first moment, the headset sends a first Bluetooth low energy BLE broadcast to the second device based on the first echo message, the second device is in a screen-off state, and the second device does not scan the first BLE broadcast; wherein the first BLE broadcast is used to indicate that the headset is processing the first service; at the second moment, the second device switches from the screen-off state to the screen-on state, and the second device scans the second BLE broadcast; the second BLE broadcast is used to indicate that the headset is processing the first service, and the second moment is later than the first moment. In this way, the headset notifies the second device through the first BLE broadcast in the process of providing services for the first device, and the second device in the screen-off state will not scan the first BLE broadcast, thereby reducing the power consumption of the second device.
在一种可能的实现方式中,方法还包括:当第二设备接收到第二业务时,第二设备向耳机发送第二echo消息;第二echo消息用于指示第二设备使用耳机开始第二业务;在耳机基于第一echo消息以及第二echo消息,确定第一业务的类型与第二业务的类型相同时,耳机向第二设备发送第三echo消息;其中,第三echo消息用于指示耳机拒绝为第二业务提供服务。这样,在第一设备使用第一业务的过程中,第二设备也需要使用第一业务时,耳机可以基于耳机当前的状态确定是否允许为第二设备提供业务, 例如由于耳机无法实现对于相同业务下的抢占,因此耳机可以确定在第一设备使用音频业务的过程中无法为第二设备提供服务。In one possible implementation, the method further includes: when the second device receives the second service, the second device sends a second echo message to the headset; the second echo message is used to instruct the second device to use the headset to start the second service; when the headset determines that the type of the first service is the same as the type of the second service based on the first echo message and the second echo message, the headset sends a third echo message to the second device; wherein the third echo message is used to instruct the headset to refuse to provide service for the second service. In this way, when the first device uses the first service and the second device also needs to use the first service, the headset can determine whether to allow the service to be provided to the second device based on the current state of the headset. For example, since the headset cannot preempt the same service, the headset may determine that it cannot provide services to the second device during the process in which the first device uses the audio service.
在一种可能的实现方式中,方法还包括:在耳机基于第一echo消息以及第二echo消息,确定第二业务的优先级高于第一业务的优先级时,耳机向第一设备发送第二echo消息;第一设备基于第二echo消息暂停第一业务。这样,当第一设备使用第一业务的过程中,第二设备需要使用第二业务时,第二设备可以基于echo消息准确的通知耳机以及第一设备及时修改业务状态,使得耳机可以基于业务的优先级为第二设备提供服务。In a possible implementation, the method further includes: when the headset determines that the priority of the second service is higher than the priority of the first service based on the first echo message and the second echo message, the headset sends the second echo message to the first device; the first device suspends the first service based on the second echo message. In this way, when the first device uses the first service and the second device needs to use the second service, the second device can accurately notify the headset and the first device based on the echo message to modify the service status in time, so that the headset can provide services to the second device based on the priority of the service.
在一种可能的实现方式中,第一业务为媒体音频业务,第二业务为通话音频业务。In a possible implementation manner, the first service is a media audio service, and the second service is a call audio service.
在一种可能的实现方式中,方法还包括:第一设备向耳机发送第四echo消息;第四echo消息用于指示第一设备暂停使用耳机处理第一业务;耳机基于第四echo消息,向第二设备发送第三BLE广播;第三BLE广播用于指示耳机处于空闲,第二设备处于灭屏状态,且第二设备不扫描第三BLE广播;当第二设备由灭屏状态切换至亮屏状态时,第二设备扫描第四BLE广播,第四BLE广播用于指示耳机处于空闲。这样,由于第二设备当前处于灭屏状态,无法对第二BLE广播进行扫描,就不会出现由于第一设备暂停音频业务导致第二设备被蓝牙芯片唤醒的情况,节省功耗。In a possible implementation, the method further includes: the first device sends a fourth echo message to the headset; the fourth echo message is used to instruct the first device to suspend the use of the headset to process the first service; based on the fourth echo message, the headset sends a third BLE broadcast to the second device; the third BLE broadcast is used to indicate that the headset is idle, the second device is in a screen-off state, and the second device does not scan the third BLE broadcast; when the second device switches from a screen-off state to a screen-on state, the second device scans the fourth BLE broadcast, and the fourth BLE broadcast is used to indicate that the headset is idle. In this way, since the second device is currently in a screen-off state and cannot scan the second BLE broadcast, the second device will not be awakened by the Bluetooth chip due to the suspension of the audio service by the first device, saving power consumption.
第二方面,本申请实施例提供一种状态通知方法,应用于耳机,方法包括:耳机与第一设备建立连接,且耳机与第二设备建立连接;耳机接收到来自第一设备的第一echo消息;第一echo消息用于指示第一设备使用耳机开始第一业务;第一时刻,耳机基于第一echo消息,向第二设备发送第一BLE广播,第二设备处于灭屏状态,且第二设备不扫描第一BLE广播;其中,第一BLE广播用于指示耳机在处理第一业务。这样,使得耳机在为第一设备提供服务的过程中,通过第一BLE广播通知第二设备,处于灭屏状态下的第二设备将不会扫描该第一BLE广播,因此可以降低第二设备的功耗。In the second aspect, the embodiment of the present application provides a status notification method, which is applied to headphones, and the method includes: the headphones establish a connection with the first device, and the headphones establish a connection with the second device; the headphones receive a first echo message from the first device; the first echo message is used to indicate that the first device uses the headphones to start a first service; at the first moment, the headphones send a first BLE broadcast to the second device based on the first echo message, the second device is in a screen-off state, and the second device does not scan the first BLE broadcast; wherein the first BLE broadcast is used to indicate that the headphones are processing the first service. In this way, the headphones notify the second device through the first BLE broadcast in the process of providing services to the first device, and the second device in the screen-off state will not scan the first BLE broadcast, thereby reducing the power consumption of the second device.
在一种可能的实现方式中,方法还包括:在耳机基于第一echo消息以及第二echo消息,确定第一业务的类型与第二业务的类型相同时,耳机向第二设备发送第三echo消息;其中,第三echo消息用于指示耳机拒绝为第二业务提供服务,第二echo消息用于指示第二设备使用耳机开始第二业务。In one possible implementation, the method also includes: when the headset determines that the type of the first service is the same as the type of the second service based on the first echo message and the second echo message, the headset sends a third echo message to the second device; wherein the third echo message is used to instruct the headset to refuse to provide service for the second service, and the second echo message is used to instruct the second device to use the headset to start the second service.
在一种可能的实现方式中,在耳机基于第一echo消息以及第二echo消息,确定第二业务的优先级高于第一业务的优先级时,耳机向第一设备发送第二echo消息。In a possible implementation, when the headset determines, based on the first echo message and the second echo message, that the priority of the second service is higher than the priority of the first service, the headset sends the second echo message to the first device.
在一种可能的实现方式中,第一业务为媒体音频业务,第二业务为通话音频业务。In a possible implementation manner, the first service is a media audio service, and the second service is a call audio service.
在一种可能的实现方式中,耳机接收来自第一设备第四echo消息;第四echo消息用于指示第一设备暂停使用耳机处理第一业务;耳机基于第四echo消息,向第二设备发送第三BLE广播;第三BLE广播用于指示耳机处于空闲,第二设备处于灭屏状态,且第二设备不扫描第三BLE广播。In one possible implementation, the headset receives a fourth echo message from the first device; the fourth echo message is used to instruct the first device to suspend using the headset to process the first service; based on the fourth echo message, the headset sends a third BLE broadcast to the second device; the third BLE broadcast is used to indicate that the headset is idle, the second device is in a screen-off state, and the second device does not scan the third BLE broadcast.
第三方面,本申请实施例提供一种状态通知方法,应用于第二设备,方法包括:第一时刻,第二设备接收来自耳机的第一蓝牙低功耗BLE广播,第二设备处于灭屏状态,且第二设备不扫描第一BLE广播;其中,第一BLE广播用于指示耳机在处理第一业务;第一BLE广播为耳机基于第一echo消息生成的,第一echo消息用于指示第一设备使用耳机开始第一业务;耳机与第一设备处于连接状态且耳机与第二设备处于 连接状态;第二时刻,第二设备由灭屏状态切换至亮屏状态,第二设备扫描第二BLE广播;第二BLE广播用于指示耳机在处理第一业务,第二时刻晚于第一时刻。这样,使得耳机在为第一设备提供服务的过程中,通过第一BLE广播通知第二设备,处于灭屏状态下的第二设备将不会扫描该第一BLE广播,因此可以降低第二设备的功耗。In a third aspect, an embodiment of the present application provides a status notification method, which is applied to a second device, and the method includes: at a first moment, the second device receives a first Bluetooth low energy BLE broadcast from the headset, the second device is in a screen-off state, and the second device does not scan the first BLE broadcast; wherein the first BLE broadcast is used to indicate that the headset is processing a first service; the first BLE broadcast is generated by the headset based on a first echo message, and the first echo message is used to indicate that the first device uses the headset to start the first service; the headset is in a connected state with the first device and the headset is in a Connected state; at the second moment, the second device switches from the screen-off state to the screen-on state, and the second device scans the second BLE broadcast; the second BLE broadcast is used to indicate that the headset is processing the first service, and the second moment is later than the first moment. In this way, the headset notifies the second device through the first BLE broadcast while providing services for the first device, and the second device in the screen-off state will not scan the first BLE broadcast, thereby reducing the power consumption of the second device.
在一种可能的实现方式中,方法还包括:当第二设备接收到第二业务时,第二设备向耳机发送第二echo消息;第二echo消息用于指示第二设备使用耳机开始第二业务。In a possible implementation, the method further includes: when the second device receives the second service, the second device sends a second echo message to the headset; the second echo message is used to instruct the second device to start the second service using the headset.
在一种可能的实现方式中,方法还包括:第二设备接收来自耳机的第三BLE广播;第三BLE广播用于指示耳机处于空闲,第二设备处于灭屏状态,且第二设备不扫描第三BLE广播;当第二设备由灭屏状态切换至亮屏状态时,第二设备扫描第四BLE广播,第四BLE广播用于指示耳机处于空闲。In one possible implementation, the method also includes: the second device receives a third BLE broadcast from the headset; the third BLE broadcast is used to indicate that the headset is idle, the second device is in a screen-off state, and the second device does not scan the third BLE broadcast; when the second device switches from the screen-off state to the screen-on state, the second device scans the fourth BLE broadcast, and the fourth BLE broadcast is used to indicate that the headset is idle.
第四方面,本申请实施例提供一种状态通知装置,装置包括耳机的通信单元,耳机的通信单元,用于与第一设备建立连接,且耳机的通信单元,还用于与第二设备建立连接;耳机的通信单元,还用于接收到来自第一设备的第一echo消息;第一echo消息用于指示第一设备使用耳机开始第一业务;第一时刻,耳机的通信单元,还用于基于第一echo消息,向第二设备发送第一BLE广播,第二设备处于灭屏状态,且第二设备不扫描第一BLE广播;其中,第一BLE广播用于指示耳机在处理第一业务。In a fourth aspect, an embodiment of the present application provides a status notification device, the device comprising a communication unit of an earphone, the communication unit of the earphone being used to establish a connection with a first device, and the communication unit of the earphone being also used to establish a connection with a second device; the communication unit of the earphone being also used to receive a first echo message from the first device; the first echo message being used to instruct the first device to start a first service using the earphone; at a first moment, the communication unit of the earphone being also used to send a first BLE broadcast to the second device based on the first echo message, the second device being in a screen-off state, and the second device not scanning the first BLE broadcast; wherein the first BLE broadcast is used to indicate that the earphone is processing the first service.
在一种可能的实现方式中,在耳机的处理单元基于第一echo消息以及第二echo消息,确定第一业务的类型与第二业务的类型相同时,耳机的通信单元,还用于向第二设备发送第三echo消息;其中,第三echo消息用于指示耳机拒绝为第二业务提供服务,第二echo消息用于指示第二设备使用耳机开始第二业务。In one possible implementation, when the processing unit of the headset determines that the type of the first service is the same as the type of the second service based on the first echo message and the second echo message, the communication unit of the headset is further used to send a third echo message to the second device; wherein the third echo message is used to instruct the headset to refuse to provide service for the second service, and the second echo message is used to instruct the second device to use the headset to start the second service.
在一种可能的实现方式中,在耳机的处理单元基于第一echo消息以及第二echo消息,确定第二业务的优先级高于第一业务的优先级时,耳机的通信单元,还用于向第一设备发送第二echo消息。In a possible implementation, when the processing unit of the headset determines that the priority of the second service is higher than the priority of the first service based on the first echo message and the second echo message, the communication unit of the headset is further used to send the second echo message to the first device.
在一种可能的实现方式中,第一业务为媒体音频业务,第二业务为通话音频业务。In a possible implementation manner, the first service is a media audio service, and the second service is a call audio service.
在一种可能的实现方式中,耳机的通信单元接收第一设备发送的第四echo消息;第四echo消息用于指示第一设备暂停使用耳机处理第一业务;耳机的通信单元基于第四echo消息,向第二设备发送第三BLE广播;第三BLE广播用于指示耳机处于空闲,第二设备处于灭屏状态,且第二设备不扫描第三BLE广播。In one possible implementation, the communication unit of the headset receives a fourth echo message sent by the first device; the fourth echo message is used to instruct the first device to suspend using the headset to process the first service; the communication unit of the headset sends a third BLE broadcast to the second device based on the fourth echo message; the third BLE broadcast is used to indicate that the headset is idle, the second device is in a screen-off state, and the second device does not scan the third BLE broadcast.
第五方面,本申请实施例提供一种状态通知装置,装置包括第二设备的处理单元以及第二设备的通信单元,第一时刻,第二设备的通信单元,用于接收来自耳机的第一蓝牙低功耗BLE广播,第二设备处于灭屏状态,且第二设备不扫描第一BLE广播;其中,第一BLE广播用于指示耳机在处理第一业务;第一BLE广播为耳机基于第一echo消息生成的,第一echo消息用于指示第一设备使用耳机开始第一业务;耳机与第一设备处于连接状态且耳机与第二设备处于连接状态;第二时刻,第二设备的处理单元,用于由灭屏状态切换至亮屏状态,扫描第二BLE广播;第二BLE广播用于指示耳机在处理第一业务,第二时刻晚于第一时刻。In a fifth aspect, an embodiment of the present application provides a status notification device, which includes a processing unit of a second device and a communication unit of the second device. At a first moment, the communication unit of the second device is used to receive a first Bluetooth low energy BLE broadcast from the headset, the second device is in a screen-off state, and the second device does not scan the first BLE broadcast; wherein, the first BLE broadcast is used to indicate that the headset is processing a first service; the first BLE broadcast is generated by the headset based on a first echo message, and the first echo message is used to indicate that the first device uses the headset to start the first service; the headset is in a connected state with the first device and the headset is in a connected state with the second device; at a second moment, the processing unit of the second device is used to switch from the screen-off state to the screen-on state, and scan the second BLE broadcast; the second BLE broadcast is used to indicate that the headset is processing the first service, and the second moment is later than the first moment.
在一种可能的实现方式中,当第二设备的通信单元接收到第二业务时,第二设备的通信单元,还用于向耳机发送第二echo消息;第二echo消息用于指示第二设备使 用耳机开始第二业务。In a possible implementation, when the communication unit of the second device receives the second service, the communication unit of the second device is further configured to send a second echo message to the headset; the second echo message is used to instruct the second device to use Start a second business with headphones.
在一种可能的实现方式中,第二设备的通信单元接收来自耳机的第三BLE广播;第三BLE广播用于指示耳机处于空闲,第二设备处于灭屏状态,且第二设备不扫描第三BLE广播;当第二设备由灭屏状态切换至亮屏状态时,第二设备的处理单元,用于扫描第四BLE广播,第四BLE广播用于指示耳机处于空闲。In one possible implementation, the communication unit of the second device receives a third BLE broadcast from the headset; the third BLE broadcast is used to indicate that the headset is idle, the second device is in a screen-off state, and the second device does not scan the third BLE broadcast; when the second device switches from the screen-off state to the screen-on state, the processing unit of the second device is used to scan a fourth BLE broadcast, and the fourth BLE broadcast is used to indicate that the headset is idle.
第六方面,本申请实施例提供一种状态通知系统,状态通知系统中包括:第一设备、第二设备以及耳机,第一设备,用于与耳机建立连接,且第二设备,用于与耳机建立连接;第一设备,还用于当接收到第一业务时,向耳机发送第一echo消息;第一echo消息用于指示第一设备使用耳机开始第一业务;第一时刻,耳机,用于:基于第一echo消息,向第二设备发送第一BLE广播,第二设备处于灭屏状态,且第二设备不扫描第一BLE广播;其中,第一BLE广播用于指示耳机在处理第一业务;第二时刻,第二设备用于:由灭屏状态切换至亮屏状态,扫描第二BLE广播;第二BLE广播用于指示耳机在处理第一业务,第二时刻晚于第一时刻。In a sixth aspect, an embodiment of the present application provides a status notification system, which includes: a first device, a second device and a headset, the first device being used to establish a connection with the headset, and the second device being used to establish a connection with the headset; the first device is also used to send a first echo message to the headset when a first service is received; the first echo message is used to instruct the first device to use the headset to start the first service; at a first moment, the headset is used to: send a first BLE broadcast to the second device based on the first echo message, the second device is in a screen-off state, and the second device does not scan the first BLE broadcast; wherein the first BLE broadcast is used to indicate that the headset is processing the first service; at a second moment, the second device is used to: switch from the screen-off state to the screen-on state, and scan the second BLE broadcast; the second BLE broadcast is used to indicate that the headset is processing the first service, and the second moment is later than the first moment.
第七方面,本申请实施例提供一种耳机,包括存储器、处理器以及存储在存储器中并可在处理器上运行的计算机程序,处理器执行计算机程序时,使得耳机执行如第二方面以及第二方面的任一种可能的实现方式中描述的方法。In the seventh aspect, an embodiment of the present application provides a headset, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the headset executes the method described in the second aspect and any possible implementation manner of the second aspect.
第八方面,本申请实施例提供一种终端设备,包括存储器、处理器以及存储在存储器中并可在处理器上运行的计算机程序,处理器执行计算机程序时,使得终端设备执行第三方面或第三方面的任意一种可能的实现方式中描述的方法。In an eighth aspect, an embodiment of the present application provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the terminal device executes the method described in the third aspect or any possible implementation of the third aspect.
第九方面,本申请实施例提供一种计算机可读存储介质,计算机可读存储介质中存储有计算机程序或指令,当计算机程序或指令在计算机上运行时,使得计算机执行第二方面或第二方面的任意一种可能的实现方式中描述的方法,或者使得计算机执行第三方面或第三方面的任意一种可能的实现方式中描述的方法。In the ninth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is run on a computer, the computer executes the method described in the second aspect or any possible implementation of the second aspect, or the computer executes the method described in the third aspect or any possible implementation of the third aspect.
第十方面,本申请实施例提供一种包括计算机程序的计算机程序产品,当计算机程序在计算机上运行时,使得计算机执行第二方面或第二方面的任意一种可能的实现方式中描述的方法,或者使得计算机执行第三方面或第三方面的任意一种可能的实现方式中描述的方法。In the tenth aspect, an embodiment of the present application provides a computer program product including a computer program. When the computer program runs on a computer, it enables the computer to execute the method described in the second aspect or any possible implementation of the second aspect, or enables the computer to execute the method described in the third aspect or any possible implementation of the third aspect.
应当理解的是,本申请的第三方面至第十方面与本申请的第一方面至第三方面的技术方案相对应,各方面及对应的可行实施方式所取得的有益效果相似,不再赘述。It should be understood that the third to tenth aspects of the present application correspond to the technical solutions of the first to third aspects of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本申请实施例提供的一种终端设备的硬件结构示意图;FIG1 is a schematic diagram of the hardware structure of a terminal device provided in an embodiment of the present application;
图2为本申请实施例提供的一种耳机的结构示意图;FIG2 is a schematic diagram of the structure of an earphone provided in an embodiment of the present application;
图3为一种在音频业务下进行状态通知的流程示意图;FIG3 is a schematic diagram of a flow chart of status notification in an audio service;
图4为本申请实施例提供的一种状态通知方法的流程示意图;FIG4 is a schematic diagram of a flow chart of a status notification method provided in an embodiment of the present application;
图5为本申请实施例提供的另一种状态通知方法的流程示意图;FIG5 is a flow chart of another status notification method provided in an embodiment of the present application;
图6为本申请实施例提供的再一种状态通知方法的流程示意图;FIG6 is a flow chart of another state notification method provided in an embodiment of the present application;
图7为本申请实施例提供的一种系统架构示意图;FIG7 is a schematic diagram of a system architecture provided in an embodiment of the present application;
图8为本申请实施例提供的一种状态通知装置的结构示意图; FIG8 is a schematic diagram of the structure of a status notification device provided in an embodiment of the present application;
图9为本申请实施例提供的另一种终端设备的结构示意图。FIG. 9 is a schematic diagram of the structure of another terminal device provided in an embodiment of the present application.
具体实施方式Detailed ways
为了便于清楚描述本申请实施例的技术方案,在本申请的实施例中,采用了“第一”、“第二”等字样对功能和作用基本相同的相同项或相似项进行区分。例如,第一值和第二值仅仅是为了区分不同的值,并不对其先后顺序进行限定。本领域技术人员可以理解“第一”、“第二”等字样并不对数量和执行次序进行限定,并且“第一”、“第二”等字样也并不限定一定不同。In order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. For example, the first value and the second value are only used to distinguish different values, and their order is not limited. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit them to be different.
需要说明的是,本申请中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其他实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
本申请中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a和b,a和c,b和c,或a、b和c,其中a,b,c可以是单个,也可以是多个。In this application, "at least one" means one or more, and "plurality" means two or more. "And/or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and/or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character "/" generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, a and b, a and c, b and c, or a, b and c, where a, b, c can be single or multiple.
为了能够更好地理解本申请实施例,下面对本申请实施例的终端设备的结构(如图1对应的实施例)以及耳机(如图2对应的实施例)的结构进行介绍。本申请实施例中的终端设备与耳机可以建立通信连接。In order to better understand the embodiments of the present application, the structure of the terminal device (such as the embodiment corresponding to FIG. 1 ) and the structure of the headset (such as the embodiment corresponding to FIG. 2 ) in the embodiments of the present application are introduced below. The terminal device and the headset in the embodiments of the present application can establish a communication connection.
示例性的,图1为本申请实施例提供的一种终端设备的结构示意图。图1中描述的终端设备可以为本申请实施例中描述的第一设备、也可以为本申请实施例中描述的第二设备;并且,第一设备与第二设备的硬件结构可以相同也可以不同,本申请实施例中对此不做限定。其中,第一设备(或第二设备)中可以包括蓝牙芯片,该蓝牙芯片可以实现根据回声(echo)消息唤醒设备,唤醒设备可以理解为使得设备由灭屏状态切换为亮屏状态。Exemplarily, FIG1 is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application. The terminal device described in FIG1 may be the first device described in the embodiment of the present application, or may be the second device described in the embodiment of the present application; and the hardware structure of the first device and the second device may be the same or different, which is not limited in the embodiment of the present application. Among them, the first device (or the second device) may include a Bluetooth chip, which can realize waking up the device according to an echo message, and waking up the device can be understood as switching the device from a screen-off state to a screen-on state.
终端设备也可以称为终端,(terminal)、电子设备、用户设备(user equipment,UE)、移动台(mobile station,MS)、移动终端(mobile terminal,MT)等。其中,终端设备可以为具有通信功能的手机(mobile phone)、智能电视、穿戴式设备、平板电脑(Pad)、带无线收发功能的电脑、虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制(industrial control)中的无线终端、无人驾驶(self-driving)中的无线终端、远程手术(remote medical surgery)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端等等。本申请的实施例对终端设备所采用的具体技术和具体设备形态不做限定。The terminal device may also be referred to as a terminal, an electronic device, a user equipment (UE), a mobile station (MS), a mobile terminal (MT), etc. Among them, the terminal device may be a mobile phone with communication function, a smart TV, a wearable device, a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, etc. The embodiments of the present application do not limit the specific technology and specific device form adopted by the terminal device.
终端设备可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B, 麦克风170C,耳机接口170D,传感器模块180,按键190,指示器192,摄像头193,以及显示屏194等。The terminal device may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, Microphone 170C, headphone jack 170D, sensor module 180, button 190, indicator 192, camera 193, and display screen 194, etc.
其中,传感器模块180可以包括压力传感器,陀螺仪传感器,气压传感器,磁传感器,加速度传感器,距离传感器,接近光传感器,指纹传感器,温度传感器,触摸传感器,环境光传感器,骨传导传感器等。Among them, the sensor module 180 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.
可以理解的是,本申请实施例示意的结构并不构成对终端设备的具体限定。在本申请另一些实施例中,终端设备可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the terminal device. In other embodiments of the present application, the terminal device may include more or fewer components than shown in the figure, or combine certain components, or split certain 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.
处理器110可以包括一个或多个处理单元。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。处理器110中还可以设置存储器,用于存储指令和数据。The processor 110 may include one or more processing units. Different processing units may be independent devices or integrated into one or more processors. The processor 110 may also be provided with a memory for storing instructions and data.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为终端设备充电,也可以用于终端设备与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the terminal device, and can also be used to transmit data between the terminal device and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。电源管理模块141用于连接充电管理模块140与处理器110。The charging management module 140 is used to receive charging input from a charger, which may be a wireless charger or a wired charger. The power management module 141 is used to connect the charging management module 140 to the processor 110 .
终端设备的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the terminal device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.
天线1和天线2用于发射和接收电磁波信号。终端设备中的天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The antenna in the terminal device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antenna.
移动通信模块150可以提供应用在终端设备上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。The mobile communication module 150 can provide solutions for wireless communications including 2G/3G/4G/5G applied to terminal devices. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
无线通信模块160可以提供应用在终端设备上的包括无线局域网(wirelesslocal area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM)等无线通信的解决方案。The wireless communication module 160 can provide wireless communication solutions for application in terminal devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), etc.
终端设备通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。The terminal device realizes the display function through the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。在一些实施例中,终端设备可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the terminal device may include 1 or N display screens 194, where N is a positive integer greater than 1.
终端设备可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The terminal device can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
摄像头193用于捕获静态图像或视频。在一些实施例中,终端设备可以包括1个或N个摄像头193,N为大于1的正整数。 The camera 193 is used to capture static images or videos. In some embodiments, the terminal device may include 1 or N cameras 193, where N is a positive integer greater than 1.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展终端设备的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos can be saved in the external memory card.
内部存储器121可以用于存储计算机可执行程序代码,可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory 121 can include a program storage area and a data storage area.
终端设备可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The terminal device can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。终端设备可以通过扬声器170A收听音乐,或收听免提通话。受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当终端设备接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。耳机接口170D用于连接有线耳机。麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。本申请实施例中,终端设备可以拥有设置一个麦克风170C。The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. Speaker 170A, also known as "speaker", is used to convert audio electrical signals into sound signals. The terminal device can listen to music or listen to hands-free calls through speaker 170A. Receiver 170B, also known as "earpiece", is used to convert audio electrical signals into sound signals. When the terminal device answers a call or voice message, the voice can be answered by placing receiver 170B close to the human ear. Headphone interface 170D is used to connect wired headphones. Microphone 170C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. In the embodiment of the present application, the terminal device may have a microphone 170C.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。终端设备可以接收按键输入,产生与终端设备的用户设置以及功能控制有关的键信号输入。指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The button 190 includes a power button, a volume button, etc. The button 190 may be a mechanical button. It may also be a touch button. The terminal device may receive the button input and generate a key signal input related to the user settings and function control of the terminal device. The indicator 192 may be an indicator light, which may be used to indicate the charging status, power change, message, missed call, notification, etc.
终端设备的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构等,在此不再赘述。The software system of the terminal device can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture, etc., which will not be elaborated here.
示例性的,图2所示为本申请实施例提供的一种耳机的结构示意图。图2中描述的耳机可以为智能耳机,如蓝牙耳机等,本申请实施例中对此不做限定。For example, Fig. 2 is a schematic diagram of the structure of a headset provided in an embodiment of the present application. The headset described in Fig. 2 may be a smart headset, such as a Bluetooth headset, etc., which is not limited in the embodiment of the present application.
如图2所示,耳机包括一个或者多个处理器210、一个或多个存储器220、通信接口230、音频采集电路和音频播放电路。其中音频采集电路进一步可包括至少一个麦克风240和模拟数字转换器(analog-to-digital converter,ADC)250。音频播放电路进一步可包括扬声器260和数字模拟转换器(digital-to-analog converter,DAC)。可选的,耳机还可以包括一个或多个传感器280,例如接近传感器、运动传感器(motion sensor)、惯性传感器等等。上述这些硬件部件可在一个或多个通信总线上通信。分别描述如下:As shown in FIG2 , the headset includes one or more processors 210, one or more memories 220, a communication interface 230, an audio acquisition circuit, and an audio playback circuit. The audio acquisition circuit may further include at least one microphone 240 and an analog-to-digital converter (ADC) 250. The audio playback circuit may further include a speaker 260 and a digital-to-analog converter (DAC). Optionally, the headset may also include one or more sensors 280, such as proximity sensors, motion sensors, inertial sensors, and the like. The above-mentioned hardware components may communicate on one or more communication buses. They are described as follows:
处理器210是耳机的控制中心,处理器还可能被称为控制单元、控制器、微控制器或其他某个合适的术语。处理器210利用各种接口和线路连接耳机的各个部件,在可能实施例中,处理器210还可包括一个或多个处理核心。在可能的实施例中,处理器210中可集成有主控制单元和信号处理模块。主控制单元(MCU)用于接收传感器280采集的数据或来自信号处理模块的监测信号或来自终端(例如手机APP)的控制信号,通过综合判断、决策,最后对耳机进行控制。主控制单元还用于将滤波器系数写到信号处理模块中的滤波器对应的滤波器系数的位置,从而实现对滤波器的配置。此外,主控制单元还可用于根据级别索引确定下行音频信号的音量。The processor 210 is the control center of the headset. The processor may also be referred to as a control unit, a controller, a microcontroller or other appropriate terms. The processor 210 uses various interfaces and lines to connect the various components of the headset. In a possible embodiment, the processor 210 may also include one or more processing cores. In a possible embodiment, the processor 210 may be integrated with a main control unit and a signal processing module. The main control unit (MCU) is used to receive data collected by the sensor 280 or a monitoring signal from the signal processing module or a control signal from a terminal (such as a mobile phone APP), and finally controls the headset through comprehensive judgment and decision-making. The main control unit is also used to write the filter coefficient to the position of the filter coefficient corresponding to the filter in the signal processing module, thereby realizing the configuration of the filter. In addition, the main control unit can also be used to determine the volume of the downlink audio signal according to the level index.
存储器220可以与处理器210耦合,或者与处理器210通过总线连接,用于存储各种软件程序和/或多组指令以及数据。具体实现中,存储器220可包括高速随机存取的存储器,并且也可包括非易失性存储器,例如一个或多个磁盘存储设备、嵌入式多媒体卡(embedded  multi media card,EMMC)、通用闪存存储(universal flash storage,UFS)、只读存储器(read-only memory,ROM)或闪存(flash)等,或者是可存储静态信息和指令的其他类型的静态存储器。存储器220还可以存储一个或多个计算机程序,一个或多个计算机程序包括本申请所描述方法的程序指令。示例性的,存储器203中存储用于实现状态通知方法的计算机指令。The memory 220 may be coupled to the processor 210 or connected to the processor 210 via a bus, and is used to store various software programs and/or multiple sets of instructions and data. In a specific implementation, the memory 220 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more disk storage devices, an embedded multimedia card (embedded The memory 220 may be a memory device such as a microprocessor, a microcontroller, a microcomputer, a multi media card (EMMC), a universal flash storage (UFS), a read-only memory (ROM) or a flash memory, or other types of static memory that can store static information and instructions. The memory 220 may also store one or more computer programs, and the one or more computer programs may include program instructions for the method described in the present application. Exemplarily, the memory 203 may store computer instructions for implementing the status notification method.
存储器220还可以存储通信程序,该通信程序可用于与终端进行通信。在一种示例中,存储器220还可以存储数据/程序指令,处理器210可用于调用和执行存储器220中的数据/程序指令。The memory 220 may also store a communication program, which may be used to communicate with the terminal. In an example, the memory 220 may also store data/program instructions, and the processor 210 may be used to call and execute the data/program instructions in the memory 220 .
可选的,该存储器220可以为MCU外部的存储器,也可以为MCU自带的存储单元。Optionally, the memory 220 may be a memory external to the MCU, or may be a storage unit built into the MCU.
通信接口230用于与终端进行通信,该通信方式可以是有线方式,也可以是无线方式。当通信方式是有线通信时,通信接口230可通过线缆接入到终端。当通信方式是无线通信时,通信接口230用于接收和发送射频信号,其所支持的无线通信方式例如可以是蓝牙(Bluetooth)通信、基本速率(basic rate,BR)、增强数据速率(enhanced data rate,EDR)、蓝牙低功耗(bluetooth low energy,BLE)通信、无线保真(wireless-fidelity,Wifi)通信、红外通信、或蜂窝2/3/4/5代(2/3/4/5generation,2G/3G/4G/5G)通信等通信方式中的至少一种。具体实现中,通信接口230可包括但不限于:天线系统、RF收发器、一个或多个放大器、调谐器、一个或多个振荡器、数字信号处理器、CODEC芯片、SIM卡和存储介质等。在一些实施例中,可在单独的芯片上实现通信接口230。The communication interface 230 is used to communicate with the terminal, and the communication mode can be a wired mode or a wireless mode. When the communication mode is wired communication, the communication interface 230 can be connected to the terminal through a cable. When the communication mode is wireless communication, the communication interface 230 is used to receive and send radio frequency signals, and the wireless communication mode supported by it can be, for example, Bluetooth communication, basic rate (BR), enhanced data rate (EDR), Bluetooth low energy (BLE) communication, wireless fidelity (Wifi) communication, infrared communication, or cellular 2/3/4/5 generation (2G/3G/4G/5G) communication and other communication modes. In a specific implementation, the communication interface 230 may include but is not limited to: an antenna system, an RF transceiver, one or more amplifiers, a tuner, one or more oscillators, a digital signal processor, a CODEC chip, a SIM card, and a storage medium. In some embodiments, the communication interface 230 can be implemented on a separate chip.
麦克风240可用于采集声音信号(或称音频信号,该音频信号是模拟信号),模拟数字转换器250用于将麦克风240采集到的模拟信号转换成为数字信号,并将该数字信号送到处理器210进行处理,具体实施例中,可送到信号处理模块进行处理。信号处理模块可将处理后的信号(例如混音音频信号)传输至数字模拟转换器270,数字模拟转换器270可将接收到的信号转换为模拟信号,进而传输到扬声器260,扬声器用于根据该模拟信号进行播放,从而使用户能够听到声音。The microphone 240 can be used to collect sound signals (or audio signals, which are analog signals), and the analog-to-digital converter 250 is used to convert the analog signals collected by the microphone 240 into digital signals, and send the digital signals to the processor 210 for processing. In a specific embodiment, the digital signals can be sent to the signal processing module for processing. The signal processing module can transmit the processed signal (such as a mixed audio signal) to the digital-to-analog converter 270, and the digital-to-analog converter 270 can convert the received signal into an analog signal, and then transmit it to the speaker 260, which is used to play according to the analog signal so that the user can hear the sound.
本领域技术人员可以理解,耳机仅为本申请实施例提供的一种示例。在本申请的具体实现中,耳机可具有比示出的部件更多或更少的部件,可以组合两个或更多个部件,或者可具有部件的不同配置实现。需要说明的是,在一种可选的情况中,耳机的上述各个部件也可以耦合在一起设置。Those skilled in the art will appreciate that the earphone is only an example provided in the embodiments of the present application. In a specific implementation of the present application, the earphone may have more or fewer components than those shown, may combine two or more components, or may have different configurations of components. It should be noted that, in an optional case, the above-mentioned components of the earphone may also be coupled together.
可以理解的是,上述耳机也可能被称为耳塞、耳麦、随身听、音讯播放器、媒体播放器、头戴式受话器、听筒设备或其他某个合适的术语,本申请的实施例对此不做限定。It is understandable that the above-mentioned earphones may also be called earplugs, headsets, walkmans, audio players, media players, head-mounted receivers, earphone devices or other suitable terms, and the embodiments of the present application are not limited to this.
基于上述描述的终端设备以及耳机,图3为一种在音频业务下进行状态通知的流程示意图。其中,音频业务通常可以包括:媒体音频业务以及通话音频业务。其中,媒体音频业务可以为:与播放音频或播放视频相关的业务等,通话音频业务可以为:与拨打电话或者拨打视频电话相关的业务等,该媒体音频业务以及通话音频业务也可以有其他名称,本申请实施例中对此不做限定。Based on the terminal device and headset described above, FIG3 is a flow chart of status notification under an audio service. Among them, the audio service can generally include: media audio service and call audio service. Among them, the media audio service can be: a service related to playing audio or playing video, etc., and the call audio service can be: a service related to making a phone call or making a video call, etc. The media audio service and call audio service can also have other names, which are not limited in the embodiments of the present application.
通常情况下,基于媒体音频业务进行状态通知的流程示意图可以参见图3中的a中的S311-S318所示的步骤吗,基于通话音频业务进行状态通知的流程示意图可以参见图3中的b中的S321-S330所示的步骤。其中,该终端设备可以为本申请实施例中描述的第一设 备、或也可以为本申请实施例中描述的第二设备,以终端设备为第一设备为例进行示例说明,该示例并不构成对本申请实施例的限定。Generally, the flow diagram of status notification based on media audio service can refer to the steps S311-S318 in a of FIG. 3 , and the flow diagram of status notification based on call audio service can refer to the steps S321-S330 in b of FIG. 3 . The terminal device can be the first device described in the embodiment of the present application. The device may also be the second device described in the embodiment of the present application. The terminal device is taken as the first device as an example for illustration, and the example does not constitute a limitation on the embodiment of the present application.
如图3中的a所示,该基于媒体音频业务进行状态通知的方法可以包括如下步骤:As shown in a of FIG. 3 , the method for status notification based on media audio service may include the following steps:
S311、第一设备与耳机建立连接。S311: The first device establishes a connection with the headset.
示例性的,第一设备和耳机之间可以基于BR/EDR、或BLE中一项或多项蓝牙通信的解决方案建立无线通信连接,并基于该无线通信连接进行数据传输与数据的接收。Exemplarily, a wireless communication connection may be established between the first device and the headset based on BR/EDR, or one or more Bluetooth communication solutions in BLE, and data transmission and reception may be performed based on the wireless communication connection.
S312、耳机周期性的向第一设备发送BLE广播(耳机处于空闲)。S312: The headset periodically sends a BLE broadcast to the first device (the headset is idle).
其中,S312所示的步骤中描述的BLE广播用于指示耳机正处于空闲状态,或理解为耳机未被任一设备占用。The BLE broadcast described in the step S312 is used to indicate that the headset is in an idle state, or it can be understood that the headset is not occupied by any device.
S313、当第一设备接收到开始媒体音频业务时,第一设备向耳机发送音频/视频分配传输协议(A/V distribution transport protocol,AVDTP)开始命令。S313. When the first device receives a signal to start a media audio service, the first device sends an audio/video distribution transport protocol (A/V distribution transport protocol, AVDTP) start command to the headset.
AVDTP协议可以为常见的蓝牙音频传输协议,AVDTP开始命令用于在AVDTP协议下实现消息的传输。AVDTP开始命令用于指示第一设备使用耳机实现媒体音频业务。The AVDTP protocol may be a common Bluetooth audio transmission protocol, and the AVDTP start command is used to implement message transmission under the AVDTP protocol. The AVDTP start command is used to instruct the first device to use the headset to implement a media audio service.
S314、第一设备向耳机发送音频流。S314: The first device sends an audio stream to the headset.
S315、耳机周期性的向第一设备发送BLE广播(耳机处于媒体音频业务中)。S315: The headset periodically sends a BLE broadcast to the first device (the headset is in a media audio service).
可能的实现方式中,在第一设备与耳机建立连接的场景中,第一设备也可以向耳机持续性的发送音频流。In a possible implementation, in a scenario where the first device establishes a connection with the headset, the first device may also continuously send an audio stream to the headset.
S316、在第一设备接收到暂停媒体音频业务时,第一设备向耳机发送AVDTP暂停命令。S316: When the first device receives a request to suspend the media audio service, the first device sends an AVDTP pause command to the headset.
AVDTP暂停命令用于指示第一设备暂停使用耳机实现媒体音频业务。The AVDTP pause command is used to instruct the first device to pause using the headset to implement the media audio service.
S317、第一设备暂停向耳机发送音频流。S317: The first device stops sending the audio stream to the headset.
S318、耳机周期性的向第一设备发送BLE广播(耳机处于空闲)。S318: The headset periodically sends a BLE broadcast to the first device (the headset is idle).
基于此,第一设备可以基于AVDTP命令,使得耳机为其媒体音频业务提供服务。Based on this, the first device can enable the headset to provide services for its media audio service based on the AVDTP command.
如图3中的a所示,该基于通话音频业务进行状态通知的方法可以包括如下步骤:As shown in a of FIG. 3 , the method for status notification based on call audio service may include the following steps:
S321、第一设备与耳机建立连接。S321: The first device establishes a connection with the headset.
第一设备与耳机之间建立连接的方法可以参见S311所示的步骤,在此不再赘述。The method for establishing a connection between the first device and the headset can refer to the step shown in S311, which will not be repeated here.
S322、耳机周期性的向第一设备发送BLE广播(耳机处于空闲)。S322: The headset periodically sends a BLE broadcast to the first device (the headset is idle).
S323、当第一设备接收到开始通话音频业务时,第一设备向耳机发送注意(attention,AT)命令(开始通话)。S323: When the first device receives a call start audio service, the first device sends an attention (AT) command to the headset (starting a call).
其中,AT命令可以为蓝牙协议中用于实现连接与通信的常规指令。AT命令(开始通话)用于指示第一设备开始使用耳机实现通话音频业务。The AT command may be a conventional instruction in the Bluetooth protocol for realizing connection and communication. The AT command (start call) is used to instruct the first device to start using the earphone to realize the call audio service.
S324、第一设备与耳机之间的蓝牙通话连接建立。S324: A Bluetooth call connection is established between the first device and the headset.
S325、第一设备与耳机进行音频流交互。S325: The first device interacts with the headset through an audio stream.
示例性的,在通话音频业务中,第一设备可以将接收到的音频流发送至耳机,并且耳机也可以将基于麦克风采集到的音频流发送至第一设备。Exemplarily, in a call audio service, the first device may send a received audio stream to the headset, and the headset may also send an audio stream collected by a microphone to the first device.
S326、耳机周期性的向第一设备发送BLE广播(耳机处于通话音频业务中)。S326: The headset periodically sends a BLE broadcast to the first device (the headset is in a call audio service).
可能的实现方式中,在第一设备与耳机建立连接的场景中,第一设备与耳机可以保持音频流的交互过程。In a possible implementation, in a scenario where the first device establishes a connection with the headset, the first device and the headset may maintain an interactive process of the audio stream.
S327、在第一设备接收到暂停通话音频业务时,第一设备向耳机发送AT命令(停止 通话)。其中,AT命令(停止通话)用于指示第一设备停止使用耳机实现通话音频业务。S327: When the first device receives the call pause audio service, the first device sends an AT command (stop) to the headset. The AT command (stop calling) is used to instruct the first device to stop using the earphone to implement the call audio service.
S328、第一设备与第二设备蓝牙之间的蓝牙通话连接断开。S328. The Bluetooth call connection between the first device and the second device is disconnected.
S329、第一设备与耳机之间暂停音频流。S329: Pause the audio stream between the first device and the headset.
S330、耳机周期性的向第一设备发送BLE广播(耳机处于空闲)。S330: The headset periodically sends a BLE broadcast to the first device (the headset is idle).
基于此,第一设备可以基于AT命令,使得耳机为其通话音频业务提供服务。Based on this, the first device can enable the headset to provide service for its call audio service based on the AT command.
可以理解的是,图3中的a与图3中的b均可以为第一设备与耳机之间独立完成业务的步骤,且图3中的a与图3中的b之间可以不存在前后顺序关系。It can be understood that a in FIG. 3 and b in FIG. 3 can both be steps for independently completing a service between the first device and the headset, and there may be no chronological relationship between a in FIG. 3 and b in FIG. 3 .
在图3对应的实施例的描述中,第二设备也可以基于图3中的a描述的步骤利用耳机实现媒体音频业务,并且第二设备也可以基于图3中的b描述的步骤利用耳机实现通话音频业务。In the description of the embodiment corresponding to Figure 3, the second device can also use the headset to implement the media audio service based on the step described in a in Figure 3, and the second device can also use the headset to implement the call audio service based on the step described in b in Figure 3.
在图3对应的实施例的基础上,耳机也可以同时与第一设备、以及第二设备建立连接,当第一设备使用耳机时,第一设备可以通过蓝牙协议通知第二设备耳机的使用情况。Based on the embodiment corresponding to FIG. 3 , the headset may also establish connections with the first device and the second device at the same time. When the first device uses the headset, the first device may notify the second device of the usage of the headset through the Bluetooth protocol.
示例性的,图4为本申请实施例提供的一种状态通知方法的流程示意图。如图4所示,该状态通知方法可以包括如下步骤:For example, Fig. 4 is a flow chart of a status notification method provided in an embodiment of the present application. As shown in Fig. 4, the status notification method may include the following steps:
S401、第一设备与耳机建立连接、且第二设备与耳机建立连接。S401: A first device establishes a connection with an earphone, and a second device establishes a connection with the earphone.
示例性的,第一设备(或第二设备)和耳机之间可以基于BR/EDR、或BLE中一项或多项蓝牙通信的解决方案建立无线通信连接,并基于该无线通信连接进行数据传输与数据的接收。Exemplarily, a wireless communication connection can be established between the first device (or the second device) and the headset based on one or more Bluetooth communication solutions in BR/EDR or BLE, and data transmission and reception can be performed based on the wireless communication connection.
可能的实现方式中,在S401之后,由于耳机在建立连接之后暂时没有为任一设备提供服务,因此耳机可以周期性的向第一设备以及第二设备发送BLE广播(耳机处于空闲);适应的,第一设备以及第二设备均可以接收到该耳机发送的BLE广播(耳机处于空闲)。进一步的,当第一设备以及第二设备均处于亮屏状态时,第一设备或第二设备可以接收到BLE广播(耳机处于空闲),并从BLE广播(耳机处于空闲)中得到耳机的状态。In a possible implementation, after S401, since the headset temporarily does not provide services for any device after the connection is established, the headset can periodically send a BLE broadcast (the headset is idle) to the first device and the second device; adapted, the first device and the second device can both receive the BLE broadcast (the headset is idle) sent by the headset. Further, when the first device and the second device are both in the screen-on state, the first device or the second device can receive the BLE broadcast (the headset is idle) and obtain the status of the headset from the BLE broadcast (the headset is idle).
其中,BLE广播中可以包括:耳机的业务状态,如该耳机的业务状态可以包括下述一种或多种:通话音频业务、媒体音频业务、空闲、闹钟、或提示音等,本申请实施例中对此不做限定。Among them, the BLE broadcast may include: the service status of the headset, such as the service status of the headset may include one or more of the following: call audio service, media audio service, idle, alarm, or prompt tone, etc., which is not limited in the embodiments of the present application.
S402、在第一设备开始媒体音频业务时,第一设备向耳机发送回声(echo)消息(媒体音频业务开始)。S402: When the first device starts a media audio service, the first device sends an echo message (media audio service starts) to the headset.
其中,S402所示的步骤中描述的echo消息可以用于指示媒体音频业务开始。The echo message described in step S402 may be used to indicate the start of a media audio service.
echo消息可以为蓝牙协议中常用的消息类型,echo消息可以根据携带的内容指示不同的作用。echo消息可以实现对于设备的唤醒,例如在处于灭屏状态的任一设备的蓝牙芯片接收到echo消息时,蓝牙芯片可以唤醒本地设备,使得本地设备由灭屏状态切换至亮屏状态。The echo message can be a common message type in the Bluetooth protocol. The echo message can indicate different functions according to the content it carries. The echo message can wake up the device. For example, when the Bluetooth chip of any device in the off-screen state receives an echo message, the Bluetooth chip can wake up the local device, so that the local device switches from the off-screen state to the on-screen state.
示例性的,当第一设备接收到用户针对播放音频控件的触发操作、接收到用户的用于播放音频的语音操作、或者接收到用户用于播放音频的手势操作等时,第一设备可以向耳机发送echo消息(媒体音频业务开始)。适应的,耳机在接收到来自第一设备的echo消息(媒体音频业务开始)时,可以将耳机的业务状态设置为:媒体音频业务,并执行S403所示的步骤。Exemplarily, when the first device receives a trigger operation of a user for playing an audio control, receives a voice operation of a user for playing audio, or receives a gesture operation of a user for playing audio, the first device may send an echo message (media audio service starts) to the headset. Suitably, when the headset receives an echo message (media audio service starts) from the first device, the headset may set the service state of the headset to: media audio service, and execute the steps shown in S403.
可能的实现方式中,在S402之后,由于耳机接收到来自第一设备的echo消息(媒 体音频业务开始),因此耳机可以周期性的向第一设备以及第二设备发送BLE广播(耳机处于媒体音频业务中);适应的,第一设备以及第二设备均可以接收到该耳机发送的BLE广播(耳机处于媒体音频业务中)。In a possible implementation, after S402, since the headset receives an echo message (media The headset starts a media audio service), so the headset can periodically send a BLE broadcast to the first device and the second device (the headset is in a media audio service); adapted, the first device and the second device can both receive the BLE broadcast sent by the headset (the headset is in a media audio service).
其中,由于第二设备当前仍处于灭屏状态,因此即使第二设备接收到耳机发送的BLE广播(耳机处于媒体音频业务中),但未对BLE广播进行扫描,第二设备也就无法知道耳机的状态。Among them, since the second device is currently still in the screen-off state, even if the second device receives the BLE broadcast sent by the headset (the headset is in the media audio service), but does not scan the BLE broadcast, the second device cannot know the status of the headset.
S403、耳机向第二设备发送echo消息(耳机处于媒体音频业务中)。S403: The headset sends an echo message to the second device (the headset is in a media audio service).
该S403所示的步骤中描述的echo消息的作用可以与S402所示的步骤中相同,在此不再赘述。The role of the echo message described in the step shown in S403 may be the same as that in the step shown in S402, and will not be repeated here.
示例性的,当第二设备处于状态1:灭屏,且接收到来自耳机的echo消息(耳机处于媒体音频业务中)时,第二设备的蓝牙芯片可以基于echo消息(耳机处于媒体音频业务中)唤醒第二设备,使得第二设备由状态1:灭屏切换至状态2:被蓝牙芯片唤醒。其中,在第二设备被蓝牙芯片唤醒时,第二设备可以处于亮屏状态。进一步的,第二设备可以在处于亮屏状态的一段时间阈值,如5秒由自动由亮屏状态切换至状态3:灭屏。Exemplarily, when the second device is in state 1: screen off, and receives an echo message from the headset (the headset is in a media audio service), the Bluetooth chip of the second device can wake up the second device based on the echo message (the headset is in a media audio service), so that the second device switches from state 1: screen off to state 2: awakened by the Bluetooth chip. When the second device is awakened by the Bluetooth chip, the second device can be in a screen-on state. Furthermore, the second device can automatically switch from the screen-on state to state 3: screen off within a time threshold of 5 seconds in the screen-on state.
S404、第一设备与耳机进行音频流的交互。S404: The first device interacts with the headset via an audio stream.
S405、在第一设备暂停媒体音频业务时,第一设备向耳机发送回声(echo)消息(媒体音频业务暂停)。S405: When the first device suspends the media audio service, the first device sends an echo message (media audio service suspension) to the headset.
其中,S405所示的步骤中描述的echo可以用于指示媒体音频业务暂停。The echo described in step S405 may be used to indicate that the media audio service is paused.
示例性的,当第一设备接收到用户针对暂停音频控件的触发操作、接收到用户的用于暂停音频的语音操作、或者接收到用户用于暂停音频的手势操作等时,第一设备可以向耳机发送echo消息(媒体音频业务暂停)。适应的,耳机在接收到来自第一设备的echo消息(媒体音频业务暂停)时,可以将耳机的业务状态由S403所示的步骤中描述的媒体音频业务切换为空闲,并执行S406所示的步骤。Exemplarily, when the first device receives a trigger operation of the user for pausing the audio control, receives a voice operation of the user for pausing the audio, or receives a gesture operation of the user for pausing the audio, the first device may send an echo message (media audio service pause) to the headset. Suitably, when the headset receives the echo message (media audio service pause) from the first device, the service state of the headset may be switched from the media audio service described in the step shown in S403 to idle, and the step shown in S406 is executed.
可能的实现方式中,在S405之后,由于耳机接收到来自第一设备的echo消息(媒体音频业务暂停),因此耳机可以周期性的向第一设备以及第二设备发送BLE广播(耳机处于空闲);适应的,第一设备以及第二设备均可以接收到该耳机发送的BLE广播(耳机处于空闲)。In a possible implementation, after S405, since the headset receives an echo message from the first device (media audio service is suspended), the headset can periodically send BLE broadcasts to the first device and the second device (the headset is idle); adapted, both the first device and the second device can receive the BLE broadcast sent by the headset (the headset is idle).
其中,由于第二设备当前仍处于灭屏状态,因此即使第二设备接收到耳机发送的BLE广播(耳机处于空闲),但未对BLE广播进行扫描,第二设备也就无法知道耳机的状态。Among them, since the second device is currently still in the screen-off state, even if the second device receives the BLE broadcast sent by the headset (the headset is idle), but does not scan the BLE broadcast, the second device cannot know the status of the headset.
S406、耳机向第二设备发送echo消息(耳机处于空闲)。S406: The headset sends an echo message to the second device (the headset is idle).
示例性的,当第二设备处于状态3:灭屏,且接收到来自耳机的echo消息(耳机处于空闲)时,第二设备的蓝牙芯片可以基于echo消息(耳机处于空闲)唤醒第二设备,使得第二设备由状态3:灭屏切换至状态4:被蓝牙芯片唤醒。其中,在第二设备被蓝牙芯片唤醒时,第二设备可以处于亮屏状态。进一步的,第二设备可以在处于亮屏状态的一段时间阈值,如5秒由自动由亮屏状态切换至状态5:灭屏。Exemplarily, when the second device is in state 3: screen off, and receives an echo message from the headset (the headset is idle), the Bluetooth chip of the second device can wake up the second device based on the echo message (the headset is idle), so that the second device switches from state 3: screen off to state 4: awakened by the Bluetooth chip. When the second device is awakened by the Bluetooth chip, the second device can be in a screen-on state. Furthermore, the second device can automatically switch from the screen-on state to state 5: screen off within a time threshold of 5 seconds in the screen-on state.
S407、第一设备与耳机之间暂停音频流。S407: Pause the audio stream between the first device and the headset.
第一设备与耳机之间暂停音频流可以理解为,第一设备将不会把音频流发送至耳机,且耳机也不会将音频流发送至第一设备。 Pausing the audio stream between the first device and the headset can be understood as the first device will not send the audio stream to the headset, and the headset will not send the audio stream to the first device.
可能的实现方式中,在耳机同时与第一设备以及第二设备建立连接的场景中,当第一设备接收到通话音频业务时,第一设备也可以基于S402所示的步骤通知耳机当前的业务状态,且耳机以及第二设备对不同消息的处理方式可以参见图4对应的实施例,在此不再赘述。In a possible implementation, in a scenario where the headset establishes connections with the first device and the second device at the same time, when the first device receives a call audio service, the first device can also notify the headset of the current service status based on the steps shown in S402, and the way the headset and the second device handle different messages can refer to the corresponding embodiment of Figure 4, which will not be repeated here.
然而,当第一设备出现多次开始媒体音频业务和/或暂停媒体音频业务时,第二设备将会在接收到S403以及S406所示的步骤中描述的echo消息被蓝牙芯片频繁唤醒,使得第二设备多次由灭屏状态切换至亮屏状态,这些第二设备的唤醒过程带来较高的能耗。However, when the first device starts the media audio service and/or pauses the media audio service multiple times, the second device will be frequently awakened by the Bluetooth chip after receiving the echo message described in steps shown in S403 and S406, causing the second device to switch from the screen-off state to the screen-on state multiple times. The wake-up process of the second device results in higher energy consumption.
有鉴于此,本申请提供一种状态通知方法,在第一设备使用耳机处理第一业务的过程中,耳机可以基于第一BLE消息通知第二设备耳机的业务状态,由于处于灭屏状态下的第二设备不会主动扫描BLE广播,因此在第一设备使用媒体音频业务的整个过程中,第二设备将不会存在被蓝牙芯片频繁唤醒的情况,降低第二设备的功耗。进一步的,在第二设备由灭屏状态切换到亮屏状态后,可以扫描该第一BLE广播,确定耳机的业务状态。In view of this, the present application provides a status notification method. In the process of the first device using the headset to process the first service, the headset can notify the service status of the headset of the second device based on the first BLE message. Since the second device in the screen-off state will not actively scan the BLE broadcast, the second device will not be frequently awakened by the Bluetooth chip during the entire process of the first device using the media audio service, thereby reducing the power consumption of the second device. Furthermore, after the second device switches from the screen-off state to the screen-on state, it can scan the first BLE broadcast to determine the service status of the headset.
下面以具体地实施例对本申请的技术方案以及本申请的技术方案如何解决上述技术问题进行详细说明。下面这几个具体的实施例可以独立实现,也可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。The following specific embodiments are used to describe in detail the technical solution of the present application and how the technical solution of the present application solves the above technical problems. The following specific embodiments can be implemented independently or in combination with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
示例性的,图5为本申请实施例提供的另一种状态通知方法的流程示意图。如图5所示,该状态通知方法可以包括如下步骤:For example, Fig. 5 is a flowchart of another status notification method provided in an embodiment of the present application. As shown in Fig. 5, the status notification method may include the following steps:
S501、第一设备与耳机建立连接、且第二设备与耳机建立连接。S501: A first device establishes a connection with an earphone, and a second device establishes a connection with the earphone.
S502、耳机周期性的向第一设备以及第二设备发送BLE广播(耳机处于空闲)。S502: The headset periodically sends a BLE broadcast to the first device and the second device (the headset is idle).
S503、在第一设备开始媒体音频业务时,第一设备向耳机发送回声(echo)消息(媒体音频业务开始)。S503: When the first device starts a media audio service, the first device sends an echo message (media audio service starts) to the headset.
其中,该S501-S503所示的步骤可以参见图4中的S401-S403所示的步骤,在此不再赘述。The steps shown in S501-S503 may refer to the steps shown in S401-S403 in FIG. 4 , and will not be described in detail here.
S504、耳机周期性的向第一设备以及第二设备发送BLE广播(耳机处于媒体音频业务中)。S504: The headset periodically sends a BLE broadcast to the first device and the second device (the headset is in a media audio service).
适应的,由于第二设备处于灭屏状态,因此无法对BLE广播进行扫描,就不会出现由于第一设备开始媒体音频业务导致第二设备被蓝牙芯片唤醒的情况,节省功耗。Suitable, because the second device is in the screen-off state, it is unable to scan the BLE broadcast, so the second device will not be awakened by the Bluetooth chip due to the first device starting the media audio service, thus saving power consumption.
可以理解的是,设备接收BLE广播的过程可以为,设备开启扫描窗口、并在特定的时间内基于该扫描窗口扫描BLE广播。而当设备处于灭屏状态时,不会开启扫描窗口也就无法实现对于BLE广播的扫描。It is understandable that the process of receiving BLE broadcast by the device may be that the device opens a scanning window and scans BLE broadcast based on the scanning window within a specific time. When the device is in the screen-off state, the scanning window will not be opened and the scanning of BLE broadcast cannot be realized.
适应的,第一设备可以接收到耳机发送的BLE广播(耳机处于媒体音频业务中),且第一设备可以确定本机处于媒体音频业务中,因此第一设备可以忽略该BLE消息。Suitably, the first device can receive the BLE broadcast sent by the headset (the headset is in the media audio service), and the first device can determine that the first device is in the media audio service, so the first device can ignore the BLE message.
可以理解的是,在第一设备确定接收到的BLE广播中指示的业务状态与本机中的业务状态一致时,则第一设备可以确定耳机正在为本设备提供服务,因此可以忽略当前接收到的BLE广播。It can be understood that when the first device determines that the service status indicated in the received BLE broadcast is consistent with the service status in the local device, the first device can determine that the headset is providing services for the device, and therefore the currently received BLE broadcast can be ignored.
S505、第一设备与耳机进行音频流的交互。S505: The first device interacts with the headset via audio stream.
可能的实现方式中,在S504之后,如在S505之后,耳机也可以继续周期性的向第一设备以及第二设备发送BLE广播(耳机处于媒体音频业务中)。In a possible implementation, after S504, such as after S505, the headset may continue to periodically send BLE broadcasts to the first device and the second device (the headset is in a media audio service).
可以理解的是,S504以及S505所示的步骤可以先后执行或者也可以同步执行,本申 请实施例中对此不做限定。It is understandable that the steps shown in S504 and S505 can be executed successively or simultaneously. Please do not limit this in the embodiments.
S506、在第一设备暂停媒体音频业务时,第一设备向耳机发送回声(echo)消息(媒体音频业务暂停)。S506: When the first device suspends the media audio service, the first device sends an echo message (media audio service suspension) to the headset.
S507、耳机周期性的向第一设备以及第二设备发送BLE广播(耳机处于空闲)。S507: The headset periodically sends a BLE broadcast to the first device and the second device (the headset is idle).
适应的,由于第二设备当前处于灭屏状态,无法对BLE广播进行扫描,就不会出现由于第一设备暂停媒体音频业务导致第二设备被蓝牙芯片唤醒的情况,节省功耗。Suitable, because the second device is currently in the screen-off state and cannot scan the BLE broadcast, the second device will not be awakened by the Bluetooth chip due to the first device suspending the media audio service, thus saving power consumption.
适应的,第一设备可以接收到耳机发送的BLE广播(耳机处于空闲),且第一设备可以确定本机的媒体音频业务已经暂停,因此可以基于BLE广播(耳机处于空闲),保存耳机的业务状态,以便下次使用。Suitably, the first device can receive the BLE broadcast sent by the headset (the headset is idle), and the first device can determine that the local media audio service has been suspended, so it can save the service status of the headset based on the BLE broadcast (the headset is idle) for next use.
S508、第一设备与耳机之间暂停音频流。S508: Pause the audio stream between the first device and the headset.
可能的实现方式中,在S507之后,如在S508之后,耳机也可以继续周期性的向第一设备以及第二设备发送BLE广播(耳机处于空闲)。In a possible implementation, after S507, such as after S508, the headset may continue to periodically send BLE broadcasts to the first device and the second device (the headset is idle).
可能的实现方式中,当第二设备由灭屏状态切换到亮屏状态时,第二设备则可以接收到耳机实时发送的BLE广播,或理解为处于亮屏状态的第二设备可以扫描到BLE广播。In a possible implementation, when the second device switches from a screen-off state to a screen-on state, the second device can receive the BLE broadcast sent by the headset in real time, or it can be understood that the second device in the screen-on state can scan the BLE broadcast.
可以理解的是,在S501-S508所示的步骤中,无论第一设备开始媒体音频业务还是暂停媒体音频业务,基于BLE广播进行耳机的业务状态的发送都不会对第二设备的功耗造成影响,如第二设备可以一直处于灭屏状态,因此相比于图4对应的实施例中基于echo消息对耳机的业务状态进行传输,使用BLE广播将会大大降低第一设备使用媒体音频业务的整个过程中为第二设备带来的额外功耗。It can be understood that in the steps shown in S501-S508, no matter whether the first device starts the media audio service or suspends the media audio service, the sending of the service status of the headset based on BLE broadcast will not affect the power consumption of the second device. For example, the second device can always be in the screen-off state. Therefore, compared with the transmission of the service status of the headset based on the echo message in the embodiment corresponding to Figure 4, the use of BLE broadcast will greatly reduce the additional power consumption brought to the second device during the entire process of the first device using the media audio service.
在图5对应的实施例的基础上,当第二设备由灭屏状态切换到亮屏状态,并开启媒体音频业务时,第二设备可以在亮屏状态下接收BLE广播(或者扫描BLE广播),由于BLE广播的滞后性使得第二设备无法基于BLE广播得到耳机准确的状态。因此,本申请实施例提供的一种状态通知方法可以在第二设备接收到媒体音频业务或通话音频业务时,基于echo消息及时确定是否允许耳机为当前接收到的媒体音频业务或通话音频业务提供服务。Based on the embodiment corresponding to FIG5, when the second device switches from the screen-off state to the screen-on state and turns on the media audio service, the second device can receive the BLE broadcast (or scan the BLE broadcast) in the screen-on state. Due to the lag of the BLE broadcast, the second device cannot obtain the accurate status of the headset based on the BLE broadcast. Therefore, a status notification method provided in an embodiment of the present application can determine whether to allow the headset to provide services for the currently received media audio service or call audio service in a timely manner based on the echo message when the second device receives the media audio service or call audio service.
其中,该BLE的滞后性可以理解为,由于第二设备开启扫描窗口并接收BLE广播的过程存在占空比,例如第二设备可以在每隔一段时间开启扫描窗口并接收BLE广播,因此可能存在接收到BLE广播不及时的情况下;并且,部分蓝牙芯片在扫描到BLE广播并上报BLE广播的过程中可能存在延迟,使得蓝牙芯片无法及时将扫描到的BLE广播实时上报给上层。Among them, the lag of BLE can be understood as that since there is a duty cycle in the process of the second device opening the scanning window and receiving the BLE broadcast, for example, the second device can open the scanning window and receive the BLE broadcast at intervals, so there may be a situation where the BLE broadcast is not received in time; and some Bluetooth chips may have delays in the process of scanning the BLE broadcast and reporting the BLE broadcast, making it impossible for the Bluetooth chip to report the scanned BLE broadcast to the upper layer in real time.
示例性的,图6为本申请实施例提供的再一种状态通知方法的流程示意图。如图6所示,该状态通知方法可以包括如下步骤:For example, Fig. 6 is a flowchart of another state notification method provided in an embodiment of the present application. As shown in Fig. 6, the state notification method may include the following steps:
S601、第一设备与耳机建立连接、且第二设备与耳机建立连接。S601: A first device establishes a connection with an earphone, and a second device establishes a connection with the earphone.
S602、耳机周期性的向第一设备以及第二设备发送BLE广播(耳机处于空闲)。S602: The headset periodically sends a BLE broadcast to the first device and the second device (the headset is idle).
S603、在第一设备开始媒体音频业务时,第一设备向耳机发送回声(echo)消息(媒体音频业务开始)。S603: When the first device starts a media audio service, the first device sends an echo message (media audio service starts) to the headset.
S604、耳机周期性的向第一设备以及第二设备发送BLE广播(耳机处于媒体音频业务中)。S604: The headset periodically sends a BLE broadcast to the first device and the second device (the headset is in a media audio service).
S605、第一设备与耳机进行音频流的交互。S605: The first device interacts with the headset via audio stream.
可能的实现方式中,在S604之后,如在S605之后,耳机也可以继续周期性的第一设 备以及第二设备发送BLE广播(耳机处于媒体音频业务中)。In a possible implementation, after S604, such as after S605, the headset may continue to periodically perform the first setting. The device and the second device send a BLE broadcast (the headset is in the media audio service).
其中,该S601-S605所示的步骤可以参见图5中的S501-S505所示的步骤,在此不再赘述。The steps shown in S601-S605 may refer to the steps shown in S501-S505 in FIG. 5 , and will not be described in detail here.
在S605之后,第二设备可以基于用户操作由灭屏状态切换至亮屏状态,且第二设备可以在亮屏状态下扫描BLE广播。After S605, the second device can switch from the screen-off state to the screen-on state based on the user operation, and the second device can scan the BLE broadcast in the screen-on state.
可能的实现方式中,第二设备也可以在亮屏状态下接收媒体音频业务或通话音频业务。当第二设备接收到媒体音频业务时,第二设备可以基于SS606-S608所示的步骤确定是否允许使用耳机;或者,当第二设备接收到通话音频业务时,第二设备可以基于S609-S611所示的步骤确定是否允许使用耳机。In a possible implementation, the second device may also receive a media audio service or a call audio service in the screen-on state. When the second device receives a media audio service, the second device may determine whether to allow the use of an earphone based on the steps shown in SS606-S608; or, when the second device receives a call audio service, the second device may determine whether to allow the use of an earphone based on the steps shown in S609-S611.
在第二设备接收到媒体音频业务的场景中:S606、当第二设备接收到媒体音频业务时,第二设备可以向耳机发送echo消息(媒体音频业务开始)。In a scenario where the second device receives the media audio service: S606, when the second device receives the media audio service, the second device may send an echo message (media audio service starts) to the headset.
适应的,耳机可以接收第二设备发送的echo消息(媒体音频业务开始),并基于耳机当前的业务状态确定是否允许第二设备使用耳机。例如,由于耳机在S603所示的步骤中接收到第一设备发送的echo消息(媒体音频业务开始),确定耳机当前已经被占用,因此已经处于被占用状态的耳机无法继续为第二设备提供耳机服务,进而耳机可以执行S607所示的步骤。The headset can receive the echo message (media audio service starts) sent by the second device, and determine whether to allow the second device to use the headset based on the current service state of the headset. For example, since the headset receives the echo message (media audio service starts) sent by the first device in the step shown in S603, it is determined that the headset is currently occupied, and therefore the headset that is already in the occupied state cannot continue to provide headset services for the second device, and then the headset can execute the step shown in S607.
S607、耳机向第二设备发送echo消息(业务被耳机拒绝)。S607: The headset sends an echo message to the second device (the service is rejected by the headset).
适应的,在第二设备接收到echo消息(业务被耳机拒绝)时,则可以确定当前无法使用耳机,进而执行S608所示的步骤。这样,使得第二设备与耳机之间可以通过echo消息实时进行耳机状态的识别以及第二设备是否支持耳机使用的判断。Suitably, when the second device receives the echo message (the service is rejected by the headset), it can be determined that the headset cannot be used currently, and then the step shown in S608 is executed. In this way, the second device and the headset can recognize the headset status in real time through the echo message and determine whether the second device supports the use of the headset.
S608、第二设备将出声通道切换到本机。S608: The second device switches the sound output channel to the local device.
在第二设备接收到通话音频业务的场景中:S609、当第二设备接收到通话音频业务时,第二设备可以向耳机发送echo消息(通话音频业务开始)。In a scenario where the second device receives a call audio service: S609, when the second device receives the call audio service, the second device may send an echo message (call audio service starts) to the headset.
适应的,耳机可以接收第二设备发送的echo消息(通话音频业务开始),并基于耳机当前的业务状态确定是否允许第二设备使用耳机。例如,由于耳机在S603所示的步骤中接收到第一设备发送的echo消息(媒体音频业务开始),确定耳机当前已经被占用,但由于当前占用耳机的媒体音频业务的优先级低于通话音频业务的优先级,因此耳机可以确定将为第二设备提供通话音频业务。其中,耳机中可以设置有各业务的优先级,使得耳机可以基于该各业务的优先级实现对于抢占场景的识别、以及耳机执行业务的判断。Suitably, the headset can receive an echo message (start of call audio service) sent by the second device, and determine whether to allow the second device to use the headset based on the current service status of the headset. For example, because the headset receives an echo message (start of media audio service) sent by the first device in the step shown in S603, it is determined that the headset is currently occupied, but because the priority of the media audio service currently occupying the headset is lower than the priority of the call audio service, the headset can determine that the call audio service will be provided to the second device. Among them, the priority of each service can be set in the headset, so that the headset can recognize the preemption scenario and determine the service execution of the headset based on the priority of each service.
可能的实现方式中,由于处于亮屏状态下的第二设备可以接收到耳机周期性发送的BLE广播(媒体音频业务开始),因此第二设备也可以在接收到开始通话音频业务时,基于媒体音频业务的优先级以及通话音频业务的优先级,确定通话音频业务是否可以抢占媒体音频业务。例如,当第二设备确定通话音频业务的优先级高于媒体音频业务的优先级时,第二设备可以执行S609所示的步骤。在此场景中,第二设备中可以预先设置有各业务的优先级,使得第二设备可以基于该各业务的优先级实现对于抢占场景的识别、以及耳机执行业务的判断。In a possible implementation, since the second device in the screen-on state can receive the BLE broadcast (media audio service starts) periodically sent by the headset, the second device can also determine whether the call audio service can preempt the media audio service based on the priority of the media audio service and the priority of the call audio service when receiving the start of the call audio service. For example, when the second device determines that the priority of the call audio service is higher than the priority of the media audio service, the second device can execute the steps shown in S609. In this scenario, the priority of each service can be pre-set in the second device, so that the second device can recognize the preemption scenario and determine whether the headset executes the service based on the priority of each service.
可能的实现方式中,由于通常情况下,通话音频业务的优先级较高(例如该通话音频业务的优先级可以最高),因此第二设备也可以在接收到通话音频业务时,直接抢占耳机,使得第二设备执行S609所示的步骤。 In a possible implementation, since the call audio service usually has a higher priority (for example, the call audio service may have the highest priority), the second device may directly seize the headset when receiving the call audio service, so that the second device executes the step shown in S609.
可能的实现方式中,基于媒体音频业务的优先级以及通话音频业务的优先级,确定通话音频业务是否可以抢占媒体音频业务的判断逻辑也可以同时在耳机以及第二设备中实现,保障耳机对于通话音频业务的正常服务。In a possible implementation method, based on the priority of the media audio service and the priority of the call audio service, the judgment logic for determining whether the call audio service can preempt the media audio service can also be implemented in the headset and the second device at the same time to ensure the normal service of the headset for the call audio service.
S610、耳机向第一设备发送echo消息(通话音频业务开始)。S610: The headset sends an echo message to the first device (call audio service starts).
适应的,在第一设备接收到该echo消息(通话音频业务开始)时,第一设备可以基于本机的媒体音频业务确定,耳机将不会继续为本机提供服务,进而执行S611所示的步骤。Suitably, when the first device receives the echo message (call audio service starts), the first device can determine based on the local media audio service that the headset will no longer provide services to the local device, and then execute the steps shown in S611.
S611、第一设备暂停本机音频。S611: The first device pauses local audio.
这样,在第一设备使用媒体音频业务的过程中,第二设备也需要使用媒体音频业务时,耳机可以基于耳机当前的状态确定是否允许为第二设备提供业务,例如由于耳机无法实现对于相同类型业务下的抢占,因此耳机可以确定在第一设备使用媒体音频业务的过程中无法为第二设备提供服务。In this way, when the first device is using the media audio service and the second device also needs to use the media audio service, the headset can determine whether to allow the provision of the service to the second device based on the current state of the headset. For example, since the headset cannot preempt the same type of service, the headset can determine that it cannot provide the second device with the service when the first device is using the media audio service.
可以理解的是,在第一设备使用媒体音频业务的过程中,第二设备也需要使用媒体音频业务时,由于第二设备一直处于亮屏状态,因此echo消息将不会带来额外的功耗。It is understandable that when the first device uses the media audio service and the second device also needs to use the media audio service, since the second device is always in the screen-on state, the echo message will not cause additional power consumption.
或者,当第一设备使用媒体音频业务的过程中,第二设备需要使用通话音频业务时,第二设备可以基于echo消息准确的通知耳机以及第一设备及时修改业务状态,使得耳机可以基于业务的优先级为第二设备提供通话服务。Alternatively, when the first device is using the media audio service and the second device needs to use the call audio service, the second device can accurately notify the headset based on the echo message and the first device to modify the service status in time, so that the headset can provide call services to the second device based on the priority of the service.
基于图4-图6对应的实施例中的描述,可能的实现方式中,图7为本申请实施例提供的一种系统架构示意图。图7中描述的系统也可以称为状态通知系统。Based on the description in the embodiments corresponding to Figures 4 to 6, in a possible implementation, Figure 7 is a schematic diagram of a system architecture provided by an embodiment of the present application. The system described in Figure 7 can also be called a status notification system.
如图7所示,该系统架构中可以包括:第一设备701、第二设备702以及耳机703。其中,第一设备701(或第二设备702)的结构以及可能的实现可以参见图1对应的实施例,耳机703的结构以及可能的实现可以参见图2对应的实施例,在此不再赘述。As shown in Fig. 7, the system architecture may include: a first device 701, a second device 702, and a headset 703. The structure and possible implementation of the first device 701 (or the second device 702) may refer to the embodiment corresponding to Fig. 1, and the structure and possible implementation of the headset 703 may refer to the embodiment corresponding to Fig. 2, which will not be described in detail here.
可能的实现方式中,在多个设备分别与耳机建立连接的场景中,系统架构中也可以包括除第一设备以及第二设备以外的其他终端设备,并且第一设备、第二设备以及其他终端设备也可以实现本申请实施例提供的状态通知方法,本申请实施例中对此不做限定。In a possible implementation, in a scenario where multiple devices establish connections with headphones respectively, the system architecture may also include other terminal devices in addition to the first device and the second device, and the first device, the second device and the other terminal devices may also implement the status notification method provided in the embodiment of the present application, which is not limited in the embodiment of the present application.
上面结合图4-图6,对本申请实施例提供的方法进行了说明,下面对本申请实施例提供的执行上述方法的装置进行描述。如图8所示,图8为本申请实施例提供的一种状态通知装置的结构示意图,该状态通知装置可以是本申请实施例中的第一设备(或第二设备或耳机),也可以是第一设备(或第二设备或耳机)内的芯片或芯片系统。The method provided by the embodiment of the present application is described above in conjunction with Figures 4 to 6, and the device for executing the above method provided by the embodiment of the present application is described below. As shown in Figure 8, Figure 8 is a structural schematic diagram of a status notification device provided by the embodiment of the present application, and the status notification device can be the first device (or second device or headset) in the embodiment of the present application, or it can be a chip or chip system in the first device (or second device or headset).
如图8所示,状态通知装置800可以用于通信设备、电路、硬件组件或者芯片中,该状态通知装置包括:处理单元801、以及通信单元802。其中,处理单元801用于支持状态通知装置800执行信息处理的步骤,通信单元802用于支持状态通知装置800执行信息的接收和发送的步骤。其中,该通信单元802可以是输入或者输出接口、管脚或者电路等。As shown in FIG8 , a status notification device 800 can be used in a communication device, circuit, hardware component or chip, and the status notification device includes: a processing unit 801 and a communication unit 802. The processing unit 801 is used to support the status notification device 800 to perform information processing steps, and the communication unit 802 is used to support the status notification device 800 to perform information receiving and sending steps. The communication unit 802 can be an input or output interface, a pin or a circuit, etc.
可能的实施例中,状态通知装置还可以包括:存储单元803。处理单元801、存储单元803通过线路相连。存储单元803可以包括一个或者多个存储器,存储器可以是一个或者多个设备、电路中用于存储程序或者数据的器件。存储单元803可以独立存在,通过通信线路与状态通知装置具有的处理单元801相连。存储单元803也可以和处理单元801集成在一起。In a possible embodiment, the status notification device may further include: a storage unit 803. The processing unit 801 and the storage unit 803 are connected via a line. The storage unit 803 may include one or more memories, and the memory may be a device used to store programs or data in one or more devices or circuits. The storage unit 803 may exist independently and be connected to the processing unit 801 of the status notification device via a communication line. The storage unit 803 may also be integrated with the processing unit 801.
存储单元803可以存储第一设备(或第二设备或耳机)中的方法的计算机执行指令,以使处理单元801执行上述实施例中的方法。存储单元803可以是寄存器、缓存或者RAM 等,存储单元803可以和处理单元801集成在一起。存储单元803可以是只读存储器(read-only memory,ROM)或者可存储静态信息和指令的其他类型的静态存储设备,存储单元803可以与处理单元801相独立。The storage unit 803 may store computer-executable instructions of the method in the first device (or the second device or the headset) so that the processing unit 801 executes the method in the above embodiment. The storage unit 803 may be a register, a cache or a RAM. The storage unit 803 may be integrated with the processing unit 801. The storage unit 803 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions. The storage unit 803 may be independent of the processing unit 801.
可能的实现方式中,状态通知装置800还可以包括:显示单元(图8中未示出),该显示单元用于支持状态通知装置中界面显示的步骤。In a possible implementation, the status notification device 800 may further include: a display unit (not shown in FIG. 8 ), which is used to support the step of interface display in the status notification device.
图9为本申请实施例提供的另一种终端设备的硬件结构示意图,如图9所示,该终端设备包括处理器901,通信线路904以及至少一个通信接口(图9中示例性的以通信接口903为例进行说明)。其中,该终端设备可以为本申请实施例中描述的第一设备或第二设备,且第一设备与第二设备的结构可以相同也可以不同。FIG9 is a schematic diagram of the hardware structure of another terminal device provided in an embodiment of the present application. As shown in FIG9 , the terminal device includes a processor 901, a communication line 904, and at least one communication interface (the communication interface 903 is used as an example in FIG9 ). The terminal device may be the first device or the second device described in the embodiment of the present application, and the structures of the first device and the second device may be the same or different.
处理器901可以是一个通用中央处理器(central processing unit,CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。Processor 901 can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.
通信线路904可包括在上述组件之间传送信息的电路。Communications link 904 may include circuitry to transmit information between the above-described components.
通信接口903,使用任何收发器一类的装置,用于与其他设备或通信网络通信,如以太网,无线局域网(wireless local area networks,WLAN)等。The communication interface 903 uses any transceiver-like device for communicating with other devices or communication networks, such as Ethernet, wireless local area networks (WLAN), etc.
可能的,该终端设备还可以包括存储器902。Possibly, the terminal device may further include a memory 902 .
存储器902可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过通信线路904与处理器相连接。存储器也可以和处理器集成在一起。The memory 902 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may be independent and connected to the processor via a communication line 904. The memory may also be integrated with the processor.
其中,存储器902用于存储执行本申请方案的计算机执行指令,并由处理器901来控制执行。处理器901用于执行存储器902中存储的计算机执行指令,从而实现本申请实施例所提供的方法。The memory 902 is used to store computer-executable instructions for executing the solution of the present application, and the execution is controlled by the processor 901. The processor 901 is used to execute the computer-executable instructions stored in the memory 902, thereby implementing the method provided by the embodiment of the present application.
可能的,本申请实施例中的计算机执行指令也可以称之为应用程序代码,本申请实施例对此不作具体限定。Possibly, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, and the embodiments of the present application do not specifically limit this.
在具体实现中,作为一种实施例,处理器901可以包括一个或多个CPU,例如图9中的CPU0和CPU1。In a specific implementation, as an embodiment, the processor 901 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 9 .
在具体实现中,作为一种实施例,终端设备可以包括多个处理器,例如图9中的处理器901和处理器905。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In a specific implementation, as an embodiment, the terminal device may include multiple processors, such as processor 901 and processor 905 in FIG. 9. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. The processor here may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中, 或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(digital subscriber line,DSL)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包括一个或多个可用介质集成的服务器、数据中心等数据存储设备。例如,可用介质可以包括磁性介质(例如,软盘、硬盘或磁带)、光介质(例如,数字通用光盘(digital versatile disc,DVD))、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium. Or from one computer-readable storage medium to another computer-readable storage medium, for example, a computer instruction can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be stored by a computer or a data storage device such as a server or data center that includes one or more available media integrated. For example, the available media can include magnetic media (e.g., floppy disks, hard disks or tapes), optical media (e.g., digital versatile discs (DVD)), or semiconductor media (e.g., solid state disks (SSD)), etc.
本申请实施例还提供了一种计算机可读存储介质。上述实施例中描述的方法可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。计算机可读介质可以包括计算机存储介质和通信介质,还可以包括任何可以将计算机程序从一个地方传送到另一个地方的介质。存储介质可以是可由计算机访问的任何目标介质。The present application also provides a computer-readable storage medium. The methods described in the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. Computer-readable media may include computer storage media and communication media, and may also include any medium that can transfer a computer program from one place to another. The storage medium may be any target medium that can be accessed by a computer.
作为一种可能的设计,计算机可读介质可以包括紧凑型光盘只读储存器(compact disc read-only memory,CD-ROM)、RAM、ROM、EEPROM或其它光盘存储器;计算机可读介质可以包括磁盘存储器或其它磁盘存储设备。而且,任何连接线也可以被适当地称为计算机可读介质。例如,如果使用同轴电缆,光纤电缆,双绞线,DSL或无线技术(如红外,无线电和微波)从网站,服务器或其它远程源传输软件,则同轴电缆,光纤电缆,双绞线,DSL或诸如红外,无线电和微波之类的无线技术包括在介质的定义中。如本文所使用的磁盘和光盘包括光盘(CD),激光盘,光盘,数字通用光盘(digital versatile disc,DVD),软盘和蓝光盘,其中磁盘通常以磁性方式再现数据,而光盘利用激光光学地再现数据。As a possible design, the computer-readable medium may include a compact disc read-only memory (CD-ROM), RAM, ROM, EEPROM or other optical disc storage; the computer-readable medium may include a magnetic disk storage or other magnetic disk storage device. Moreover, any connecting line may also be appropriately referred to as a computer-readable medium. For example, if the software is transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave, the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwave are included in the definition of the medium. Disks and optical discs as used herein include compact discs (CDs), laser discs, optical discs, digital versatile discs (DVDs), floppy disks and Blu-ray discs, where disks typically reproduce data magnetically, while optical discs reproduce data optically using lasers.
上述的组合也应包括在计算机可读介质的范围内。以上,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above combinations should also be included in the scope of computer-readable media. The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
需要说明的是,本申请所涉及的用户信息(包括但不限于用户设备信息、用户个人信息等)和数据(包括但不限于用于分析的数据、存储的数据、展示的数据等),均为经用户授权或者经过各方充分授权的信息和数据,并且相关数据的收集、使用和处理需要遵守相关国家和地区的相关法律法规和标准,并提供有相应的操作入口,供用户选择授权或者拒绝。 It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

Claims (11)

  1. 一种状态通知方法,其特征在于,应用于状态通知系统,所述状态通知系统中包括:第一设备、第二设备以及耳机,所述方法包括:A status notification method, characterized in that it is applied to a status notification system, the status notification system comprising: a first device, a second device and a headset, the method comprising:
    所述第一设备与所述耳机建立连接,且所述第二设备与所述耳机建立连接;The first device establishes a connection with the headset, and the second device establishes a connection with the headset;
    当所述第一设备接收到第一业务时,所述第一设备向所述耳机发送第一回声echo消息;所述第一echo消息用于指示所述第一设备使用所述耳机开始所述第一业务;When the first device receives the first service, the first device sends a first echo message to the headset; the first echo message is used to instruct the first device to start the first service using the headset;
    第一时刻,所述耳机基于所述第一echo消息,向所述第二设备发送第一蓝牙低功耗BLE广播,所述第二设备处于灭屏状态,且所述第二设备不扫描所述第一BLE广播;其中,所述第一BLE广播用于指示所述耳机在处理所述第一业务;At a first moment, the headset sends a first Bluetooth low energy BLE broadcast to the second device based on the first echo message, the second device is in a screen-off state, and the second device does not scan the first BLE broadcast; wherein the first BLE broadcast is used to indicate that the headset is processing the first service;
    第二时刻,所述第二设备由所述灭屏状态切换至亮屏状态,所述第二设备扫描第二BLE广播;所述第二BLE广播用于指示所述耳机在处理所述第一业务,所述第二时刻晚于所述第一时刻。At the second moment, the second device switches from the screen-off state to the screen-on state, and the second device scans a second BLE broadcast; the second BLE broadcast is used to indicate that the headset is processing the first service, and the second moment is later than the first moment.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, characterized in that the method further comprises:
    当所述第二设备接收到第二业务时,所述第二设备向耳机发送第二echo消息;所述第二echo消息用于指示所述第二设备使用所述耳机开始所述第二业务;When the second device receives the second service, the second device sends a second echo message to the headset; the second echo message is used to instruct the second device to start the second service using the headset;
    在所述耳机基于所述第一echo消息以及所述第二echo消息,确定所述第一业务的类型与所述第二业务的类型相同时,所述耳机向所述第二设备发送第三echo消息;其中,所述第三echo消息用于指示所述耳机拒绝为所述第二业务提供服务。When the headset determines, based on the first echo message and the second echo message, that the type of the first service is the same as the type of the second service, the headset sends a third echo message to the second device; wherein the third echo message is used to instruct the headset to refuse to provide service for the second service.
  3. 根据权利要求2所述的方法,其特征在于,所述方法还包括:The method according to claim 2, characterized in that the method further comprises:
    在所述耳机基于所述第一echo消息以及所述第二echo消息,确定所述第二业务的优先级高于所述第一业务的优先级时,所述耳机向所述第一设备发送所述第二echo消息;When the headset determines, based on the first echo message and the second echo message, that the priority of the second service is higher than the priority of the first service, the headset sends the second echo message to the first device;
    所述第一设备基于所述第二echo消息暂停所述第一业务。The first device suspends the first service based on the second echo message.
  4. 根据权利要求3所述的方法,其特征在于,第一业务为媒体音频业务,所述第二业务为通话音频业务。The method according to claim 3 is characterized in that the first service is a media audio service and the second service is a call audio service.
  5. 根据权利要求1-4任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1 to 4, characterized in that the method further comprises:
    所述第一设备向所述耳机发送第四echo消息;所述第四echo消息用于指示所述第一设备暂停使用所述耳机处理所述第一业务;The first device sends a fourth echo message to the headset; the fourth echo message is used to instruct the first device to suspend using the headset to process the first service;
    所述耳机基于所述第四echo消息,向所述第二设备发送第三BLE广播;所述第三BLE广播用于指示所述耳机处于空闲,所述第二设备处于所述灭屏状态,且所述第二设备不扫描所述第三BLE广播;The headset sends a third BLE broadcast to the second device based on the fourth echo message; the third BLE broadcast is used to indicate that the headset is idle, the second device is in the screen-off state, and the second device does not scan the third BLE broadcast;
    当所述第二设备由所述灭屏状态切换至亮屏状态时,所述第二设备扫描第四BLE广播,所述第四BLE广播用于指示所述耳机处于空闲。When the second device switches from the screen-off state to the screen-on state, the second device scans a fourth BLE broadcast, and the fourth BLE broadcast is used to indicate that the headset is idle.
  6. 一种状态通知系统,其特征在于,所述状态通知系统中包括:第一设备、第二设备以及耳机,A status notification system, characterized in that the status notification system comprises: a first device, a second device and a headset,
    所述第一设备,用于与所述耳机建立连接,且所述第二设备,用于与所述耳机建立连接;The first device is used to establish a connection with the headset, and the second device is used to establish a connection with the headset;
    所述第一设备,还用于当接收到第一业务时,向所述耳机发送第一echo消息;所述第一echo消息用于指示所述第一设备使用所述耳机开始所述第一业务; The first device is further configured to send a first echo message to the headset when receiving the first service; the first echo message is used to instruct the first device to start the first service using the headset;
    第一时刻,所述耳机,用于:基于所述第一echo消息,向所述第二设备发送第一BLE广播,所述第二设备处于灭屏状态,且所述第二设备不扫描所述第一BLE广播;其中,所述第一BLE广播用于指示所述耳机在处理所述第一业务;At a first moment, the headset is used to: send a first BLE broadcast to the second device based on the first echo message, the second device is in a screen-off state, and the second device does not scan the first BLE broadcast; wherein the first BLE broadcast is used to indicate that the headset is processing the first service;
    第二时刻,所述第二设备用于:由所述灭屏状态切换至亮屏状态,扫描第二BLE广播;所述第二BLE广播用于指示所述耳机在处理所述第一业务,所述第二时刻晚于所述第一时刻。At the second moment, the second device is used to: switch from the screen-off state to the screen-on state, and scan the second BLE broadcast; the second BLE broadcast is used to indicate that the headset is processing the first service, and the second moment is later than the first moment.
  7. 一种状态通知方法,其特征在于,应用于耳机,所述方法包括:A status notification method, characterized in that it is applied to a headset, the method comprising:
    所述耳机与第一设备建立连接,且所述耳机与第二设备建立连接;The headset is connected to the first device, and the headset is connected to the second device;
    所述耳机接收到来自所述第一设备的第一echo消息;所述第一echo消息用于指示所述第一设备使用所述耳机开始第一业务;The headset receives a first echo message from the first device; the first echo message is used to instruct the first device to start a first service using the headset;
    第一时刻,所述耳机基于所述第一echo消息,向所述第二设备发送第一BLE广播,所述第二设备处于灭屏状态,且所述第二设备不扫描所述第一BLE广播;其中,所述第一BLE广播用于指示所述耳机在处理所述第一业务。At the first moment, the headset sends a first BLE broadcast to the second device based on the first echo message, the second device is in a screen-off state, and the second device does not scan the first BLE broadcast; wherein, the first BLE broadcast is used to indicate that the headset is processing the first service.
  8. 一种状态通知方法,其特征在于,应用于第二设备,所述方法包括:A status notification method, characterized in that it is applied to a second device, and the method comprises:
    第一时刻,所述第二设备接收来自耳机的第一蓝牙低功耗BLE广播,所述第二设备处于灭屏状态,且所述第二设备不扫描第一BLE广播;其中,所述第一BLE广播用于指示所述耳机在处理第一业务;所述第一BLE广播为所述耳机基于第一echo消息生成的,所述第一echo消息用于指示第一设备使用所述耳机开始所述第一业务;所述耳机与所述第一设备处于连接状态且所述耳机与所述第二设备处于连接状态;At a first moment, the second device receives a first Bluetooth Low Energy (BLE) broadcast from the headset, the second device is in a screen-off state, and the second device does not scan the first BLE broadcast; wherein the first BLE broadcast is used to indicate that the headset is processing a first service; the first BLE broadcast is generated by the headset based on a first echo message, and the first echo message is used to indicate that the first device uses the headset to start the first service; the headset is in a connected state with the first device and the headset is in a connected state with the second device;
    第二时刻,所述第二设备由所述灭屏状态切换至亮屏状态,所述第二设备扫描第二BLE广播;所述第二BLE广播用于指示所述耳机在处理所述第一业务,所述第二时刻晚于所述第一时刻。At the second moment, the second device switches from the screen-off state to the screen-on state, and the second device scans a second BLE broadcast; the second BLE broadcast is used to indicate that the headset is processing the first service, and the second moment is later than the first moment.
  9. 一种耳机,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时,使得所述耳机执行如权利要求7所述的方法。A headset comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the headset executes the method as claimed in claim 7.
  10. 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时,使得所述终端设备执行如权利要求8所述的方法。A terminal device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the terminal device executes the method as claimed in claim 8.
  11. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时,使得计算机执行如权利要求7或8所述的方法。 A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the computer executes the method according to claim 7 or 8.
PCT/CN2023/125061 2022-11-22 2023-10-17 State notification method and apparatus WO2024109399A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211467953.XA CN118075719A (en) 2022-11-22 2022-11-22 State notification method and device
CN202211467953.X 2022-11-22

Publications (1)

Publication Number Publication Date
WO2024109399A1 true WO2024109399A1 (en) 2024-05-30

Family

ID=91102745

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/125061 WO2024109399A1 (en) 2022-11-22 2023-10-17 State notification method and apparatus

Country Status (2)

Country Link
CN (1) CN118075719A (en)
WO (1) WO2024109399A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109890021A (en) * 2019-03-06 2019-06-14 西安易朴通讯技术有限公司 Bluetooth headset switching method, bluetooth headset and terminal
CN112469014A (en) * 2019-09-06 2021-03-09 华为技术有限公司 Method and electronic equipment for configuring Bluetooth connection parameters
CN114040373A (en) * 2021-11-19 2022-02-11 Oppo广东移动通信有限公司 Audio service processing method and device, electronic equipment and storage medium
US20220201113A1 (en) * 2019-04-18 2022-06-23 Huawei Technologies Co., Ltd. Bluetooth Connection Method, Device, and System
CN114866998A (en) * 2022-07-06 2022-08-05 荣耀终端有限公司 Bluetooth connection method and Bluetooth device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109890021A (en) * 2019-03-06 2019-06-14 西安易朴通讯技术有限公司 Bluetooth headset switching method, bluetooth headset and terminal
US20220201113A1 (en) * 2019-04-18 2022-06-23 Huawei Technologies Co., Ltd. Bluetooth Connection Method, Device, and System
CN112469014A (en) * 2019-09-06 2021-03-09 华为技术有限公司 Method and electronic equipment for configuring Bluetooth connection parameters
CN114040373A (en) * 2021-11-19 2022-02-11 Oppo广东移动通信有限公司 Audio service processing method and device, electronic equipment and storage medium
CN114866998A (en) * 2022-07-06 2022-08-05 荣耀终端有限公司 Bluetooth connection method and Bluetooth device

Also Published As

Publication number Publication date
CN118075719A (en) 2024-05-24

Similar Documents

Publication Publication Date Title
US11240874B2 (en) Data transmission method and device
US11924869B2 (en) Method and device for configuration and adjusting search space parameter
US11778363B2 (en) Audio data transmission method applied to switching between single-earbud mode and double-earbud mode of TWS headset and device
EP3975171A1 (en) Voice wakeup method and electronic device
CN104756095B (en) Method and system for dynamic adjustment of an interrupt latency threshold and a resource supporting a processor in a portable computing device
US11212854B2 (en) Method and device for indicating radio bearer
WO2021082829A1 (en) Bluetooth connection method and related apparatus
US20220346010A1 (en) Data Sending/Receiving Method, Electronic Device, and Computer-Readable Storage Medium
CN115002934B (en) Audio service processing system, electronic equipment and Bluetooth headset
CN103414982A (en) Method and device for offering voice
WO2024021736A1 (en) Transmission method, apparatus, and system for bluetooth multimedia packet, and device
CN112771828A (en) Audio data communication method and electronic equipment
WO2019242567A1 (en) Bandwidth adjustment method, mobile terminal, network side device and medium
CN112469012A (en) Bluetooth communication method and related device
CN116074986A (en) Bluetooth connection method, device and system
WO2022213689A1 (en) Method and device for voice communicaiton between audio devices
WO2024109399A1 (en) State notification method and apparatus
WO2024021735A1 (en) Bluetooth multimedia packet transmission method and apparatus, device, system, and storage medium
WO2023185589A1 (en) Volume control method and electronic device
CN115022766B (en) Audio data playing method and equipment
CN115426341B (en) Wireless audio/video device and wireless communication method
US11477591B2 (en) Audio data processing method, terminal device, and storage medium
WO2023284403A1 (en) Audio processing method and device
CN113950037B (en) Audio playing method and terminal equipment
WO2024198414A1 (en) Call processing method and apparatus

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

Country of ref document: EP

Kind code of ref document: A1