CN115277921B - Audio control method, electronic equipment, bluetooth headset and storage medium - Google Patents

Audio control method, electronic equipment, bluetooth headset and storage medium Download PDF

Info

Publication number
CN115277921B
CN115277921B CN202210700226.7A CN202210700226A CN115277921B CN 115277921 B CN115277921 B CN 115277921B CN 202210700226 A CN202210700226 A CN 202210700226A CN 115277921 B CN115277921 B CN 115277921B
Authority
CN
China
Prior art keywords
audio
bluetooth headset
instruction
playing
new
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210700226.7A
Other languages
Chinese (zh)
Other versions
CN115277921A (en
Inventor
牛永民
栗银伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210700226.7A priority Critical patent/CN115277921B/en
Publication of CN115277921A publication Critical patent/CN115277921A/en
Application granted granted Critical
Publication of CN115277921B publication Critical patent/CN115277921B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/724092Interfacing with an external cover providing additional functionalities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/72412User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories using two-way short-range wireless interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72442User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality for playing music files
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Human Computer Interaction (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Multimedia (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the application provides an audio control method, electronic equipment, a Bluetooth headset and a storage medium, relates to the technical field of signal processing, and can avoid audio playing triggered by misoperation of a user and improve the use experience of the user. The specific scheme can be applied to the electronic equipment and can comprise the following steps: after the electronic equipment and the Bluetooth headset are connected, the electronic equipment receives a first instruction sent by the Bluetooth headset under the condition that audio is not played; the electronic equipment does not respond to the first instruction within a first preset time period from the receipt of the first instruction; if the electronic equipment does not detect the preset event within the first preset time period, starting to play the audio in response to a first instruction when the first preset time period is over; if the electronic equipment detects a preset event within a first preset time period, discarding the first instruction when the first preset time period is over; the preset event is that the Bluetooth headset stops working.

Description

Audio control method, electronic equipment, bluetooth headset and storage medium
Technical Field
The present disclosure relates to the field of signal processing technologies, and in particular, to an audio control method, an electronic device, a bluetooth headset, and a storage medium.
Background
After the electronic device establishes a bluetooth connection with a Bluetooth (BT) headset, in addition to playing audio through the bluetooth headset, an audio control instruction (e.g., an instruction to trigger the electronic device to start playing audio, an instruction to trigger the electronic device to pause playing audio, etc.) from the bluetooth headset may also be received, and playing of audio in the electronic device is controlled in response to the audio control instruction.
In the process of using the bluetooth headset, a user may bump a play/pause button (may be referred to as an misoperation) of the bluetooth headset by mistake, and the bluetooth headset may generate an audio control instruction corresponding to the misoperation and send the audio control instruction to the electronic device. Then, the electronic device controls the audio in response to the audio control instruction corresponding to the erroneous operation. If the electronic device does not play the audio and the user does not want to play the audio, the Bluetooth headset receives an misoperation input by the user, and the misoperation is used for triggering the electronic device to start playing the audio; then, the Bluetooth headset sends an instruction to the electronic device, wherein the instruction triggers the electronic device to start playing the audio. The electronic device starts playing the audio in response to the instruction.
By adopting the scheme, when the user does not want to play the audio, the electronic equipment can be triggered to play the audio by one misoperation of the user to the Bluetooth headset, so that inconvenience is brought to the user, and the use experience of the user is reduced.
Disclosure of Invention
The embodiment of the application provides an audio control method, electronic equipment, a Bluetooth headset and a storage medium, which are used for avoiding audio playing triggered by misoperation of a user and improving the use experience of the user.
In order to achieve the above purpose, the embodiments of the present application adopt the following technical solutions:
in a first aspect, an audio control method is provided, applied to an electronic device, and the method includes: after the electronic equipment and the Bluetooth headset are connected, the electronic equipment can receive a first instruction sent by the Bluetooth headset under the condition that audio is not played. The electronic device may not respond to the first instruction for a first preset duration from receipt of the first instruction. Then, if the electronic device does not detect the preset event within the first preset time period, starting to play the audio in response to the first instruction when the first preset time period is over. If the electronic equipment detects a preset event in the first preset time period, discarding the first instruction when the first preset time period is over.
The first instruction is used for triggering the electronic equipment to pause playing the audio under the condition of playing the audio, and starting playing the audio under the condition of not playing the audio. The preset event is that the Bluetooth headset stops working.
It can be understood that the electronic device receives the first instruction sent by the bluetooth headset under the condition that the audio is not played. Since it is not determined whether the first instruction is triggered by a malfunction, the electronic device may not respond to the first instruction, i.e. not play audio. Then, if the bluetooth headset is not detected to stop working within a first preset time period from the start of receiving the first instruction (for example, the TWS bluetooth headset is in an unworn state, the bluetooth headset is turned off, etc.), which indicates that the first instruction is not triggered by misoperation of a user in a process of triggering the bluetooth headset to stop working (for example, the bluetooth headset is taken off from an ear, the bluetooth headset is turned off, etc.), the electronic device starts playing the audio in response to the first instruction when the first preset time period is ended. And if the Bluetooth headset is detected to stop working within the first preset time length, the first instruction is discarded, wherein the first instruction is possibly triggered by misoperation of a user in the process of triggering the Bluetooth headset to stop working. Therefore, when the user does not need to play the audio, the electronic equipment is prevented from being triggered to start playing the audio by misoperation. Therefore, the use experience of the user can be improved.
In one possible implementation, the first instruction is sent when the bluetooth headset is in a worn state. The above-mentioned electronic equipment detects bluetooth headset and stops working, includes: the electronic equipment receives a second instruction sent by the Bluetooth headset; or the electronic device detects that the electronic device is disconnected with the Bluetooth headset.
Wherein the bluetooth headset comprises a wireless stereo (true wireless stereo, TWS) bluetooth headset, and the second instructions are for indicating that the TWS bluetooth headset is in an unworn state.
In this design, several cases were described in which the bluetooth headset was out of operation.
In another possible implementation manner, if the electronic device does not detect the preset event within the first preset duration, when the first preset duration is over, starting to play the audio in response to the first instruction, including: if the electronic equipment does not detect the preset event within the first preset time period and the electronic equipment does not receive the new first instruction within the first preset time period, starting to play the audio in response to the first instruction when the first preset time period is over.
It will be appreciated that, in addition to the user inputting a malfunction during triggering the bluetooth headset to stop working, a plurality of identical operations may be continuously input during the working state of the bluetooth headset for other purposes than controlling the audio playing, for example, the child may continuously operate the same key of the bluetooth headset in order to play. Then, the Bluetooth headset sequentially responds to the same operations and sends the same instructions to the mobile phone. If the mobile phone responds to a plurality of identical instructions from the bluetooth headset in a short time (for example, the first preset time length or the second preset time length), the audio playing start and the audio playing pause are repeatedly executed, which may cause poor playing effects. In addition, it is not concerned by the user whether to start playing audio or pause playing audio, and repeatedly executing the start playing audio and pause playing audio only causes useless power consumption of the mobile phone. Therefore, the mobile phone can judge whether a new first instruction is received within a first preset time period after the first instruction. If a new first instruction is not received, the electronic device may begin playing audio in response to the first instruction. The electronic equipment responds to an instruction, so that poor playing effect is not caused, and excessive power consumption of the mobile phone is not increased.
In addition, if the new first instruction is continuously received, the first instruction and the new first instruction can be selectively responded, but not both the first instruction and the new first instruction are responded, so that a poor playing effect and useless power consumption of the mobile phone are avoided.
In another possible implementation manner, the method further includes: if the electronic equipment does not detect the preset event within the first preset time period, and the electronic equipment receives N new first instructions within the first preset time period, judging whether the last new first instruction in the N new first instructions triggers the electronic equipment to start playing the audio or not when the first preset time period is over; if the last new first instruction triggers the electronic equipment to start playing the audio, responding to the last new first instruction in the N new first instructions; if the last new first instruction triggers the electronic device to pause playing audio, the first instruction and N new first instructions are discarded. Wherein N is a positive integer.
It can be understood that the first instruction received by the mobile phone triggers the mobile phone to play audio or pause playing audio, which is related to the current playing state of the mobile phone. Similarly, each new first instruction received by the mobile phone triggers the mobile phone to play audio or pause playing audio, and the new first instruction is also related to the current playing state of the mobile phone. For example, if the handset is currently playing audio, the handset pauses playing audio in response to a new first instruction. If the mobile phone does not play the audio currently, the mobile phone responds to a new first instruction to play the audio. Therefore, the mobile phone can firstly judge whether the last new first instruction in the N new first instructions triggers the mobile phone to start playing the audio or pause playing the audio under the condition of responding to the first instruction and the N new first instructions in sequence. For example, the mobile phone sequentially receives the first instruction and N new first instructions under the condition that the audio is not played, and then it can be determined that the first instruction triggers the mobile phone that the audio is not played to play the audio, the first new first instruction in the N new first instructions triggers the mobile phone to pause playing the audio, the second new first instruction triggers the mobile phone to play the audio, the third new first instruction triggers the mobile phone to pause playing the audio, the fourth new first instruction triggers the mobile phone to play the audio, and so on.
Then, the mobile phone triggers the mobile phone to start playing the audio or pause playing the audio according to the current playing state and the last new first instruction, and determines whether to respond to the last new first instruction. If the current playing state of the mobile phone is inconsistent with the playing state of the mobile phone triggered by the last new first instruction, the mobile phone can respond to the last new first instruction. If the current playing state of the mobile phone is consistent with the playing state of the mobile phone triggered by the last new first instruction, the mobile phone can keep the current playing state without responding to the last new first instruction. For example, if the current playing state is that audio is not played, and the last new first instruction triggers the mobile phone to start playing audio, the mobile phone may respond to the last new first instruction. For another example, if the current playing state is that audio is not played, and the last new first instruction triggers the mobile phone to pause playing audio, the mobile phone may not respond to the last new first instruction and continue to pause playing audio. Therefore, the mobile phone can achieve a final playing effect and avoid useless power consumption caused by responding to the first instruction and the new first instruction.
In another possible implementation manner, the method further includes: the electronic equipment receives a third instruction sent by the Bluetooth headset under the condition of playing the audio; and the electronic equipment does not respond to the third instruction within a second preset time period from the receipt of the third instruction. Then, if the electronic device receives M new third instructions within the second preset duration, judging whether the last new third instruction in the M new third instructions triggers the electronic device to start playing the audio or not when the second preset duration is over. Further, if the last new third instruction triggers the electronic device to begin playing audio, the last new third instruction of the M new third instructions is responded. If the last new third instruction triggers the electronic device to pause playing audio, the third instruction and M new third instructions are discarded.
The third instruction is used for triggering the electronic equipment to pause playing the audio under the condition of playing the audio, and starting playing the audio under the condition of not playing the audio. M is a positive integer.
In this design, a process flow of the electronic device to the third instruction (which may be equivalent to the first instruction described above) in the case where the audio is not played is described. The processing flow of the third instruction by the electronic device under the condition of playing the audio is different from the processing flow of the first instruction by the electronic device under the condition of not playing the audio, in that the electronic device does not judge whether a preset event is detected within a first preset time length, and only judges whether a new third instruction is received within the first preset time length.
In another possible implementation manner, the method further includes: if the electronic equipment does not receive the new third instruction within the second preset time period, the electronic equipment responds to the third instruction to pause playing the audio when the second preset time period is over.
In a second aspect, an audio control method is provided, applied to a bluetooth headset, and the method includes: after the Bluetooth headset and the electronic equipment are connected, the Bluetooth headset receives a first operation input by a user under the condition that audio is not played. The Bluetooth headset does not respond to the first operation within a first preset time period from the time of receiving the first operation. Then, if the Bluetooth headset does not detect a preset event within a first preset time period, responding to a first operation and sending a first instruction to the electronic equipment when the first preset time period is over; if the Bluetooth headset detects a preset event within a first preset time period, discarding the first operation when the first preset time period is over.
The first operation is used for triggering the electronic equipment to pause playing the audio under the condition of playing the audio, and starting playing the audio under the condition of not playing the audio. The preset event is that the Bluetooth headset stops working. The first instruction is used for triggering the electronic equipment to pause playing the audio under the condition of playing the audio, and starting playing the audio under the condition of not playing the audio.
In one possible implementation, the bluetooth headset comprises a TWS bluetooth headset; the first operation is received while the bluetooth headset is in a worn state. Above-mentioned bluetooth headset detects bluetooth headset stop work, includes: the TWS Bluetooth headset detects that the TWS Bluetooth headset is in an unworn state; or the Bluetooth headset detects that the Bluetooth headset is disconnected from the electronic device.
In another possible implementation manner, if the bluetooth headset does not detect the preset event within the first preset duration, when the first preset duration is over, responding to the first operation, and sending a first instruction to the electronic device, where the first instruction includes: if the Bluetooth headset does not detect the preset event within the first preset time period and the Bluetooth headset does not receive the new first operation within the first preset time period, responding to the first operation and sending a first instruction to the electronic equipment when the first preset time period is over.
In another possible implementation manner, the method further includes: if the Bluetooth headset does not detect the preset event within the first preset time period, and the Bluetooth headset receives N new first operations within the first preset time period, judging whether the last new first operation in the N new first operations triggers the electronic equipment to start playing the audio or not when the first preset time period is over; if the last new first operation triggers the electronic equipment to start playing the audio, responding to the last new first operation in the N new first operations, and sending a first instruction to the electronic equipment; if the last new first operation triggers the electronic device to pause playing audio, the first operation and N new first operations are discarded. Wherein N is a positive integer.
In another possible implementation manner, the method further includes: receiving a second operation input by a user under the condition that the Bluetooth headset plays the audio; the Bluetooth headset does not respond to the second operation within a second preset time period from the start of receiving the second operation; then, if the Bluetooth headset receives M new second operations within the second preset time period, judging whether the last new second operation in the M new second operations triggers the electronic equipment to start playing the audio or not when the second preset time period is over; if the last new second operation triggers the electronic equipment to start playing the audio, responding to the last new second operation in the M new second operations, and sending a first instruction to the electronic equipment; if the last new second operation triggers the electronic device to pause playing audio, the second operation and M new second operations are discarded.
The second operation is used for triggering the electronic equipment to pause playing the audio under the condition of playing the audio, and starting playing the audio under the condition of not playing the audio. M is a positive integer.
In this design, a process flow of the bluetooth headset for the second operation (which may be equivalent to the first operation described above) in the case where audio is not played is described. The processing flow of the Bluetooth headset to the second operation under the condition of playing the audio is different from the processing flow of the Bluetooth headset to the first operation under the condition of not playing the audio in that the Bluetooth headset does not judge whether a preset event is detected in a first preset time length or not and only judges whether a new second operation is received in the first preset time length or not.
In another possible implementation manner, the method further includes: if the Bluetooth headset does not receive a new second operation within a second preset time period, responding to the second operation and sending a first instruction to the electronic equipment when the second preset time period is over.
In a third aspect, an electronic device is provided, the electronic device comprising: a processor, a memory, and a communication interface. The memory and the communication interface are coupled to the processor. The memory is used to store computer program code, which includes computer instructions. Wherein the computer instructions, when executed by the processor, cause the electronic device to perform the audio control method according to any one of the first aspects above.
In a fourth aspect, there is provided a bluetooth headset comprising: a processor, a memory, and a communication interface. The memory and the communication interface are coupled to the processor. The memory is used to store computer program code, which includes computer instructions. Wherein the processor, when executing the computer instructions, causes the bluetooth headset to perform the audio control method according to any one of the second aspects described above.
In a fifth aspect, a computer-readable storage medium having computer instructions stored therein is provided. When executed on an electronic device, the computer instructions cause the electronic device to perform the audio control method according to any one of the first aspects described above. Alternatively, when the computer instructions are run on a bluetooth headset, the bluetooth headset is caused to perform the audio control method as described in any of the second aspects above.
In a sixth aspect, there is provided a computer program product comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the audio control method according to any one of the first aspects above. Alternatively, when the computer instructions are run on a bluetooth headset, the bluetooth headset is caused to perform the audio control method as described in any of the second aspects above.
The technical effects of any one of the design manners of the second aspect to the sixth aspect may be referred to the technical effects of the different design manners of the first aspect, and will not be repeated here.
Drawings
Fig. 1A is a schematic diagram of a scenario in which a mobile phone and a TWS bluetooth headset are connected in bluetooth according to an embodiment of the present application;
fig. 1B is a schematic diagram of a scenario in which a mobile phone and a necklace type bluetooth headset are connected in bluetooth according to an embodiment of the present application;
fig. 2 is a software structure block diagram of a mobile phone according to an embodiment of the present application;
fig. 3 is a flowchart of a method for performing audio control by using a mobile phone and a TWS bluetooth headset provided in the related scheme;
fig. 4 is a schematic diagram of an operation setting interface of a bluetooth headset according to an embodiment of the present application;
fig. 5 is a flowchart of a method for performing audio control by using a mobile phone and a necklace type bluetooth headset according to the related aspects;
Fig. 6 is a schematic structural diagram of a mobile phone according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a TWS bluetooth headset according to an embodiment of the present application;
fig. 8 is a flowchart of a method for audio control according to an embodiment of the present application;
fig. 9 is a second flowchart of an audio control method according to an embodiment of the present application;
fig. 10 is a flowchart III of an audio control method according to an embodiment of the present application;
fig. 11 is a flowchart of a method for audio control according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present application, unless otherwise indicated, the meaning of "a plurality" is two or more.
At present, after the electronic device establishes bluetooth connection with the bluetooth headset, besides playing audio through the bluetooth headset, an audio control instruction (for example, an instruction for triggering the electronic device to play audio, an instruction for triggering the electronic device to pause playing audio, etc.) from the bluetooth headset can also be received, and the playing of audio in the electronic device is controlled in response to the audio control instruction.
As an example, the electronic device may be the cell phone 100 shown in fig. 1A, and the bluetooth headset may be the real TWS headset 110 shown in fig. 1A. As shown in fig. 1A, the TWS headset 110 may include: left earplug 110-1, right earplug 110-2, and earplug case 110-3. Wherein no wire connection is required between left earplug 110-1 and right earplug 110-2. Left earpiece 110-1 includes touch area 111 and right earpiece 110-2 includes touch area 112. Both touch area 111 and touch area 112 may receive touch operations. The earplug case 110-3 may be used to house left and right earplugs of the TWS headset 110. At least one earplug in the TWS headset 110 is removed from the headset case 110-3 by the user before a Bluetooth connection is established with the handset 100.
As another example, the electronic device may be the mobile phone 100 shown in fig. 1B, and the bluetooth headset may be the necklace type bluetooth headset 120 (may be simply referred to as the bluetooth headset 120) shown in fig. 1B. As shown in fig. 1B, the bluetooth headset 120 may include keys 121 and keys 122. The key 121 may be used to trigger the mobile phone 100 to pause playing audio when playing audio, and start playing audio when not playing audio. The key 122 may be used to trigger the bluetooth headset 120 to be powered on in a powered off state and powered off in a powered on state.
Referring to fig. 2, a software architecture block diagram of a mobile phone 100 according to an embodiment of the present application is provided. The software system of the mobile phone shown in fig. 2 may be Android with a layered architecture TM The system. The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, android will be TM The system is divided into four layers, namely an application program layer, a framework layer and a An Zhuoyun line (Android from top to bottom TM runtime) and system libraries, kernel layer, hardware hard.
1. Application layer
The application layer may include a series of applications. For example, as shown in fig. 2, the series of applications may be camera, map, bluetooth, contact, short message, music, video, etc. Applications (APP).
2. Application framework layer
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application program layer. The application framework layer includes some predefined functions.
By way of example, as shown in FIG. 2, the application framework layer may include a view system (view system), an activity manager (package manager), a content provider (content provider), a resource manager (resource manager), an input system (input system), and the like.
The view system is used for constructing a display interface of the application program. The activity manager may be used to manage the lifecycle of each application. Applications typically run in an operating system in the form of activity. The activity manager may schedule the activity processes of the applications to manage the lifecycle of each application. The content provider is used to store and retrieve data and make such data accessible to applications. Such data may include video, images, audio, browsing history and bookmarks, phone books, etc. The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like. The input system is used for monitoring an input module (such as a touch screen drive) of the mobile phone, converting parameters input by the input module into usable events and transmitting the usable events to an upper related module. For example, the input system is used for driving a touch screen of a monitoring mobile phone through the touch screen, converting touch parameters generated by touch operation input by the touch screen into usable events and transmitting the usable events to the APP at the upper layer.
In the embodiment of the present application, the application framework layer may further include: a bluetooth host (BT host), a supervision module, an audio module, a data storage module, and the like. The Bluetooth host can be used for establishing Bluetooth connection for the mobile phone and the Bluetooth headset. The supervision module can be used for monitoring abnormal behaviors of application programs in the mobile phone system, monitoring connection states of the mobile phone and the Bluetooth headset and the like. The audio module may be used to pull up an APP that plays audio (e.g., the application that plays audio by default for the handset, or the APP that plays audio last run by the handset) or to freeze the APP that plays audio. The data storage module can be used for storing the default application of playing audio of the mobile phone, the APP of playing audio operated by the mobile phone last time and the like.
3. Android run time (android run time) and system library
The android runtime includes a core library and virtual machines. And the android running time is responsible for scheduling and managing an android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android. The application layer and the application framework layer run in virtual machines. The virtual machine executes java files of the application program layer and the application framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media library (Media Libraries), etc. The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications. Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like.
4. Kernel layer
The kernel layer is a layer between hardware and software. The kernel layer at least includes a touch screen driver, a display driver, a graphics processor (graphics processing unit, GPU) driver, a sensor driver, etc., which is not limited in any way by the embodiments of the present application.
5. Hardware
The hardware comprises at least a speaker, a display screen and a bluetooth controller (BT controller).
Referring to fig. 3, in conjunction with fig. 2, a software process flow of interaction between a mobile phone and a bluetooth headset is described by taking the example that the bluetooth headset is the TWS headset 110 shown in fig. 1A.
S301, when the Bluetooth function is started, the Bluetooth host of the mobile phone 100 drives the Bluetooth controller to perform periodic signal scanning.
S302, when the TWS headset 110 is taken out from the headset box by a user, the Bluetooth module of the TWS headset 110 sends a broadcast message.
When the TWS headset 110 is removed from the headset case by the user, the TWS headset 110 activates the bluetooth function of the TWS headset 110, i.e. a broadcast message is sent through the bluetooth module of the TWS headset 110. At the same time, the TWS headset 110 may also activate wear detection functions and the like.
S303, after the Bluetooth controller of the mobile phone 100 scans the broadcast message, the Bluetooth controller sends scanning information to the Bluetooth host of the mobile phone 100.
Wherein, the scan information may include: as a result of the scan of the bluetooth controller of the mobile phone 100, the broadcast information scanned by the bluetooth controller of the mobile phone 100.
S304, the Bluetooth host of the mobile phone 100 responds to the scanning information and establishes Bluetooth connection with the Bluetooth module of the TWS headset 110 through the Bluetooth controller.
In response to the scan information, the bluetooth host of the mobile phone 100 may transmit a bluetooth connection request to the bluetooth module of the TWS headset 110 through the bluetooth controller. The bluetooth module of the TWS headset 110 may establish a bluetooth connection with the bluetooth controller of the mobile phone 100 in response to the bluetooth connection request, i.e. it is realized that the mobile phone 100 may establish a bluetooth connection with the TWS headset 110. After the bluetooth connection is successfully established, the bluetooth host of the mobile phone 100 may also send a bluetooth connection success message to the supervision module.
S305, when the TWS earphone 110 detects that the TWS earphone 110 is changed from the unworn state to the wearing state, the first wearing instruction is sent to the bluetooth host of the mobile phone 100.
The user wears the TWS earphone 110, and when the TWS earphone 110 detects that the TWS earphone 110 is in the worn state, a first wearing instruction is transmitted to the mobile phone 100, and a function of detecting a user operation (e.g., a touch operation input by the user in the touch area 111 or the touch area 112) of the TWS earphone 110 or the like may be started. Wherein the first wearing instruction is used to characterize that the TWS earphone 110 is in a wearing state.
S306, the TWS earphone 110 receives a touch operation for triggering play/pause, which is input by the user.
Wherein, the touch operation for triggering play/pause may be used to trigger the mobile phone 100 to pause playing audio in case of playing audio, and start playing audio in case of not playing audio. The touch operation for triggering play/pause may be a click operation, a double click operation, a long press operation, or the like on any one of the earplugs in the TWS headset 110. For example, the TWS headset 110 receives a double click operation of the touch area 112 by the user.
It should be noted that, the specific form of the touch operation for triggering the play/pause may be set through a setting interface of the bluetooth headset provided by the electronic device. For example, as shown in fig. 4, after the mobile phone 100 establishes a bluetooth connection with the TWS headset 110, the setting interface 400 of the bluetooth headset is displayed in response to an operation of opening the setting interface of the bluetooth headset by the user. The setup interface 400 may include options 401. The option 401 is used to set a specific form of the touch operation, such as the user setting the touch operation to a double click operation through the option 401.
S307, the TWS earphone 110 sends a first instruction to the bluetooth host of the mobile phone 100 in response to the touch operation for triggering play/pause.
The TWS headset 110 may send the first instruction to the Bluetooth host of the handset 100 over the Bluetooth connection. The first instruction is used for triggering the mobile phone 100 to pause playing audio under the condition of playing audio, and start playing audio under the condition of not playing audio.
S308, the Bluetooth host of the mobile phone 100 receives and responds to the first instruction, and the first instruction is sent to the audio module under the condition that the mobile phone 100 does not play audio currently.
S309, the audio module in the mobile phone 100 responds to the first instruction to start an application for playing audio.
The application for playing audio may be an application for playing audio (such as music APP) that is executed last time by the mobile phone 100, or an application for playing audio by default by the mobile phone 100.
The application in the mobile phone 100 that plays audio sends audio data to the TWS headset 110 through the bluetooth host S310.
In the case where the mobile phone 100 establishes a bluetooth connection with the TWS headset 110, when the application for playing audio is started, audio data may be sent to the TWS headset 110 through the bluetooth host in the mobile phone 100.
S311, the TWS earphone 110 receives the audio data from the mobile phone 100, and plays the audio according to the audio data.
Further, the TWS headset 110 may also receive a new touch operation for triggering play/pause, and send a new first instruction to the mobile phone 100. The handset 100 receives the new first instruction. In the case of playing audio through the TWS headset 110, the mobile phone 100 pauses playing audio and stops transmitting audio data to the TWS headset 110 in response to the new first instruction.
In one case, one of the TWS headphones 110 is a primary earplug and the other headphone is a secondary earplug. The master earplug may establish a wireless connection (e.g., a bluetooth connection) with the handset 100. When the mobile phone 100 sends audio data to the main earplug through the wireless connection, the auxiliary earplug can acquire the audio data sent by the mobile phone 100 according to the connection parameters of the wireless connection. In this way, both the left and right earplugs of the TWS headset 110 may obtain audio data from the cell phone 100.
In another case, both earplugs in the TWS headset 110 may be primary earplugs, i.e. both earplugs may establish a wireless connection (e.g. Bluetooth connection) with the handset. The handset 100 may send audio data to both earpieces over a wireless connection.
It should be noted that, in addition to the two earplugs of the TWS headset 110 being taken out from the headset case by the user shown in fig. 1A, the two earplugs perform the method flow performed by the TWS headset 110 in fig. 3, or one main earplug may be taken out from the headset case, and the taken out one main earplug performs the method flow performed by the TWS headset 110 in fig. 3.
Referring to fig. 5, in conjunction with fig. 2, a software process flow of interaction between a mobile phone and a bluetooth headset is described by taking the example that the bluetooth headset is the collar bluetooth headset 120 shown in fig. 1B.
S501, when the bluetooth function is started, the bluetooth host of the mobile phone 100 drives the bluetooth controller to perform periodic signal scanning.
S502, in the off state, the Bluetooth headset 120 is started in response to the pressing operation of the key 122 by the user, and a broadcast message is sent through the Bluetooth module of the Bluetooth headset 120.
The bluetooth headset 120 starts up in response to the user's pressing operation of the key 122, and starts up the bluetooth function of the bluetooth headset 120, i.e., transmits a broadcast message through the bluetooth module of the bluetooth headset 120.
S503, after scanning the broadcast message, the Bluetooth controller of the mobile phone 100 sends scanning information to the Bluetooth host of the mobile phone 100.
The details of the scan information may be referred to in the above description of the scan information in S303.
S504, the Bluetooth host of the mobile phone 100 responds to the scanning information to establish Bluetooth connection with the Bluetooth module of the Bluetooth headset 120 through the Bluetooth controller.
S505, the bluetooth headset 120 receives a pressing operation of the key 121 by the user.
S506, the Bluetooth headset 120 responds to the pressing operation of the key 121 by the user and sends a first instruction to the Bluetooth host of the mobile phone 100.
The first instruction sent by the bluetooth headset 120 may be an instruction conforming to the Audio/video remote control specification (Audio/Video Remote Control Profile, AVRCP).
S507, the Bluetooth host of the mobile phone 100 receives and responds to the first instruction, and the first instruction is sent to the audio module under the condition that the mobile phone 100 does not play audio currently.
S508, the audio module in the mobile phone 100 responds to the first instruction to start an application for playing audio.
It should be noted that, the specific process of S506 to S508 may refer to the above detailed description of S308 to S310, and the embodiments of the present application are not repeated here.
The application for playing audio in the mobile phone 100 sends audio data to the bluetooth headset 120 through the bluetooth host S509.
S510, the bluetooth headset 120 receives the audio data from the mobile phone 100, and plays the audio according to the audio data.
Further, the bluetooth headset 120 may also receive a new pressing operation of the key 121, and send a new first instruction to the mobile phone 100. The handset 100 receives the new first instruction. In the case of playing audio through the bluetooth headset 120, the mobile phone 100 pauses playing audio and stops transmitting audio data to the bluetooth headset 120 in response to the new first instruction.
In summary, after the bluetooth connection is established between the electronic device and the bluetooth headset in the above scheme, the bluetooth headset may generate a corresponding instruction (e.g., the first instruction) in response to each operation of the bluetooth headset by the user, and send the instruction to the electronic device. The electronic device controls the playing of audio of the electronic device in response to the instruction from the Bluetooth headset. In the process of using the bluetooth headset, the user may not perform the operation currently required by the user, i.e. perform the misoperation, due to the operation error or the mistouch input.
For example, with respect to the TWS headset 110 shown in fig. 1A, when the user removes the TWS headset 110 from the ear, the user may miss touching the touch area 111 or the touch area 112 of the TWS headset 110; the TWS earphone 110 may generate a first instruction in response to a touch operation of the touch area 111 or the touch area 112 by a user, and transmit the first instruction to the mobile phone 100; the mobile phone 100 may play audio in response to the first instruction without playing audio.
For another example, with respect to the necklace type bluetooth headset 120 shown in fig. 1B, when the user picks up the bluetooth headset 120, the user may touch the button 121 of the bluetooth headset 120 by mistake; the bluetooth headset 120 may generate a first instruction in response to a pressing operation of the key 121 by a user, and transmit the first instruction to the mobile phone 100; the mobile phone 100 may play audio in response to the first instruction without playing audio.
In summary, if a user does not want to play audio, an misoperation of the user on the bluetooth headset triggers the electronic device to play audio, which brings inconvenience to the user and reduces the use experience of the user.
In view of the above problems, an embodiment of the present application provides an audio control method, by which an electronic device receives a first instruction sent by a bluetooth headset without playing audio, and does not respond to the first instruction. The first instruction is used for triggering the electronic device to start playing the audio under the condition that the audio is not played. Then, if the bluetooth headset is not detected to stop working within a first preset time period from the start of receiving the first instruction (for example, the TWS bluetooth headset is in an unworn state, the bluetooth headset is turned off, etc.), which indicates that the first instruction is not triggered by misoperation in the process of taking off the bluetooth headset from the ear or turning off the bluetooth headset by a user, the electronic device responds to the first instruction to start playing the audio when the first preset time period is over. If the Bluetooth headset is detected to stop working within the first preset time length, the first instruction is discarded, wherein the first instruction is possibly triggered by misoperation of a user in the process of taking down the Bluetooth headset or shutting down the Bluetooth headset. Therefore, when the user does not need to play the audio, the electronic equipment triggered by misoperation in the process of taking down the Bluetooth headset or shutting down the Bluetooth headset can be prevented from playing the audio. Therefore, the use experience of the user can be improved.
For example, the electronic device may be a mobile phone (such as the mobile phone 100 shown in fig. 1A or fig. 1B), a tablet computer, a desktop, a laptop, a handheld computer, a notebook, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook, a cellular phone, a personal digital assistant (personal digital assistant, PDA), an augmented reality (augmented reality, AR), a Virtual Reality (VR) device, a media player, a television, and the like, which have bluetooth functions, and the specific form of the electronic device is not limited in this embodiment of the present application. The following embodiments take an electronic device as an example of a mobile phone, and describe an audio control method provided in the embodiments of the present application.
The Bluetooth headset may be a TWS headset (such as TWS headset 110 shown in FIG. 1A), a headset, a necklace type Bluetooth headset (such as necklace type Bluetooth headset 120 shown in FIG. 1B), or an onboard Bluetooth on a vehicle, etc.
Referring to fig. 6, a schematic diagram of a structure of a mobile phone 100 is shown. As shown in fig. 6, the cellular phone 100 may include a processor 610, an external memory interface 620, an internal memory 621, a universal serial bus (universal serial bus, USB) interface 630, a charge management module 640, a power management module 641, a battery 642, an antenna 1, an antenna 2, a mobile communication module 650, a wireless communication module 660, an audio module 670, a speaker 670A, a receiver 670B, a microphone 670C, an earphone interface 670D, a sensor module 680, keys 690, a motor 691, an indicator 692, a camera 693, a display 694, a subscriber identity module (subscriber identification module, SIM) card interface 695, and the like. Among other things, the sensor module 680 may include a pressure sensor 680A, a touch sensor 680B, and the like.
The processor 610 may include one or more processing units, such as: the processor 610 may include an AP, a modem processor, a GPU, an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), and/or a baseband processor, etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural center or a command center of the mobile phone 100. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 610 for storing instructions and data.
In some embodiments, the processor 610 may include one or more interfaces. The interfaces may include a SIM card interface 695, a USB interface 630, and the like.
The charge management module 640 is used to receive a charge input from a charger. The charging management module 640 may also provide power to the electronic device through the power management module 641 while charging the battery 642.
The power management module 641 is used for connecting the battery 642, the charge management module 640 and the processor 610. The power management module 641 receives input from the battery 642 and/or the charge management module 640 and provides power to the processor 610, the internal memory 621, the external memory, the display 694, the camera 693, the wireless communication module 660, and the like.
The wireless communication function of the mobile phone 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 650, the wireless communication module 660, the modem processor, the baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. The mobile communication module 650 may provide a solution for wireless communication including 2G/3G/4G/5G, etc. applied to the handset 100. The mobile communication module 650 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 650 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 650 may amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate the electromagnetic waves.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then delivered to the AP. The AP outputs sound signals through an audio device (not limited to the speaker 670A, the receiver 670B, etc.), or displays images or videos through the display 694.
The wireless communication module 660 may provide solutions for wireless communications including wireless local area networks (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) networks), BT, global navigation satellite systems (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), short range wireless communication technologies (near field communication, NFC), etc., as applied to the handset 100. The wireless communication module 660 may be one or more devices that integrate at least one communication processing module. The wireless communication module 660 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 610. The wireless communication module 660 may also receive signals to be transmitted from the processor 610, frequency modulate them, amplify them, and convert them to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 650 of handset 100 are coupled, and antenna 2 and wireless communication module 660 are coupled, such that handset 100 may communicate with a network and other devices via wireless communication technology. The wireless communication technology may include BT, GNSS, WLAN, NFC, and/or FM, etc. For example, in the embodiment of the present application, the mobile phone 100 may establish a bluetooth connection with a bluetooth headset through a wireless communication technology, such as BT, using the wireless communication module 660. Based on the established bluetooth connection, the handset 100 may send audio data to the bluetooth headset, and may also receive audio data from the bluetooth headset.
The mobile phone 100 implements display functions through a GPU, a display 694, an AP, and the like. The GPU is a microprocessor for image processing, and is connected to the display 694 and the AP. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 610 may include one or more GPUs that execute program instructions to generate or change display information.
The display 694 is used to display images, video, and the like. The display 694 includes a display panel.
The mobile phone 100 may implement a photographing function through an ISP, a camera 693, a video codec, a GPU, a display 694, an AP, and the like.
The external memory interface 620 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capabilities of the handset 100. The external memory card communicates with the processor 610 through an external memory interface 620 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 621 may be used to store computer-executable program code that includes instructions. The processor 610 executes instructions stored in the internal memory 621 to thereby perform various functional applications and data processing of the handset 100. For example, in the embodiment of the present application, the processor 610 may establish a bluetooth connection with a bluetooth headset through the wireless communication module 660 by executing instructions stored in the internal memory 621, and perform a short-range data exchange with the bluetooth headset, so as to implement functions of talking, playing audio, etc. through the bluetooth headset. The internal memory 621 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data (e.g., audio data, phonebook, etc.) created during use of the handset 100, etc. In this embodiment, after a bluetooth connection is established between the mobile phone 100 and the bluetooth headset using a wireless communication technology, such as BT, the mobile phone 100 may store the bluetooth address of the bluetooth headset in the internal memory 621. In some embodiments, when the bluetooth headset is a device including two bodies, such as a TWS headset, the left and right earpieces of the TWS headset each have a respective bluetooth address, and the handset 100 may store the bluetooth address association of the left and right earpieces of the TWS headset in the internal memory 621. The bluetooth address may be a medium access control (media access control, MAC) address.
The mobile phone 100 may implement audio functions through an audio module 670, a speaker 670A, a receiver 670B, a microphone 670C, an earphone interface 670D, an AP, and the like. Such as music playing, recording, etc.
The audio module 670 is used to convert digital audio information to an analog audio signal output and also to convert an analog audio input to a digital audio signal. The audio module 670 may also be used to encode and decode audio signals. The audio module 670 may be used to pull up an APP in the handset 100 that plays audio. In some embodiments, the audio module 670 may be disposed in the processor 610, or some of the functional modules of the audio module 670 may be disposed in the processor 610.
Speaker 670A, also known as a "horn," is used to convert audio data into sound signals. The handset 100 may listen to music, or to hands-free calls, through the speaker 670A.
A receiver 670B, also known as a "earpiece," is used to convert audio data into sound signals. When the handset 100 is answering a telephone call or voice message, the voice can be received by placing the receiver 670B close to the human ear.
Microphone 670C, also known as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 670C through the mouth, inputting a sound signal to the microphone 670C. The handset 100 may be provided with at least one microphone 670C.
In the embodiment of the present application, when the mobile phone 100 establishes a wireless connection with a bluetooth headset, such as the TWS headset 110, the TWS headset 110 may be used as an audio input/output device of the mobile phone 100. Illustratively, the audio module 670 may receive audio data transmitted by the wireless communication module 660, and may implement functions of answering a call, playing music, etc. through the TWS headset. For example, when a user plays music using a media player (e.g., music APP) of the mobile phone 100, the AP may transmit audio data corresponding to the music played by the media player to the audio module 670. The audio data is transmitted by the audio module 670 to the wireless communication module 660. The wireless communication module 660 may transmit the audio data to the TWS headset so that the TWS headset converts the audio data to a sound signal and plays the sound signal.
The earphone interface 670D is used to connect a wired earphone. The earphone interface 670D may be a USB interface 630 or a 3.5mm open mobile electronic platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 680A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, pressure sensor 680A may be disposed on display 694. When a force is applied to the pressure sensor 680A, the capacitance between the electrodes changes. The handset 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display 694, the mobile phone 100 detects the intensity of the touch operation according to the pressure sensor 680A. The mobile phone 100 may also calculate the location of the touch based on the detection signal of the pressure sensor 680A.
The touch sensor 680B, also referred to as a "touch panel". The touch sensor 680B may be disposed on the display 694, and the touch sensor 680B and the display 694 form a touch screen, which is also referred to as a "touch screen". The touch sensor 680B is used to detect a touch operation acting on or near it. The touch sensor may communicate the detected touch operation to the AP to determine the touch event type. Visual output related to touch operations may be provided through the display 694. In other embodiments, the touch sensor 680B may also be disposed on the surface of the mobile phone 100 at a different location than the display 694.
The keys 690 include a power on key, a volume key, etc. The keys 690 may be mechanical keys. Or may be a touch key. The motor 691 may be used for incoming call vibration alerting as well as for touch vibration feedback. The indicator 692 may be an indicator light, which may be used to indicate a state of charge, a change in power, a message, a missed call, a notification, or the like. The SIM card interface 695 is used to connect a SIM card. The SIM card may be inserted into the SIM card interface 695 or removed from the SIM card interface 695 to enable contact and separation with the handset 100. The mobile phone 100 interacts with the network through the SIM card to realize functions such as call and data communication.
It should be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the mobile phone 100. In other embodiments of the present application, the handset 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components may be provided. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Referring to fig. 7, a schematic structural diagram of an earplug (e.g., a left earplug 110-1 or a right earplug 110-2) of a TWS earphone according to an embodiment of the disclosure is shown. As shown in fig. 7, the earplug of the TWS headset 110 may include: processor 710, memory 720, sensor 730, wireless communication module 740, receiver 750, microphone 760, and power supply 770.
The memory 720 may be configured to store application code, such as application code for establishing a wireless connection with another earpiece (e.g., the right earpiece 110-2) of the TWS headset 110, and for enabling the earpiece to mate with the handset 100. The processor 710 may control execution of the application code described above to implement the functionality of the earplug of the TWS headset in an embodiment of the application.
The memory 720 may also have stored therein a bluetooth address for uniquely identifying the earpiece and a bluetooth address of another earpiece of the TWS headset. In addition, the memory 720 may also store connection data for electronic devices that were successfully paired with the earplug. For example, the connection data may be a bluetooth address of the electronic device that was successfully paired with the earplug. Based on the connection data, the earplug can be automatically paired with the electronic device without having to configure a connection therebetween, such as for validation or the like.
Sensor 730 may be a distance sensor or a proximity light sensor. The earplug may determine whether it is worn by the user through the sensor 730. For example, the earbud may utilize a proximity light sensor to detect whether there is an object in the vicinity of the earbud, thereby determining whether the earbud is being worn by the user. Upon determining that the ear bud is worn, the ear bud may turn on the receiver 750.
In some embodiments, the earbud may further include a touch sensor for detecting a touch operation by a user.
The wireless communication module 740 is configured to support short-range data exchange between the earplug of the TWS headset and various electronic devices, such as the mobile phone 100 described above. In some embodiments, the wireless communication module 740 may be a bluetooth transceiver. The earpiece of the TWS headset may establish a bluetooth connection with the handset 100 via the bluetooth transceiver to enable short-range data exchange between the two.
At least one receiver 750, which may also be referred to as a "earpiece," may be used to convert audio data into sound signals and play. For example, when the earpiece of the TWS headset 110 is used as the audio output device of the mobile phone 100 described above, the receiver 750 may convert the received audio data into a sound signal and play it.
At least one microphone 760, also referred to as a "microphone," is used to convert sound signals to audio data. For example, when the earpiece of the TWS headset 110 is used as the audio input device for the handset 100 described above, the microphone 760 may collect and convert the user's voice signal into audio data during a user speaking (e.g., talking or voice messaging).
A power supply 770 may be used to provide power to the various components contained in the earplug of the TWS headset 110. In some embodiments, the power source 770 may be a battery, such as a rechargeable battery.
Typically, the TWS headset 110 will be provided with an earplug case (e.g., earplug case 110-3 shown in FIG. 1A). The earplug case may be used to receive left and right earplugs of the TWS headset 110. As shown in FIG. 1A, the earplug case 110-3 may be used to house an earplug 110-1 and an earplug 110-2 of a TWS headset 110. In addition, the ear bud box 110-3 may also charge the left and right ear buds of the TWS headset 110. Accordingly, in some embodiments, the earplug may further include: an input/output interface 280. The input/output interface 280 may be used to provide any wired connection between an earpiece of the TWS headset 110 and an earpiece cartridge (e.g., the earpiece cartridge 110-3 described above).
In some embodiments, the input/output interface 280 may be an electrical connector. When the earbud of the TWS headset 110 is placed in the earbud box, the earbud of the TWS headset 110 may be electrically connected with the earbud box (e.g., with an input/output interface of the earbud box) through the electrical connector. After the electrical connection is established, the earbud box may charge the power supply 770 of the earbud of the TWS headset. After the electrical connection is established, the earpieces of the TWS headset 110 may also be in data communication with the earpieces box. For example, the earplugs of the TWS headset 110 may receive pairing instructions from the earplug box through the electrical connection. The pairing command is used to instruct the earpiece of the TWS headset 110 to turn on the wireless communication module 740, so that the earpiece of the TWS headset 110 may be paired with the mobile phone 100 using a corresponding wireless communication protocol (e.g., bluetooth).
Of course, the earbud of the TWS headset 110 described above may also not include the input/output interface 280. In this case, the ear bud may implement a charging or data communication function based on the wireless connection established with the ear bud box through the wireless communication module 740 described above.
Additionally, in some embodiments, an earplug case (such as earplug case 110-3 described above) may further include a processor, memory, a SIM card, and sensors, among other components. The memory may be used to store application code and be controlled by the processor of the earplug case to perform the functions of the earplug case. For example. When the user opens the lid of the earplug case, the processor of the earplug case, by executing application code stored in the memory, may send pairing commands or the like to the earplugs of the TWS headset in response to the user opening the lid.
It is to be understood that the illustrated structure of the embodiments of the present application does not constitute a specific limitation on the earplug of the TWS headset 110. It may have more or fewer components than shown in fig. 7, may combine two or more components, or may have a different configuration of components. For example, the earplug may further include an indicator light (which may indicate the status of the earplug, etc.), a dust screen (which may be used with the earpiece), etc.
Referring to fig. 8, an audio control method is provided in the embodiment of the present application, and the method may be applied to a mobile phone and a bluetooth headset, and the method may include S801-S806.
S801, after Bluetooth connection is established between a mobile phone and a Bluetooth headset, the Bluetooth headset receives a first operation input by a user under the condition that audio is not played; the first operation is used for triggering the mobile phone to pause playing the audio under the condition of playing the audio, and starting playing the audio under the condition of not playing the audio.
After the mobile phone and the Bluetooth headset establish Bluetooth connection, if the mobile phone starts to play audio, audio data are sent to the Bluetooth headset; the Bluetooth headset plays audio according to audio data from the mobile phone. If the handset does not play audio, the Bluetooth headset does not play audio either. In the case where neither the mobile phone nor the bluetooth headset plays audio, the bluetooth headset may receive a first operation input by the user. For example, a pressing operation of the key 121 of the collar type bluetooth headset 120.
For example, after the bluetooth connection is established between the mobile phone and the TWS headset 110, the TWS headset 110 may receive the first operation when in the wearing state; the first operation may be a touch operation for triggering play/pause, which is input by the user at the touch area 112 of the TWS headset 110.
For another example, after the bluetooth connection is established between the mobile phone and the collar bluetooth headset 120, the user may receive a pressing operation (i.e., a first operation) of the key 121 of the collar bluetooth headset 120.
It should be noted that, in the case where both the mobile phone and the bluetooth headset play audio, the bluetooth headset may also receive the first operation.
S802, responding to the first operation, generating a first instruction by the Bluetooth headset, and sending the first instruction to the mobile phone.
The first instruction is used for triggering the mobile phone to pause playing the audio under the condition of playing the audio, and starting playing the audio under the condition of not playing the audio.
Illustratively, when the TWS headset 110 is in a worn state, a first instruction is sent to the handset in response to a first operation.
Illustratively, when the collar bluetooth headset 120 is in an active state, a first instruction is sent to the handset in response to a first operation.
S803, the mobile phone receives a first instruction sent by the Bluetooth headset under the condition that the audio is not played.
The mobile phone may record the time when the first command is received (i.e., the first time) while receiving the first command of the bluetooth headset.
S804, the mobile phone does not respond to the first instruction within a first preset time period from the time of receiving the first instruction.
When the mobile phone receives the first instruction, whether the first operation triggering the first instruction is misoperation input by a user is not determined. Thus, the handset may not respond to the first instruction first, i.e., remain unplayed. Then the bluetooth headset connected to the handset will not play audio either. Because the first operation may not be an incorrect operation, the mobile phone may not respond to the first instruction within a first preset duration from the first moment, and determine whether a preset event is detected within the first preset duration.
Further, if the mobile phone detects the preset event, which indicates that the first operation is a malfunction, the mobile phone may directly discard the first instruction, i.e. execute S805. If the mobile phone does not detect the preset event, it indicates that the first operation may not be a misoperation, and the mobile phone may respond to the first instruction when the first preset duration is over, that is, execute S806.
For example, the mobile phone may start to count from the first time, and not respond to the first instruction if the count duration is less than the first preset duration.
For example, the mobile phone may not send the first instruction to the audio module in the mobile phone within a first preset duration from the first time. The audio module in the mobile phone does not receive the first instruction and can not trigger the application to play audio.
In some embodiments, the first preset duration may be set according to a duration required by the user to perform an operation on the bluetooth headset (e.g., 1 second (s)), or according to a duration of response of the mobile phone to an operation that the user can accept.
It will be appreciated that if the first operation triggering the first instruction is a false operation, the user may continue to input the correct operation after the first operation is input. For example, when the user is ready to input other operations to the bluetooth headset, the first operation is a false operation due to an operation error or a false touch, and the user may continue to input other operations after inputting the first operation or continue to input an operation opposite to a function triggered by the first operation after inputting the first operation. Therefore, after receiving the first instruction triggered by the first operation, the mobile phone can wait for whether the user inputs a new operation or not to determine whether the first instruction is an instruction triggered by the misoperation, that is, whether the first operation is the misoperation or not. And, since the user may continuously input a new operation after the misoperation, the waiting first preset duration may be about equal to a duration required by the user to perform an operation on the bluetooth headset. Therefore, the problem that the mobile phone and the Bluetooth headset are blocked due to the fact that the mobile phone does not respond to the first instruction for a long time can be avoided.
In some embodiments, the preset event may be that the bluetooth headset is out of operation. Specifically, the preset event may include: the mobile phone receives a second instruction sent by the Bluetooth headset, or the mobile phone detects that the mobile phone and the Bluetooth headset are disconnected. Wherein the bluetooth headset comprises a TWS bluetooth headset, the second instruction may be for indicating that the TWS bluetooth headset is in an unworn state.
When the Bluetooth headset is powered off, the Bluetooth headset is powered off or the Bluetooth function of the mobile phone is powered off, the mobile phone can detect that the mobile phone is disconnected with the Bluetooth headset.
For example, for a TWS Bluetooth headset, if the TWS Bluetooth headset includes a main earplug, the main earplug is placed in the headset case and the TWS Bluetooth headset is turned off when the headset case is turned off. If the TWS Bluetooth headset comprises two main earplugs, the TWS Bluetooth headset is turned off when the two main earplugs are placed in the headset box and the headset box is closed.
For another example, for the necklace type bluetooth headset 120, when two earplugs of the necklace type bluetooth headset 120 magnetically attract, the necklace type bluetooth headset 120 turns off the bluetooth function, and the mobile phone can detect that the mobile phone is disconnected from the bluetooth headset by the necklace type bluetooth headset 120 bluetooth.
It can be understood that the first instruction is sent to the mobile phone by the bluetooth headset in the working state, that is, the mobile phone receives the first instruction under the condition that the mobile phone can play audio through the bluetooth headset, and the mobile phone is in a state that the mobile phone does not play audio, so that the first instruction can trigger the mobile phone to play audio through the bluetooth headset. If the bluetooth headset stops working within a first preset time period after the mobile phone is triggered to play the audio through the bluetooth headset, the first preset time period is a shorter time period (for example, the time period required by a user to execute an operation on the bluetooth headset or the response time period of the mobile phone to an operation which can be accepted by the user) which indicates that the bluetooth headset stops working within a shorter time period after the mobile phone is triggered to play the audio through the bluetooth headset. Then it can be known that the first operation of triggering the mobile phone to play audio through the bluetooth headset before the bluetooth headset stops working is likely to be an incorrect operation. That is, detecting that the bluetooth headset is out of operation within the first preset time period may indicate that the first operation is a malfunction.
Secondly, if the mobile phone detects that the Bluetooth headset stops working within a first preset time after receiving the first instruction, the mobile phone can continue to not respond to the first instruction after the first preset time is over, namely, the mobile phone does not play the audio, if the mobile phone indicates that the user does not need to play the audio at the moment or the current scene where the user is located is not suitable for playing the audio. Therefore, the inconvenience brought to the user by the fact that the mobile phone plays the audio through the loudspeaker of the mobile phone or plays the audio through the Bluetooth headset under the condition that the user does not need to play the audio or the scene where the user is unsuitable for playing the audio can be avoided.
S805, if the mobile phone detects a preset event within a first preset time period, discarding the first instruction when the first preset time period is over; the preset event is that the Bluetooth headset stops working.
If the mobile phone detects a preset event within a first preset time period, the mobile phone does not send a first instruction to an audio module in the mobile phone when the first preset time period is over, and discards the first instruction.
S806, if the mobile phone does not detect the preset event within the first preset time period, starting to play the audio in response to the first instruction when the first preset time period is over.
If the mobile phone does not detect the preset event within the first preset time period, the first instruction can be sent to an audio module in the mobile phone when the first preset time period is over in response to the first instruction. The audio module in the mobile phone responds to the first instruction and can trigger a target application to start playing audio. The mobile phone can send the audio data played by the target application to the Bluetooth headset. The Bluetooth headset plays the audio according to the received audio data.
The target application may be an application that plays audio that is last operated by the mobile phone, such as a music application, a broadcasting station application, or a listening book application. If the mobile phone has no application for playing audio running last time, the target application can be a default application for playing audio of the mobile phone, such as a music application, a broadcasting station application or a listening book application.
The specific process of S806 may refer to the detailed descriptions of S308 to S311, and may refer to the detailed descriptions of S507 to S510.
In this embodiment of the present invention, the user may input a plurality of identical operations in succession in the working state of the bluetooth headset, for example, the child may continuously operate the same key of the bluetooth headset in order to play the same key, for other purposes than controlling the audio playing, except for the process of triggering the bluetooth headset to stop working. Then, the Bluetooth headset sequentially responds to the same operations and sends the same instructions to the mobile phone. If the mobile phone responds to a plurality of identical instructions from the bluetooth headset in a short time (for example, the first preset time length or the second preset time length), the audio playing start and the audio playing pause are repeatedly executed, which may cause poor playing effects. In addition, it is not concerned by the user whether to start playing audio or pause playing audio, and repeatedly executing the start playing audio and pause playing audio only causes useless power consumption of the mobile phone. Therefore, the mobile phone can judge whether a new first instruction is received within a first preset time period after the first instruction. If the new first instruction is continuously received, the first instruction and the new first instruction can be selectively responded, but not both the first instruction and the new first instruction are responded, so that a poor playing effect and useless power consumption of the mobile phone are avoided. If no new first instruction is received, the electronic device can normally respond to the first instruction and start playing the audio.
Referring to fig. 9, S806 in the audio control method provided in the embodiment of the present application may include S901, and the method may further include S902-S904.
S901, if the mobile phone does not detect a preset event within a first preset time period and does not receive a new first instruction within the first preset time period, starting to play audio in response to the first instruction when the first preset time period is over.
After the mobile phone receives the first instruction, whether a preset event is detected within a first preset time period or not can be judged, and whether a new first instruction is received within the first preset time period or not can also be judged. If no preset event is detected within the first preset time period, that is, the Bluetooth headset does not stop working, and a new first instruction from the Bluetooth headset is not received within the first preset time period, the mobile phone can respond to the first instruction and play audio through the Bluetooth headset when the first preset time period is over.
It should be noted that, for details of the new first instruction in S901, reference may be made to the foregoing detailed description of the first instruction, which is not repeated herein in this embodiment of the present application.
S902, if the mobile phone does not detect a preset event within a first preset time period, and the mobile phone receives N new first instructions within the first preset time period, judging whether the last new first instruction in the N new first instructions triggers the mobile phone to start playing audio or not when the first preset time period is over.
If the mobile phone does not detect a preset event within a first preset time period, namely the Bluetooth headset is in a working state, and the mobile phone receives N new first instructions from the Bluetooth headset within the first preset time period, the mobile phone can discard the first instructions and the first N-1 first instructions in the N new first instructions when the first preset time period is over, and judge whether the last new first instruction triggers the mobile phone to pause playing audio or start playing audio. If the last new first instruction is used to trigger the mobile phone to start playing audio, and the mobile phone does not play audio currently, the mobile phone may respond to the last new first instruction, i.e. execute S903. If the last new first instruction is used to trigger the mobile phone to pause playing audio and the mobile phone is not currently playing audio, the mobile phone may not respond to the last new first instruction, i.e. execute S904. Wherein N is a positive integer.
It can be understood that the first instruction received by the mobile phone triggers the mobile phone to play audio or pause playing audio, which is related to the current playing state of the mobile phone. Similarly, each new first instruction received by the mobile phone triggers the mobile phone to play audio or pause playing audio, and the new first instruction is also related to the current playing state of the mobile phone. For example, if the handset is currently playing audio, the handset pauses playing audio in response to a new first instruction. If the mobile phone does not play the audio currently, the mobile phone responds to a new first instruction to play the audio. Therefore, the mobile phone can firstly judge whether the last new first instruction in the N new first instructions triggers the mobile phone to start playing the audio or pause playing the audio under the condition of responding to the first instruction and the N new first instructions in sequence. For example, the mobile phone sequentially receives the first instruction and N new first instructions under the condition that the audio is not played, and then it can be determined that the first instruction triggers the mobile phone that the audio is not played to play the audio, the first new first instruction in the N new first instructions triggers the mobile phone to pause playing the audio, the second new first instruction triggers the mobile phone to play the audio, the third new first instruction triggers the mobile phone to pause playing the audio, the fourth new first instruction triggers the mobile phone to play the audio, and so on.
Then, the mobile phone triggers the mobile phone to start playing the audio or pause playing the audio according to the current playing state and the last new first instruction, and determines whether to respond to the last new first instruction. If the current playing state of the mobile phone is inconsistent with the playing state of the mobile phone triggered by the last new first instruction, the mobile phone can respond to the last new first instruction. If the current playing state of the mobile phone is consistent with the playing state of the mobile phone triggered by the last new first instruction, the mobile phone can keep the current playing state without responding to the last new first instruction. For example, if the current playing state is that audio is not played, and the last new first instruction triggers the mobile phone to start playing audio, the mobile phone may respond to the last new first instruction. For another example, if the current playing state is that audio is not played, and the last new first instruction triggers the mobile phone to pause playing audio, the mobile phone may not respond to the last new first instruction and continue to pause playing audio.
It should be noted that, in addition to the mobile phone determining whether the new first instruction is received within the first preset duration described in S901, the mobile phone may also determine whether the new first instruction is received within the second preset duration, where in this embodiment, the duration of determining whether the new first instruction is received by the mobile phone is not limited, and the duration of determining whether the new first instruction is received by the mobile phone may be the first preset duration of determining whether the preset event is detected, or may be different from the first preset duration.
S903, the mobile phone responds to the last new first instruction in the N new first instructions, and starts to play the audio.
Under the condition that the mobile phone does not play the audio, if the last new first instruction is used for triggering the mobile phone to start playing the audio, the mobile phone can respond to the last new first instruction to start playing the audio. For example, the handset may send the last new first instruction to the audio module in the handset. The audio module in the mobile phone responds to the last new first instruction and can trigger a target application to start playing audio.
The mobile phone receives a first instruction under the condition that audio is not played; and sequentially receiving a first new first instruction and a second new first instruction within a first preset time period from the start of receiving the first instruction. The first instruction can trigger the mobile phone which does not play the audio to start playing the audio. The first new first instruction may trigger the handset to pause playing audio. The second new first instruction may trigger the handset to begin playing audio. The handset may begin playing audio in response to the second new first instruction.
S904, the mobile phone discards the first instruction and N new first instructions.
Under the condition that the mobile phone does not play the audio, if the last new first instruction is used for triggering the mobile phone to pause playing the audio, the mobile phone can not respond to the first instruction and the N new first instructions and keep not playing the audio. For example, the handset does not send the first instruction and N new first instructions to the audio module in the handset.
It should be noted that, S901-S904 describe that, after the mobile phone receives the first instruction, the mobile phone does not respond to the first instruction first, and determines whether a new first instruction is received within a first preset duration from the time of receiving the first instruction; and determining how to process the first instruction and receiving a new first instruction within the first preset time period based on the judging result. In addition to the first instruction, if the mobile phone determines that the last new first instruction is responded, the last new first instruction is not responded, and the step executed for the first instruction is executed.
It should be further noted that fig. 9 describes a processing flow of the first instruction by the mobile phone under the condition that the audio is not played. The processing flow of the mobile phone to the first instruction under the condition of playing the audio is different from the processing flow of the mobile phone to the first instruction under the condition of not playing the audio, in that the mobile phone does not judge whether a preset event is detected in the first preset time length or not, and only judges whether a new first instruction is received in the first preset time length or not. In addition to the above differences, the processing flow of the first instruction by the mobile phone when playing audio may refer to the processing flow of the first instruction by the mobile phone when not playing audio shown in fig. 9, which is not described herein in detail.
The embodiment of the application also provides an audio control method, by adopting the method, the Bluetooth headset receives the first operation input by the user under the condition that the audio is not played, and the first operation can not be responded first. If the Bluetooth headset is not detected to stop working within a first preset time period from the start of receiving the first operation, the Bluetooth headset responds to the first operation and sends a first instruction to the mobile phone. Then, in response to the first instruction, the mobile phone can play audio through the working Bluetooth headset.
Specifically, referring to fig. 10, the method may include S1001-S1005.
S1001, after Bluetooth connection is established between the Bluetooth earphone and the mobile phone, the Bluetooth earphone receives a first operation input by a user under the condition that audio is not played; the first operation is used for triggering the mobile phone to pause playing the audio under the condition of playing the audio, and starting playing the audio under the condition of not playing the audio.
It should be noted that, the specific process of S1001 may refer to the detailed description of S801, which is not described herein in detail in the embodiment of the present application.
S1002, the Bluetooth headset does not respond to the first operation within a first preset time period from the time of receiving the first operation.
And the Bluetooth headset does not respond to the first operation within a first preset time period from the start of receiving the first operation, and judges whether a preset event which can represent that the first operation is misoperation is detected within the first preset time period.
Illustratively, the bluetooth headset detecting the preset event may include any one of: the TWS Bluetooth headset detects that the TWS Bluetooth headset is in an unworn state; or the Bluetooth headset detects that the Bluetooth headset is disconnected with the mobile phone.
It should be noted that, the details of the first preset duration and the preset event may refer to the details of the first preset duration and the preset event in S804, which are not described herein.
S1003, if the Bluetooth headset does not detect a preset event within a first preset time period, responding to a first operation and sending a first instruction to the mobile phone when the first preset time period is over; the first instruction is used for triggering the mobile phone to start playing the audio; the preset event is that the Bluetooth headset stops working.
It should be noted that, the details of the first instruction may refer to the details of the first instruction in S802, which is not described herein in detail in the embodiment of the present application.
S1004, the mobile phone receives and responds to the first instruction to start playing the audio.
And under the condition that the mobile phone does not play the audio, the mobile phone receives and responds to the first instruction to start playing the audio.
S1005, discarding the first operation when the Bluetooth headset detects a preset event within a first preset time period and the first preset time period is over.
If the Bluetooth headset detects a preset event within a first preset time period, discarding the first operation when the first preset time period is over, and not sending a first instruction to the mobile phone.
Further, the user may continuously input a plurality of identical operations while the bluetooth headset is in the operating state, in addition to taking down the bluetooth headset from the ear or inputting an incorrect operation during the shutdown of the bluetooth headset. If the bluetooth headset responds to a plurality of identical operations inputted in a short time (e.g., the first preset time period or the second preset time period), the power consumption of the bluetooth headset is increased. Thus, the bluetooth headset can select a plurality of identical operations inputted in a short time, for example, the bluetooth headset selects one operation in response to the last input. Thus, the final playing effect can be realized, and the power consumption can be reduced.
Referring to fig. 11, S1003 in the audio control method provided in the embodiment of the present application may include S1101, and the method may further include S1102-S1104.
S1101, if the Bluetooth headset does not detect a preset event within a first preset time period, and the Bluetooth headset does not receive a new first operation within the first preset time period, when the first preset time period is over, responding to the first operation, and sending a first instruction to the mobile phone.
If no preset event is detected within the first preset time period, that is, the Bluetooth headset does not stop working, and a new first operation is not received within the first preset time period, the Bluetooth headset can respond to the first operation when the first preset time period is over, generate a first instruction and send the first instruction to the mobile phone.
S1102, if the Bluetooth headset does not detect a preset event within a first preset time period, and the Bluetooth headset receives N new first operations within the first preset time period, judging whether the last new first operation in the N new first operations triggers the mobile phone to start playing audio or not when the first preset time period is over.
If the Bluetooth headset does not detect a preset event within the first preset time, namely the Bluetooth headset is in a working state, and the Bluetooth headset receives N new first operations within the first preset time, the Bluetooth headset can discard the first operations and the first N-1 first operations in the N new first operations when the first preset time is over, and judge whether the last new first operation triggers the mobile phone to pause playing audio or starts playing audio. If the last new first operation is used to trigger the handset to start playing audio, and the handset is not currently playing audio, the bluetooth headset may respond to the last new first operation, i.e. execute S1103. If the last new first instruction is used to trigger the handset to pause playing audio and the handset is not currently playing audio, the bluetooth headset may not respond to the last new first operation, i.e., perform S1104. Wherein N is a positive integer.
It should be noted that, in addition to the bluetooth headset determining whether a new first operation is received within the first preset duration described in S1101 and S1102, the bluetooth headset may also determine whether a new first operation is received within the second preset duration, and in this embodiment of the present application, the duration of determining whether a new first operation is received by the bluetooth headset is not limited, and the duration of determining whether a new first operation is received by the bluetooth headset may be a first preset duration of determining whether a preset event is detected, or may be different from the first preset duration.
S1103, the Bluetooth headset responds to the last new first operation in the N new first operations and sends a first instruction to the mobile phone.
Under the condition that the mobile phone and the Bluetooth headset do not play audio, if the last new first operation triggers the mobile phone to start playing audio, the Bluetooth headset can respond to the last new first operation, generate a first instruction and the mobile phone sends the first instruction; then, the mobile phone starts playing the audio in response to the first instruction, that is, S1102 is executed.
S1104, the bluetooth headset discards the first operation and N new first operations.
Under the condition that the mobile phone and the Bluetooth headset do not play audio, if the last new first operation triggers the mobile phone to pause playing audio, the Bluetooth headset can not respond to the first operation and N new first operations and continue to keep not playing audio.
It should be noted that, S1101-S1104 describe that, after the bluetooth headset receives the first operation, the bluetooth headset does not respond to the first operation first, and determines whether a new first operation is received within a first preset time period from the receipt of the first operation; and determining how to process the first operation and receiving a new first operation within the first preset time period based on the judging result. In addition to the first operation, if the bluetooth headset determines to respond to the last new first operation, the bluetooth headset may not respond to the last new first operation, but may execute the steps executed for the first operation.
It should be further noted that fig. 11 illustrates a processing flow of the first operation by the bluetooth headset in the case where audio is not played. The processing flow of the Bluetooth headset for the first operation under the condition of playing the audio is different from the processing flow of the Bluetooth headset for the first operation under the condition of not playing the audio in that the Bluetooth headset does not judge whether a preset event is detected within a first preset time length or not and only judges whether a new first operation is received within the first preset time length or not. In addition to the above differences, the processing flow of the mobile phone to the first operation when playing audio may refer to the processing flow of the bluetooth headset shown in fig. 11 to the first operation when not playing audio, which is not described herein in detail.
It will be appreciated that the electronic device (e.g., the mobile phone 100) and the bluetooth headset (e.g., the TWS bluetooth headset 110, the collar bluetooth headset 120) and the like include corresponding hardware structures and/or software modules for performing the functions. Those of skill in the art will readily appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the embodiments of the present application.
The embodiment of the application also provides electronic equipment, which comprises: a processor, a memory, and a communication interface; the memory and the communication interface are coupled to the processor, the memory for storing computer program code, the computer program code comprising computer instructions. When the processor executes the computer instructions, the electronic device is caused to execute the functions or steps executed by the mobile phone in the method embodiment.
The embodiment of the application also provides a bluetooth headset, this bluetooth headset includes: a processor, a memory, and a communication interface; the memory and the communication interface are coupled to the processor, the memory for storing computer program code, the computer program code comprising computer instructions. When the processor executes the computer instructions, the bluetooth headset is caused to execute the functions or steps executed by the bluetooth headset in the method embodiment.
Embodiments of the present application also provide a computer-readable storage medium having computer instructions stored therein. When the computer instructions run on the electronic equipment, the electronic equipment is caused to execute the functions or steps executed by the mobile phone in the method embodiment; or, when the computer instructions run on the bluetooth headset, the bluetooth headset is caused to perform the respective functions or steps performed by the bluetooth headset in the above-described method embodiments.
For example, the computer readable storage medium may be Read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), compact disc Read-Only Memory (CD-ROM), magnetic tape, floppy disk, optical data storage device, and the like.
The embodiment of the application also provides a computer program product containing computer instructions, which when run on an electronic device, cause the electronic device to execute the functions or steps executed by the mobile phone in the above method embodiment; or, when the computer instructions run on the bluetooth headset, the bluetooth headset is caused to perform the functions or steps performed by the bluetooth headset in the above-described method embodiments.
The electronic device, the bluetooth headset, the computer readable storage medium or the computer program product provided in the embodiments of the present application are configured to execute the corresponding method provided above, so that the beneficial effects achieved by the electronic device, the bluetooth headset, the computer readable storage medium or the computer program product can refer to the beneficial effects in the corresponding method provided above, and are not described herein.
From the foregoing description of the embodiments, it will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of functional modules is illustrated, and in practical application, the above-described functional allocation may be implemented by different functional modules, that is, the internal structure of the apparatus (e.g., electronic device, bluetooth headset) is divided into different functional modules to implement all or part of the functions described above. The specific working processes of the above-described system, device (e.g., electronic equipment, bluetooth headset) and unit may refer to the corresponding processes in the foregoing method embodiments, which are not described herein again.
In several embodiments provided herein, it should be understood that the disclosed systems, apparatuses (e.g., electronic devices, bluetooth headsets) and methods may be implemented in other ways. For example, the above-described embodiments of apparatuses (e.g., electronic devices, bluetooth headset) are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the methods described in the various embodiments of the present application. And the aforementioned storage medium includes: flash memory, removable hard disk, read-only memory, random access memory, magnetic or optical disk, and the like.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (13)

1. An audio control method, applied to an electronic device, comprising:
after the electronic equipment and the Bluetooth headset are connected, the electronic equipment receives a first instruction sent by the Bluetooth headset under the condition that audio is not played; the first instruction is used for triggering the electronic equipment to pause playing the audio under the condition of playing the audio, and starting playing the audio under the condition of not playing the audio;
the electronic equipment does not respond to the first instruction within a first preset duration from the time of receiving the first instruction; the first preset time length is set according to the time length required by a user to execute an operation on the Bluetooth headset;
if the electronic equipment does not detect a preset event within the first preset time period, and the electronic equipment receives N new first instructions within the first preset time period, judging whether the last new first instruction in the N new first instructions triggers the electronic equipment to start playing audio or not when the first preset time period is over; wherein N is a positive integer; responding to the last new first instruction in the N new first instructions if the last new first instruction triggers the electronic equipment to start playing audio; discarding the first instruction and the N new first instructions if the last new first instruction triggers the electronic device to pause playing audio;
If the electronic equipment detects a preset event in the first preset time period, discarding the first instruction when the first preset time period is over;
the preset event is that the Bluetooth headset stops working.
2. The method of claim 1, wherein the first instruction is sent when the bluetooth headset is in a worn state; the electronic device detecting that the Bluetooth headset stops working includes:
the electronic equipment receives a second instruction sent by the Bluetooth headset; the Bluetooth headset comprises a real wireless stereo TWS Bluetooth headset, and the second instruction is used for indicating that the TWS Bluetooth headset is in an unworn state;
or the electronic equipment detects that the electronic equipment and the Bluetooth earphone are disconnected.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
if the electronic equipment does not detect the preset event within the first preset time period and the electronic equipment does not receive a new first instruction within the first preset time period, starting to play audio in response to the first instruction when the first preset time period is over.
4. The method according to claim 1, wherein the method further comprises:
the electronic equipment receives a third instruction sent by the Bluetooth headset under the condition of playing audio; the third instruction is used for triggering the electronic equipment to pause playing the audio under the condition of playing the audio, and starting playing the audio under the condition of not playing the audio;
the electronic equipment does not respond to the third instruction within a second preset duration from the time of receiving the third instruction;
if the electronic equipment receives M new third instructions in a second preset time period, judging whether the last new third instruction in the M new third instructions triggers the electronic equipment to start playing audio or not when the second preset time period is over; wherein M is a positive integer;
if the last new third instruction triggers the electronic equipment to start playing audio, responding to the last new third instruction in the M new third instructions;
and discarding the third instruction and the M new third instructions if the last new third instruction triggers the electronic device to pause playing audio.
5. The method according to claim 4, wherein the method further comprises:
if the electronic equipment does not receive a new third instruction within the second preset time period, stopping playing the audio in response to the third instruction when the second preset time period is over.
6. An audio control method, applied to a bluetooth headset, comprising:
after the Bluetooth headset and the electronic equipment are connected, the Bluetooth headset receives a first operation input by a user under the condition that audio is not played; the first operation is used for triggering the electronic equipment to pause playing the audio under the condition of playing the audio, and starting playing the audio under the condition of not playing the audio;
the Bluetooth headset does not respond to the first operation within a first preset time period from the time of receiving the first operation; the first preset time length is set according to the time length required by the user to execute an operation on the Bluetooth headset;
if the Bluetooth headset does not detect a preset event within the first preset time period, and the Bluetooth headset receives N new first operations within the first preset time period, judging whether the last new first operation in the N new first operations triggers the electronic equipment to start playing audio or not when the first preset time period is over; wherein N is a positive integer; if the last new first operation triggers the electronic equipment to start playing audio, responding to the last new first operation in the N new first operations, and sending a first instruction to the electronic equipment; the first instruction is used for triggering the electronic equipment to pause playing the audio under the condition of playing the audio, and starting to play the audio under the condition of not playing the audio; discarding the first operation and the N new first operations if the last new first operation triggers the electronic device to pause playing audio;
If the Bluetooth headset detects a preset event within the first preset time period, discarding the first operation when the first preset time period is over;
the preset event is that the Bluetooth headset stops working.
7. The method of claim 6, wherein the bluetooth headset comprises a truly wireless stereo TWS bluetooth headset; the first operation is received when the Bluetooth headset is in a wearing state;
the bluetooth headset detects bluetooth headset stops working, includes:
the TWS Bluetooth headset detects that the TWS Bluetooth headset is in an unworn state;
or the Bluetooth headset detects that the Bluetooth headset is disconnected with the electronic equipment.
8. The method according to claim 6 or 7, characterized in that the method further comprises:
if the Bluetooth headset does not detect the preset event within the first preset time period and the Bluetooth headset does not receive a new first operation within the first preset time period, responding to the first operation and sending the first instruction to the electronic equipment when the first preset time period is over.
9. The method of claim 6, wherein the method further comprises:
The Bluetooth headset receives a second operation input by the user under the condition of playing the audio; the second operation is used for triggering the electronic equipment to pause playing the audio under the condition of playing the audio, and starting playing the audio under the condition of not playing the audio;
the Bluetooth headset does not respond to the second operation within a second preset time period from the time of receiving the second operation;
if the Bluetooth headset receives M new second operations within a second preset time period, judging whether the last new second operation in the M new second operations triggers the electronic equipment to start playing audio or not when the second preset time period is over; wherein M is a positive integer;
if the last new second operation triggers the electronic equipment to start playing audio, responding to the last new second operation in the M new second operations, and sending the first instruction to the electronic equipment;
and discarding the second operation and the M new second operations if the last new second operation triggers the electronic device to pause playing audio.
10. The method according to claim 9, wherein the method further comprises:
And if the Bluetooth headset does not receive a new second operation within the second preset time period, responding to the second operation and sending the first instruction to the electronic equipment when the second preset time period is over.
11. An electronic device, the electronic device comprising: a processor, a memory, and a communication interface; the memory and the communication interface are coupled with the processor, the memory is used for storing computer program codes, and the computer program codes comprise computer instructions; wherein the computer instructions, when executed by the processor, cause the electronic device to perform the method flow performed by the electronic device in the method of any one of claims 1-5.
12. A bluetooth headset, the bluetooth headset comprising:
a processor, a memory, and a communication interface; the memory and the communication interface are coupled with the processor, the memory is used for storing computer program codes, and the computer program codes comprise computer instructions; wherein the computer instructions, when executed by the processor, cause the bluetooth headset to perform the method flow performed by the bluetooth headset in the method of any of claims 6-10.
13. A computer readable storage medium storing computer instructions which, when run on an electronic device, cause the electronic device to perform the method of any one of claims 1-5;
alternatively, the computer instructions, when run on a bluetooth headset, cause the bluetooth headset to perform the method of any of claims 6-10.
CN202210700226.7A 2022-06-20 2022-06-20 Audio control method, electronic equipment, bluetooth headset and storage medium Active CN115277921B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210700226.7A CN115277921B (en) 2022-06-20 2022-06-20 Audio control method, electronic equipment, bluetooth headset and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210700226.7A CN115277921B (en) 2022-06-20 2022-06-20 Audio control method, electronic equipment, bluetooth headset and storage medium

Publications (2)

Publication Number Publication Date
CN115277921A CN115277921A (en) 2022-11-01
CN115277921B true CN115277921B (en) 2023-07-07

Family

ID=83762421

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210700226.7A Active CN115277921B (en) 2022-06-20 2022-06-20 Audio control method, electronic equipment, bluetooth headset and storage medium

Country Status (1)

Country Link
CN (1) CN115277921B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117336646A (en) * 2023-11-22 2024-01-02 惠州市拓谱智为科技有限公司 In-ear Bluetooth headset
CN117880885A (en) * 2023-12-08 2024-04-12 荣耀终端有限公司 Audio playing optimization method and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN207340113U (en) * 2017-07-03 2018-05-08 万魔声学科技有限公司 Earphone
CN111954110A (en) * 2020-08-14 2020-11-17 芯海科技(深圳)股份有限公司 Earphone interaction method and earphone
CN114065013A (en) * 2020-07-30 2022-02-18 阿里巴巴集团控股有限公司 Information processing method, device, system and storage medium

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101841599A (en) * 2010-04-07 2010-09-22 惠州Tcl移动通信有限公司 Method and mobile phone for preventing mistaken hanging up in conversation of mobile phone
CN105141761A (en) * 2015-08-10 2015-12-09 努比亚技术有限公司 State switching device of mobile terminal, mobile terminal and state switching method
CN106604164A (en) * 2016-04-29 2017-04-26 福建先创电子有限公司 Jitter elimination method and apparatus for key of earphone
CN107465972A (en) * 2017-09-15 2017-12-12 歌尔股份有限公司 The audio play control method and wireless headset of a kind of mobile terminal
CN107708009B (en) * 2017-09-27 2020-01-31 广东小天才科技有限公司 Wireless earphone operation method and device, wireless earphone and storage medium
CN107682770B (en) * 2017-10-16 2019-10-15 维沃移动通信有限公司 A kind of application control method and mobile terminal
CN109445739B (en) * 2018-09-30 2020-05-19 Oppo广东移动通信有限公司 Audio playing method and device, electronic equipment and computer readable medium
CN109348346B (en) * 2018-11-29 2024-03-08 歌尔科技有限公司 Earphone and wear detection device thereof
CN113709617A (en) * 2021-08-27 2021-11-26 Oppo广东移动通信有限公司 Wireless earphone control method and device, wireless earphone and storage medium
CN114339526A (en) * 2021-12-31 2022-04-12 歌尔科技有限公司 TWS earphone, VR equipment and control method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN207340113U (en) * 2017-07-03 2018-05-08 万魔声学科技有限公司 Earphone
CN114065013A (en) * 2020-07-30 2022-02-18 阿里巴巴集团控股有限公司 Information processing method, device, system and storage medium
CN111954110A (en) * 2020-08-14 2020-11-17 芯海科技(深圳)股份有限公司 Earphone interaction method and earphone

Also Published As

Publication number Publication date
CN115277921A (en) 2022-11-01

Similar Documents

Publication Publication Date Title
US11778363B2 (en) Audio data transmission method applied to switching between single-earbud mode and double-earbud mode of TWS headset and device
CN110769394B (en) Video call method and electronic equipment
US11653398B2 (en) Bluetooth connection method and device
CN115277921B (en) Audio control method, electronic equipment, bluetooth headset and storage medium
CN111078448B (en) Method for processing audio abnormity and electronic equipment
CN110166890B (en) Audio playing and collecting method and device and storage medium
EP4061027B1 (en) Bluetooth communication method and apparatus
EP3986008A1 (en) Method for using remote sim module, and electronic apparatus
CN113794797B (en) Terminal equipment and method for picking up sound through Bluetooth peripheral
CN115002934B (en) Audio service processing system, electronic equipment and Bluetooth headset
CN102025828B (en) Terminal and control method thereof
CN114079892A (en) Bluetooth communication method, wearable device and system
CN115086473A (en) Sound channel selection system, method and related device
CN113301544B (en) Method and equipment for voice intercommunication between audio equipment
CN115022766B (en) Audio data playing method and equipment
CN116261124A (en) Data transmission method and device, electronic equipment and intelligent terminal
CN113678481B (en) Wireless audio system, audio communication method and equipment
WO2024082855A1 (en) Audio service processing method, electronic device, and computer storage medium
CN116074986B (en) Bluetooth connection method, device and system
CN114885440B (en) Method for voice call among multiple audio devices, electronic device and storage medium
CN116321089B (en) Adjusting method, device and storage medium based on Bluetooth when playing audio
CN117956371A (en) Audio service recovery processing method, electronic equipment and computer storage medium
CN116744187B (en) Speaker control method and device
CN116033360B (en) Electronic equipment state monitoring method and electronic equipment
CN117041465A (en) Video call optimization method, electronic equipment and storage medium

Legal Events

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