CN108024128B - Control method and device for Bluetooth music playing, terminal equipment and storage medium - Google Patents

Control method and device for Bluetooth music playing, terminal equipment and storage medium Download PDF

Info

Publication number
CN108024128B
CN108024128B CN201711242070.8A CN201711242070A CN108024128B CN 108024128 B CN108024128 B CN 108024128B CN 201711242070 A CN201711242070 A CN 201711242070A CN 108024128 B CN108024128 B CN 108024128B
Authority
CN
China
Prior art keywords
control information
state
music
audio playing
playing
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
CN201711242070.8A
Other languages
Chinese (zh)
Other versions
CN108024128A (en
Inventor
龚金华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201711242070.8A priority Critical patent/CN108024128B/en
Publication of CN108024128A publication Critical patent/CN108024128A/en
Application granted granted Critical
Publication of CN108024128B publication Critical patent/CN108024128B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/4104Peripherals receiving signals from specially adapted client devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/41Structure of client; Structure of client peripherals
    • H04N21/422Input-only peripherals, i.e. input devices connected to specially adapted client devices, e.g. global positioning system [GPS]
    • H04N21/42204User interfaces specially adapted for controlling a client device through a remote control device; Remote control devices therefor
    • H04N21/42206User interfaces specially adapted for controlling a client device through a remote control device; Remote control devices therefor characterized by hardware details
    • H04N21/42225User interfaces specially adapted for controlling a client device through a remote control device; Remote control devices therefor characterized by hardware details characterized by types of remote control, e.g. universal remote control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/436Interfacing a local distribution network, e.g. communicating with another STB or one or more peripheral devices inside the home
    • H04N21/4363Adapting the video stream to a specific local network, e.g. a Bluetooth® network
    • H04N21/43637Adapting the video stream to a specific local network, e.g. a Bluetooth® network involving a wireless protocol, e.g. Bluetooth, RF or wireless LAN [IEEE 802.11]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/44204Monitoring of content usage, e.g. the number of times a movie has been viewed, copied or the amount which has been watched
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/637Control signals issued by the client directed to the server or network components
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/8106Monomedia components thereof involving special audio data, e.g. different tracks for different languages

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the application discloses a control method and device for Bluetooth music playing, terminal equipment and a storage medium. The method comprises the following steps: when control information sent by the Bluetooth equipment is detected, acquiring the current audio playing state of the terminal equipment; judging whether the audio playing state is a target audio playing state, wherein the target audio playing state is an audio playing state with a set corresponding relation with the control information; and if the audio playing state is the target audio playing state, ignoring the control information to refuse to execute the control operation corresponding to the control information. According to the control method for playing the Bluetooth music, when the audio playing state is the target audio playing state, the terminal device ignores the control information sent by the Bluetooth device, so that the control operation corresponding to the control information is refused to be executed, and the reliability of music playing control when the Bluetooth device is used for playing the music can be improved.

Description

Control method and device for Bluetooth music playing, terminal equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of music playing, in particular to a control method and device for Bluetooth music playing, terminal equipment and a storage medium.
Background
With the rapid development of mobile communication technology and the popularization of intelligent terminal devices, mobile terminal devices have become an indispensable communication tool in people's life. Because most mobile terminal devices support the bluetooth function, some bluetooth devices matched with the terminal devices also come into existence, such as bluetooth earphones, bluetooth sound boxes and the like, and in daily life, people generally play music by using the bluetooth devices in order to improve listening effects.
In the process of playing music by using the Bluetooth device, the terminal device can realize the control of music playing, such as playing, pausing, previous music and next music, by receiving the control information sent by the Bluetooth device. In the related art, a control method for playing bluetooth music has certain defects.
Disclosure of Invention
The embodiment of the application provides a control method and device for playing Bluetooth music, terminal equipment and a storage medium, which can improve the reliability of music playing control when equipment is used for playing music.
In a first aspect, an embodiment of the present application provides a method for controlling bluetooth music playing, where the method includes:
when control information sent by the Bluetooth equipment is detected, acquiring the current audio playing state of the terminal equipment;
judging whether the audio playing state is a target audio playing state, wherein the target audio playing state is an audio playing state with a set corresponding relation with the control information;
and if the audio playing state is the target audio playing state, ignoring the control information to refuse to execute the control operation corresponding to the control information.
In a second aspect, an embodiment of the present application further provides a control device for playing bluetooth music, where the device includes:
the audio playing state acquisition module is used for acquiring the current audio playing state of the terminal equipment when detecting the control information sent by the Bluetooth equipment;
the target audio playing state judging module is used for judging whether the audio playing state is a target audio playing state, and the target audio playing state is an audio playing state with a set corresponding relation with the control information;
and the control information ignoring module is used for ignoring the control information to refuse to execute the control operation corresponding to the control information when the audio playing state is the target audio playing state.
In a third aspect, an embodiment of the present application further provides a terminal device, including: a processor, a memory and a computer program stored on the memory and executable on the processor, the processor implementing the control method according to the first aspect when executing the computer program.
In a fourth aspect, an embodiment of the present application further provides a storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the control method according to the first aspect.
According to the embodiment of the application, when the control information sent by the Bluetooth device is detected, the audio playing state where the terminal device is located at present is obtained, whether the audio playing state is the target audio playing state or not is judged, and if the audio playing state is the target audio playing state, the control information is ignored, so that the execution of the control operation corresponding to the control information is refused. According to the control method for playing the Bluetooth music, when the audio playing state is the target audio playing state, the terminal device ignores the control information sent by the Bluetooth device, so that the control operation corresponding to the control information is refused to be executed, and the reliability of music playing control when the Bluetooth device is used for playing the music can be improved.
Drawings
Fig. 1 is a flowchart of a method for controlling bluetooth music playing in an embodiment of the present application;
fig. 2 is a flowchart of another control method for bluetooth music playing in the embodiment of the present application;
fig. 3 is a schematic structural diagram of a control device for bluetooth music playing in an embodiment of the present application;
fig. 4 is a schematic structural diagram of a terminal device in an embodiment of the present application;
fig. 5 is a schematic structural diagram of another terminal device in the embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures.
In the related art, when music in the terminal device is played by using the bluetooth device, in the music playing process, if voice call data needs to be played, the terminal device firstly pauses the music playing, then establishes a speech-free Profile (HFP) channel with the bluetooth device, transmits the voice call data to the bluetooth device through the HFP channel, and plays and outputs the voice call data by using the bluetooth device. After the voice call is played, the terminal device disconnects the HFP channel with the Bluetooth device, and music playing is resumed. However, some existing bluetooth devices can automatically send control information to the terminal device during or after the voice call playing process, so that the music playing cannot be normally resumed or automatically paused after the resumption after the voice call playing process is completed, and the reliability of music playing control is reduced when music is played through the bluetooth devices.
Currently, most terminal devices support the bluetooth Audio transmission model protocol (A2 DP), HFP, and Audio/Video remote control protocol (AVRCP). When the terminal equipment is connected with the Bluetooth equipment and music is played by using a music player in the terminal equipment, music data is transmitted to the Bluetooth equipment through an A2DP channel and is played and output by the Bluetooth equipment. When the control key of the Bluetooth device is operated, the generated control information is transmitted to the terminal device through the AVRVP channel so as to control a music player in the terminal device to execute corresponding operation. When the terminal equipment needs to play the voice call, the terminal equipment establishes an HFP channel with the Bluetooth equipment, and the voice call data is sent to the Bluetooth equipment through the HFP channel and played and output by the Bluetooth equipment.
Fig. 1 is a flowchart of a method for controlling bluetooth music playing according to an embodiment of the present invention, where the method is applicable to a situation where music playing is controlled by a bluetooth device, and the method can be executed by a control device for bluetooth music playing, and the device can be integrated in a terminal device such as a mobile phone and a tablet computer. As shown in fig. 1, the method includes the following steps.
And step 110, when the control information sent by the Bluetooth equipment is detected, acquiring the current audio playing state of the terminal equipment.
The control information may be music playing control information, music pause playing control information, playing next music control information, or playing previous music control information. The music playing control information may be information for controlling the music player to continue playing the current music; the music pause playing control information may be information for controlling the music player to pause playing the current music; playing the next piece of music control information may be information that controls the music player to switch from playing the current piece of music to playing the next piece of music; the play last music control information may be information that controls the music player to switch from the current music to the play of the previous music. The audio play state may include a voice call state, a music play state, or a music pause state. The voice call may include a voice call through social software, a voice call through a phone call, and the like.
The process of sending the control information by the bluetooth device may be that, when the bluetooth device detects that the control key is manually operated by a user, the corresponding control information is generated according to the type of the control key, and then the control information is sent to the terminal device; or after the Bluetooth device automatically generates the control information, the control information is sent to the terminal device. The way of detecting the control information sent by the bluetooth device may be that after the terminal device establishes the bluetooth connection with the bluetooth device, the bluetooth module in the terminal device monitors whether the bluetooth device sends information in real time, and when the bluetooth device sends the control information, the bluetooth module in the terminal device can detect the control information. The method for acquiring the current audio playing state of the terminal device may be that an operating system of the terminal device detects a condition that the current audio system sends audio data to the bluetooth device, if the audio data sent to the bluetooth device by the audio system is voice call data, the terminal device is in a voice call state, if the audio data sent to the bluetooth device by the audio system is music data, the terminal device is in a music playing state, and if the audio system does not send music data or send voice call data to the bluetooth device, the terminal device is in a music pause state.
Specifically, when the bluetooth module of the terminal device detects the control information sent by the bluetooth device, the operating system in the terminal device detects that the current audio system sends audio data to the bluetooth device, so as to obtain the current audio playing state of the terminal device.
Optionally, when detecting the control information sent by the bluetooth device, acquiring the current audio playing state of the terminal device may be implemented in the following manner: and when detecting the control information sent by the Bluetooth equipment through the AVRCP channel, acquiring the current audio playing state of the terminal equipment.
The AVRCP channel can be used to transmit audio/video control information to realize remote control of audio/video. The two roles defined by the AVRCP are respectively a controller and target equipment, the controller converts the detected user operation into A/V control information, and then the A/V control information is remotely transmitted to the target equipment through an AVRCP channel, so that the control of a player in the target equipment is realized. Under the application scene, the Bluetooth device is a controller, and the terminal device is a target device.
Step 120, determining whether the audio playing status is the target audio playing status, if so, performing step 130, otherwise, performing step 140.
The target audio playing state may be an audio playing state having a set corresponding relationship with the control information. Correspondingly, the control method provided by the embodiment of the application may further include a step of presetting a set corresponding relationship between the control information and the target audio playing state. In the set corresponding relationship, for a certain target audio playing state, the corresponding control information is the control information that affects the normal operation of the target audio playing state or makes the music playing unable to be normally resumed after the target audio playing state is finished.
Illustratively, table 1 lists a set correspondence of the target audio playback state to the control information.
TABLE 1
Figure BDA0001490070400000051
As can be seen from table 1, when the target audio playing state is the voice call state or within the preset time period after the voice call is ended, the corresponding control information includes music playing control information, music pause playing control information, playing next music control information and playing previous music control information, and may also include music setting information, such as updating (adding, deleting or modifying) a music playlist; when the target audio playing state is the music playing state, the corresponding control information is music playing control information; and when the target audio playing state is the music pause playing state, the corresponding control information is the music pause playing control information.
Specifically, after the current audio playing state of the terminal device is obtained, whether the current audio playing state is the target audio playing state corresponding to the control information is judged, and if the current audio playing state is the target audio playing state, the control information is ignored. And if the target audio playing state is not the target audio playing state, receiving the control information to control the music player to execute the control operation corresponding to the control information. And step 130, ignoring the control information to refuse to execute the control operation corresponding to the control information.
The manner of ignoring the control information may be that the bluetooth module of the terminal device does not receive the control information, or the bluetooth module of the terminal device receives the control information, does not send the control information to the music player, and discards the control information.
Specifically, when the audio playing state is the target audio playing state corresponding to the control information, the terminal device ignores the control information sent by the bluetooth device, so that the music player refuses to execute the control operation corresponding to the control information.
Optionally, if the audio playing state is the target audio playing state, ignoring the control information may be implemented in the following manner: and if the audio playing state is the voice call state, ignoring the control information. The voice call state is a state in which the voice call data is sent to the bluetooth device through the HFP channel to be played. In the voice communication state, the corresponding control information includes music playing control information, music pause playing control information, playing next music control information, playing previous music control information, and the like.
Specifically, when the current audio system detected by the operating system of the terminal device sends audio data to the bluetooth device as voice call data, that is, the current audio playing state is the voice call state, the terminal device ignores the control information sent by the bluetooth device, so that the music player refuses to execute the control operation corresponding to the control information. That is, when the audio playing status of the terminal device is the voice call status, the control information sent by the bluetooth device is ignored regardless of the type. For example, assuming that the terminal device needs to play voice call data during the process of playing music through the bluetooth device, the terminal device firstly suspends music playing, then establishes an HFP channel with the bluetooth device, the voice call data is transmitted to the bluetooth device through the HFP channel, the bluetooth device plays the voice call data, and during the process of playing the voice call data, the terminal device detects that the control information sent by the bluetooth device is music playing control information, and ignores the music playing control. The advantage of doing so is, after the voice conversation broadcast is ended, avoid the music broadcast can't resume to broadcast from pausing.
Optionally, if the audio playing state is the target audio playing state, ignoring the control information may be implemented in the following manner: and if the audio playing state is within a preset time period after the voice call is ended, ignoring the control information. In a preset time period after the voice call is finished, the corresponding control information includes music playing control information, music playing pause control information, control information for playing the next piece of music, control information for playing the previous piece of music, and the like.
Wherein the preset time period may be set to any value between 5-10 seconds. In this embodiment, after the voice call is ended, the terminal device disconnects the HFP channel, the audio playing state is switched back to the music playing state from the voice call state, and in a preset time period after the music playing is resumed, if the terminal device detects control information sent by the bluetooth device, the control information is ignored, so that the music player refuses to execute a control operation corresponding to the control information. That is, when the audio playing status of the terminal device is within the preset time period after the voice call is received, the control information sent by the bluetooth device is ignored regardless of the type of the control information. For example, assuming that the preset time is set to 5 seconds, within 5 seconds of music playing resumption, if the terminal device detects that the control information sent by the bluetooth device is music pause playing control information, the music pause playing control information is ignored, so that the music player refuses to perform music pause operation. The music playing method has the advantages that the music playing is prevented from being paused again within the preset time for music playing recovery, and the music playing is prevented from being recovered normally. And the general user will not operate the bluetooth device in the preset time period after the voice call is finished, and the control information detected in the preset time period can be determined as the control information abnormally sent by the bluetooth device, and then ignored, so as to prevent the control information from influencing the normal resuming playing of the music.
Optionally, if the audio playing state is the target audio playing state, ignoring the control information may be implemented in the following manner: and if the audio playing state is the music playing state, ignoring the control information. In the music playing state, the corresponding control information includes music playing control information.
In this application scenario, there is such a mechanism for controlling music playing, and when the terminal device is currently in a music playing state, if the music player receives music playing control information, the music being played is paused.
In this embodiment, if the terminal device is in the current audio playing state and the music playing state, when the control information sent by the bluetooth device is the music playing control information, the music playing control information is ignored, so that the music player refuses to execute the operation corresponding to the music playing control information, thereby avoiding pausing the played music. That is, in the music playing state, if the control information sent by the bluetooth device is the music playing control information, the control information is ignored, and if the control information sent by the bluetooth device is other control information except the music playing control information, the control information is received. This has the advantage of preventing music from being automatically paused during playback, which could affect the user experience.
Optionally, if the audio playing state is the target audio playing state, ignoring the control information may be implemented in the following manner: and if the audio playing state is the music playing pause state, ignoring the control information. In the music pause playing state, the corresponding control information includes music pause control information.
In this application scenario, there is such a mechanism for controlling music playing, and when the terminal device is currently in a music pause playing state, if the music player receives music pause playing control information, the music player switches the paused music to the playing state.
In this embodiment, if the terminal device is in the current audio playing state and the music playing pause state, when the control information sent by the bluetooth device is the music playing pause control information, the music playing pause control information is ignored, so that the music player refuses to execute the operation corresponding to the music playing pause control information, thereby avoiding automatically switching the paused music to the playing state. In other words, in the music pause playing state, if the control information sent by the bluetooth device is the music pause playing control information, the control information is ignored, and if the control information sent by the bluetooth device is other control information except the music pause playing control information, the control information is received. The advantage of this is that music is prevented from automatically resuming playing state during the pause process, which affects user experience.
Step 140, receiving the control information to execute the control operation corresponding to the control information.
And if the audio playing state is not the target audio playing state, receiving the control information and executing the control operation corresponding to the control information. Illustratively, the control information is music pause playing control information, and if the audio playing state is the music playing state, the music pause playing control information is received, and the control operation of pausing the music playing is executed.
According to the technical scheme of the embodiment, when the control information sent by the Bluetooth device is detected, the current audio playing state of the terminal device is obtained, whether the audio playing state is the target audio playing state is judged, and if the audio playing state is the target audio playing state, the control information is ignored, so that the execution of the control operation corresponding to the control information is refused. According to the control method for playing the Bluetooth music, when the audio playing state is the target audio playing state, the terminal device ignores the control information sent by the Bluetooth device, so that the control operation corresponding to the control information is refused to be executed, and the reliability of music playing control when the Bluetooth device is used for playing the music can be improved.
Optionally, if the audio playing status is within a preset time period after the voice call is ended, ignoring the control information may also be implemented in the following manner: and if the audio playing state is within a preset time period after the voice call is finished and the accumulated times of the control information meeting the set conditions are detected to be less than the set times within the preset time period, ignoring the control information.
In practical implementation, there is one application scenario: the user continuously performs the same control operation for a set number of times (for example, continuously clicks a pause play button for 3 times) on the bluetooth device within a preset time period, generates a set number of control information (music pause play control information) and sends the control information to the mobile terminal. The reason for this is: on one hand, the control requirement of the user on music playing in the preset time period after the voice call is finished can be met, and on the other hand, the situation that the mobile terminal receives control information once due to careless and mistaken touch of the user can be avoided.
Wherein, the setting condition may be that the generation interval of two adjacent control information conforms to the interval of manual continuous operation, for example: the interval may be less than 2 seconds. The number of times of setting may be set to any integer of 2 or more. In this embodiment, in a preset time period, if the number of times of receiving the control information meeting the setting condition is less than the set number of times, it may be considered that the control information is automatically sent by the bluetooth device, and the control information is ignored. For example, assuming that the set number of times is set to 3, if the terminal device detects two times of music pause playback control information within 2 seconds, both of the two times of music pause playback control information are ignored.
Optionally, within the preset time period, if the cumulative number of times of receiving the control information meeting the setting condition is greater than or equal to the setting number of times, it indicates that the current control information is generated by a user manually operating the control key, and is not automatically generated by the bluetooth device. And receiving the control information detected last time in the control information, and sending the control information to the music player so as to control the music player to execute the control operation corresponding to the control information detected last time. For example, assuming that the set number of times is set to 3, if the terminal device detects music pause play control information 3 times within 2 seconds, the 3 rd detected music pause play control information is received to control the music player to pause music.
According to the technical scheme of the embodiment, if the accumulated times of the control information meeting the set conditions are detected to be less than the set times within the preset time after the voice call is ended, the control information is ignored. The method can avoid that the music playing is suspended within the preset time for the music playing recovery, and prevent the music playing from being recovered normally, thereby improving the reliability of the Bluetooth music playing control.
Optionally, when detecting the control information sent by the bluetooth device, before acquiring the current audio playing state of the terminal device, the method further includes the following steps: establishing Bluetooth connection with a Bluetooth device; and sending the music data to the Bluetooth device for playing through a Bluetooth audio transmission protocol A2DP channel.
The process of establishing the bluetooth connection between the terminal device and the bluetooth device may be that the bluetooth function in the terminal device is firstly turned on, then nearby bluetooth devices are searched, and when an identification code representing the bluetooth device appears in the terminal device, the identification code is clicked to send a bluetooth connection request to the bluetooth device. After the connection with the Bluetooth device is successfully established, the terminal device sends the music data to the Bluetooth device for playing through an A2DP protocol channel.
Fig. 2 is a flowchart of another control method for bluetooth music playing according to an embodiment of the present application, and as further explained in the foregoing embodiment, as shown in fig. 2, the method includes the following steps.
Step 210, establishing a bluetooth connection with the bluetooth device, and sending the music data to the bluetooth device for playing through a bluetooth A2DP channel.
Step 220, music playing is paused, the HFP channel is established, and the voice communication data is sent to the bluetooth device through the HFP channel for playing.
Step 230, when detecting the control information sent by the bluetooth device through the AVRCP channel, obtaining the current audio playing state of the terminal device.
Step 240, judging whether the audio playing state is a voice call state; if yes, go to step 250, otherwise go to step 270.
And step 250, ignoring the control information to refuse to execute the control operation corresponding to the control information.
And step 260, ignoring the control information within a preset time after the voice call is finished.
And step 270, receiving the control information to execute the control operation corresponding to the control information.
According to the technical scheme of the embodiment of the application, when the audio playing state is in the voice call state, the terminal equipment ignores the control information sent by the Bluetooth equipment, so that the music playing can be normally recovered, and the reliability of music playing control is improved.
Fig. 3 is a schematic structural diagram of a control device for playing bluetooth music according to an embodiment of the present application. As shown in fig. 3, the apparatus includes: an audio playing state obtaining module 310, a target audio playing state determining module 320 and a control information ignoring module 330.
The audio playing state acquiring module 310 is configured to acquire an audio playing state of the terminal device when detecting control information sent by the bluetooth device;
a target audio playing state determining module 320, configured to determine whether the audio playing state is a target audio playing state, where the target audio playing state is an audio playing state having a set corresponding relationship with the control information;
the control information ignoring module 330 is configured to ignore the control information when the audio playing state is the target audio playing state, so as to refuse to execute the control operation corresponding to the control information.
Optionally, the control information ignoring module 330 is further configured to:
if the audio playing state is a voice communication state, control information is ignored, the voice communication state is a state that voice communication data are sent to the Bluetooth device through a voice communication protocol HFP channel for playing, and the control information comprises music playing control information, music playing pause control information, playing next music control information or playing previous music control information.
Optionally, the control information ignoring module 330 is further configured to:
and if the audio playing state is within a preset time period after the voice call is ended, ignoring the control information, wherein the control information comprises music playing control information, music pause playing control information, playing next music control information or playing previous music control information.
Optionally, the control information ignoring module 330 is further configured to:
if the audio playing state is the music playing state, ignoring the control information, wherein the control information comprises music playing control information;
and if the audio playing state is the music pause playing state, ignoring the control information, wherein the control information comprises the music pause control information.
Optionally, the control information ignoring module 330 is further configured to:
and if the audio playing state is within a preset time period after the voice call is finished and the accumulated times of the control information meeting the set conditions detected within the preset time period are less than the set times, ignoring the control information.
Optionally, the method further includes:
the Bluetooth connection establishing module is used for establishing Bluetooth connection with the Bluetooth equipment;
and the music data sending module is used for sending the music data to the Bluetooth equipment for playing through a Bluetooth audio transmission protocol A2DP channel.
Optionally, the audio playing state obtaining module 310 is further configured to:
and when detecting the control information sent by the Bluetooth equipment through an audio/video remote control protocol AVRCP channel, acquiring the current audio playing state of the terminal equipment.
The device can execute the methods provided by all the embodiments of the application, and has corresponding functional modules and beneficial effects for executing the methods. For details of the technology not described in detail in this embodiment, reference may be made to the methods provided in all the foregoing embodiments of the present application.
Fig. 4 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 4, the terminal device 400 comprises a memory 401 and a processor 402, wherein the processor 402 is configured to perform the following steps:
when control information sent by the Bluetooth equipment is detected, acquiring the current audio playing state of the terminal equipment;
judging whether the audio playing state is a target audio playing state, wherein the target audio playing state is an audio playing state with a set corresponding relation with the control information;
and if the audio playing state is the target audio playing state, ignoring the control information to refuse to execute the control operation corresponding to the control information.
Fig. 5 is a schematic structural diagram of another terminal device provided in an embodiment of the present application. As shown in fig. 5, the terminal may include: a housing (not shown), a memory 501, a Central Processing Unit (CPU) 502 (also called a processor, hereinafter referred to as CPU), a computer program stored in the memory 501 and operable on the processor 502, a circuit board (not shown), and a power circuit (not shown). The circuit board is arranged in a space enclosed by the shell; the CPU502 and the memory 501 are provided on the circuit board; the power supply circuit is used for supplying power to each circuit or device of the terminal; the memory 501 is used for storing executable program codes; the CPU502 executes a program corresponding to the executable program code by reading the executable program code stored in the memory 501.
The terminal further comprises: peripheral interface 503, RF (Radio Frequency) circuitry 505, audio circuitry 506, speakers 511, power management chip 508, input/output (I/O) subsystem 509, touch screen 512, other input/control devices 510, and external port 504, which communicate via one or more communication buses or signal lines 507.
It should be understood that the illustrated terminal device 500 is only one example of a terminal, and that the terminal device 500 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The following describes in detail the terminal device for controlling bluetooth music playing provided in this embodiment, and the terminal device is exemplified by a smart phone.
A memory 501, the memory 501 being accessible by the CPU502, the peripheral interface 503, and the like, the memory 501 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other volatile solid state storage devices.
A peripheral interface 503, the peripheral interface 503 may connect input and output peripherals of the device to the CPU502 and the memory 501.
An I/O subsystem 509, which I/O subsystem 509 may connect input and output peripherals on the device, such as a touch screen 512 and other input/control devices 510, to the peripheral interface 503. The I/O subsystem 509 may include a display controller 5091 and one or more input controllers 5092 for controlling other input/control devices 510. Where one or more input controllers 5092 receive electrical signals from or send electrical signals to other input/control devices 510, the other input/control devices 510 may include physical buttons (push buttons, rocker buttons, etc.), dials, slide switches, joysticks, click wheels. It is noted that the input controller 5092 may be connected to any one of: a keyboard, an infrared port, a USB interface, and a pointing device such as a mouse.
The touch screen 512 may be a resistive type, a capacitive type, an infrared type, or a surface acoustic wave type, according to the operating principle of the touch screen and the classification of media for transmitting information. The touch screen 512 may be classified according to installation methods: external hanging, internal or integral. Classified according to technical principles, the touch screen 512 may be: a vector pressure sensing technology touch screen, a resistive technology touch screen, a capacitive technology touch screen, an infrared technology touch screen, or a surface acoustic wave technology touch screen.
A touch screen 512, which is an input interface and an output interface between the user terminal and the user, displays visual output to the user, which may include graphics, text, icons, video, and the like. Optionally, the touch screen 512 sends an electrical signal (e.g., an electrical signal of the touch surface) triggered by the user on the touch screen to the processor 502.
The display controller 5091 in the I/O subsystem 509 receives electrical signals from the touch screen 512 or transmits electrical signals to the touch screen 512. The touch screen 512 detects a contact on the touch screen, and the display controller 5091 converts the detected contact into an interaction with a user interface object displayed on the touch screen 512, that is, implements a human-computer interaction, and the user interface object displayed on the touch screen 512 may be an icon for running a game, an icon networked to a corresponding network, or the like. It is worth mentioning that the device may also comprise a light mouse, which is a touch sensitive surface that does not show visual output, or an extension of the touch sensitive surface formed by the touch screen.
The RF circuit 505 is mainly used to establish communication between the smart speaker and a wireless network (i.e., a network side), and implement data reception and transmission between the smart speaker and the wireless network. Such as sending and receiving short messages, e-mails, etc.
The audio circuit 506 is mainly used to receive audio data from the peripheral interface 503, convert the audio data into an electric signal, and transmit the electric signal to the speaker 511.
And the loudspeaker 511 is used for restoring the voice signal received by the smart sound box from the wireless network through the RF circuit 505 into sound and playing the sound to the user.
And a power management chip 508 for supplying power and managing power to the hardware connected to the CPU502, the I/O subsystem, and the peripheral interfaces.
In this embodiment, the central processing unit 502 is configured to:
when control information sent by the Bluetooth equipment is detected, acquiring the current audio playing state of the terminal equipment;
judging whether the audio playing state is a target audio playing state, wherein the target audio playing state is an audio playing state with a set corresponding relation with the control information;
and if the audio playing state is the target audio playing state, ignoring the control information to refuse to execute the control operation corresponding to the control information.
Further, if the audio playing status is the target audio playing status, ignoring the control information includes:
and if the audio playing state is a voice communication state, ignoring the control information, wherein the voice communication state is a state of sending voice communication data to the Bluetooth equipment for playing through a voice communication protocol HFP channel, and the control information comprises music playing control information, music pause playing control information, playing next music control information or playing previous music control information.
Further, if the audio playing status is the target audio playing status, ignoring the control information includes:
and if the audio playing state is within a preset time period after the voice call is ended, ignoring the control information, wherein the control information comprises music playing control information, music pause playing control information, playing next music control information or playing previous music control information.
Further, if the audio playing status is the target audio playing status, ignoring the control information includes:
if the audio playing state is a music playing state, ignoring the control information, wherein the control information comprises music playing control information;
and if the audio playing state is the music playing pause state, ignoring the control information, wherein the control information comprises the music playing pause control information.
Further, if the audio playing status is within a preset time period after the voice call is ended, ignoring the control information includes:
and if the audio playing state is within a preset time period after the voice call is finished and the accumulated times of the control information meeting the set conditions are detected to be less than the set times within the preset time period, ignoring the control information.
Further, when detecting the control information sent by the bluetooth device, before acquiring the current audio playing state of the terminal device, the method further includes:
establishing a Bluetooth connection with the Bluetooth device;
and sending the music data to the Bluetooth device for playing through a Bluetooth audio transmission protocol A2DP channel.
Further, when detecting the control information sent by the bluetooth device, acquiring the current audio playing state of the terminal device includes:
and when detecting the control information sent by the Bluetooth equipment through an audio/video remote control protocol AVRCP channel, acquiring the current audio playing state of the terminal equipment.
The embodiment of the application also provides a storage medium containing terminal equipment executable instructions, and the terminal equipment executable instructions are used for executing the control method of Bluetooth music playing when being executed by a terminal equipment processor.
The computer storage media of the embodiments of the present application may take any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
Of course, the storage medium provided in the embodiments of the present application contains computer-executable instructions, and the computer-executable instructions are not limited to the bluetooth music playing control operation described above, and may also perform related operations in the bluetooth music playing control method provided in any embodiment of the present application.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims (9)

1. A control method for playing Bluetooth music is characterized by comprising the following steps:
when control information sent by the Bluetooth equipment is detected, acquiring the current audio playing state of the terminal equipment;
judging whether the audio playing state is a target audio playing state, wherein the target audio playing state is an audio playing state with a set corresponding relation with the control information, and the corresponding relation comprises that if the target audio playing state is a state that the terminal is in a voice call state or in a preset time period after the voice call, the control information is any control information for an audio player; if the target audio playing state is the state that the terminal is in audio playing/pausing, the control information is the control information for controlling the audio player to be in the target audio playing state;
and if the audio playing state is the target audio playing state, ignoring the control information to refuse to execute the control operation corresponding to the control information.
2. The method of claim 1, wherein ignoring the control information if the audio playback state is a target audio playback state comprises:
and if the audio playing state is a voice communication state, ignoring the control information, wherein the voice communication state is a state of sending voice communication data to the Bluetooth equipment for playing through a voice communication protocol HFP channel, and the control information comprises music playing control information, music pause playing control information, playing next music control information or playing previous music control information.
3. The method of claim 1, wherein ignoring the control information if the audio playback state is a target audio playback state comprises:
and if the audio playing state is within a preset time period after the voice call is ended, ignoring the control information, wherein the control information comprises music playing control information, music pause playing control information, playing next music control information or playing previous music control information.
4. The method of claim 3, wherein if the audio playing status is within a preset time period after the end of the voice call, ignoring the control information comprises:
and if the audio playing state is within a preset time period after the voice call is finished and the accumulated times of the control information meeting the set conditions are detected to be less than the set times within the preset time period, ignoring the control information.
5. The control method according to any one of claims 1 to 4, wherein before acquiring the current audio playing state of the terminal device when the control information sent by the Bluetooth device is detected, the method further comprises:
establishing a Bluetooth connection with the Bluetooth device;
and sending the music data to the Bluetooth device for playing through a Bluetooth audio transmission protocol A2DP channel.
6. The control method according to any one of claims 1 to 4,
when the control information sent by the Bluetooth device is detected, the method for acquiring the current audio playing state of the terminal device comprises the following steps:
and when detecting the control information sent by the Bluetooth equipment through an audio/video remote control protocol AVRCP channel, acquiring the current audio playing state of the terminal equipment.
7. A control device for playing Bluetooth music, comprising:
the audio playing state acquisition module is used for acquiring the current audio playing state of the terminal equipment when detecting the control information sent by the Bluetooth equipment;
a target audio playing state judging module, configured to judge whether the audio playing state is a target audio playing state, where the target audio playing state is an audio playing state having a set correspondence with the control information, where the correspondence includes that the control information is any control information for an audio player if the target audio playing state is a state in which the terminal is in a voice call state or within a preset time period after the voice call; if the target audio playing state is the state that the terminal is in audio playing/pausing, the control information is the control information for controlling the audio player to be in the target audio playing state;
and the control information ignoring module is used for ignoring the control information to refuse to execute the control operation corresponding to the control information when the audio playing state is the target audio playing state.
8. A terminal device, comprising: processor, memory and a computer program stored on the memory and executable on the processor, which when executed by the processor implements the control method according to any one of claims 1 to 6.
9. A storage medium on which a computer program is stored, which program, when being executed by a processor, carries out the control method according to any one of claims 1 to 6.
CN201711242070.8A 2017-11-30 2017-11-30 Control method and device for Bluetooth music playing, terminal equipment and storage medium Active CN108024128B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711242070.8A CN108024128B (en) 2017-11-30 2017-11-30 Control method and device for Bluetooth music playing, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711242070.8A CN108024128B (en) 2017-11-30 2017-11-30 Control method and device for Bluetooth music playing, terminal equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108024128A CN108024128A (en) 2018-05-11
CN108024128B true CN108024128B (en) 2020-01-14

Family

ID=62077731

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711242070.8A Active CN108024128B (en) 2017-11-30 2017-11-30 Control method and device for Bluetooth music playing, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108024128B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109144642B (en) * 2018-08-14 2022-02-18 Oppo广东移动通信有限公司 Display control method, display control device, electronic equipment and storage medium
CN108924023A (en) * 2018-08-31 2018-11-30 南昌与德通讯技术有限公司 Bluetooth control method, Bluetooth lamp and computer readable storage medium
CN109361820B (en) * 2018-11-08 2021-06-18 Oppo广东移动通信有限公司 Electronic equipment control method and system and electronic equipment
WO2020113591A1 (en) * 2018-12-07 2020-06-11 华为技术有限公司 Method and terminal device for dynamically adjusting version of avrcp
CN112286483A (en) * 2020-10-29 2021-01-29 维沃移动通信有限公司 Audio playing control method and device and electronic equipment
CN112637647A (en) * 2020-12-10 2021-04-09 深圳市鼎盛光电有限公司 Audio playing method and device, smart television and computer readable storage medium
CN112786073B (en) * 2021-01-14 2023-06-16 深圳市芯中芯科技有限公司 Sound box control method, system, device and storage medium based on Bluetooth connection

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101123455A (en) * 2006-08-08 2008-02-13 三星电子株式会社 Mobile communication terminal and method for inputting/outputting voice during playback of music data
CN102064857A (en) * 2009-11-18 2011-05-18 三星电子株式会社 Method and apparatus for remote controlling bluetooth device
CN103986818A (en) * 2014-04-01 2014-08-13 联想(北京)有限公司 Information processing method and electronic device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1286537A3 (en) * 2001-08-21 2011-04-27 Thomson Licensing Routing and processing data
TWI431994B (en) * 2010-11-03 2014-03-21 Acer Inc Method and system for playing multimedia file and computer program product using the method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101123455A (en) * 2006-08-08 2008-02-13 三星电子株式会社 Mobile communication terminal and method for inputting/outputting voice during playback of music data
CN102064857A (en) * 2009-11-18 2011-05-18 三星电子株式会社 Method and apparatus for remote controlling bluetooth device
CN103986818A (en) * 2014-04-01 2014-08-13 联想(北京)有限公司 Information processing method and electronic device

Also Published As

Publication number Publication date
CN108024128A (en) 2018-05-11

Similar Documents

Publication Publication Date Title
CN108024128B (en) Control method and device for Bluetooth music playing, terminal equipment and storage medium
CN107835033B (en) Antenna tuning switch control method and device, terminal equipment and storage medium
CN106791892B (en) Method, device and system for live broadcasting of wheelhouses
CN107889092B (en) Bluetooth device communication control method, device, terminal device and storage medium
CN108509176B (en) Method and device for playing audio data, storage medium and intelligent terminal
EP2990943B1 (en) Intelligent terminal device control method and system
CN107770759B (en) Bluetooth voice link establishing method and device, storage medium and mobile terminal
WO2017202348A1 (en) Video playing method and device, and computer storage medium
US10104213B2 (en) Information processing device
CN107332976B (en) Karaoke method, device, equipment and system
WO2017181365A1 (en) Earphone channel control method, related apparatus, and system
CN106940997B (en) Method and device for sending voice signal to voice recognition system
CN109639863B (en) Voice processing method and device
KR102043641B1 (en) Operating Method For Nearby Function and Electronic Device supporting the same
WO2017215661A1 (en) Scenario-based sound effect control method and electronic device
CN112230877A (en) Voice operation method and device, storage medium and electronic equipment
CN111131951A (en) Wireless earphone positioning method, wireless earphone, electronic equipment and storage medium
CN108494970B (en) Terminal state information processing method and device, storage medium and terminal
WO2019076250A1 (en) Push message management method and related products
CN110830063B (en) Interference control method of audio service and terminal
CN110688051B (en) Screen recording operation method and device, computer readable storage medium and terminal
CN106603870B (en) Control method and device of playing equipment, playing equipment and mobile terminal
WO2018161788A1 (en) Multimedia data sharing method and device
CN109788114B (en) Call processing method and terminal
WO2017215615A1 (en) Sound effect processing method and mobile terminal

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
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: Guangdong Opel Mobile Communications Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant