WO2021114952A1 - Data processing method, terminal device, bluetooth device, and storage medium - Google Patents

Data processing method, terminal device, bluetooth device, and storage medium Download PDF

Info

Publication number
WO2021114952A1
WO2021114952A1 PCT/CN2020/125588 CN2020125588W WO2021114952A1 WO 2021114952 A1 WO2021114952 A1 WO 2021114952A1 CN 2020125588 W CN2020125588 W CN 2020125588W WO 2021114952 A1 WO2021114952 A1 WO 2021114952A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal device
application
data processing
processing method
bluetooth
Prior art date
Application number
PCT/CN2020/125588
Other languages
French (fr)
Chinese (zh)
Inventor
梁鲲
张凯
王旭军
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021114952A1 publication Critical patent/WO2021114952A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers

Definitions

  • This application belongs to the field of communication technology, and particularly relates to data processing methods, terminal devices, Bluetooth devices, and storage media.
  • Existing Bluetooth devices are generally used to respond to the instructions of the application program on the terminal device to perform audio playback. If the user needs to operate the application program, the application program needs to be opened on the terminal device to achieve this. In the case where the user is inconvenient to use the terminal device The operation is inconvenient.
  • the embodiments of the present application provide a data processing method, a terminal device, a Bluetooth device, and a storage medium, which can realize the operation of the application program on the terminal device through the Bluetooth device.
  • the first aspect of the embodiments of the present application provides a data processing method, which is applied to a terminal device, and the data processing method includes:
  • the terminal device receives data sent by the Bluetooth device through the first communication link, and the data includes an application program identifier and an operation instruction;
  • the terminal device notifies the target application corresponding to the application identifier to perform the operation corresponding to the operation instruction through the second communication link, wherein the target application is installed on the terminal device.
  • the terminal device obtains the data sent by the Bluetooth device through the first communication link, and notifies the target application corresponding to the application identifier to perform the operation corresponding to the operation instruction through the second communication link, thereby realizing the Bluetooth device to the terminal device Control on the application.
  • the operation instruction includes collecting music or playing collected music.
  • the first communication link is established based on the RFCOMM protocol.
  • the terminal device notifying the target application corresponding to the application identifier to perform the operation corresponding to the operation instruction through the second communication link includes: the terminal device notifying the target application corresponding to the application identifier by broadcasting The program executes the operation corresponding to the operation instruction.
  • the terminal device establishes a socket channel with the Bluetooth device based on the RFCOMM protocol, receives data sent by the Bluetooth device, and then the terminal device broadcasts the identification and operation instructions of the application at the application layer, and all applications installed on the terminal device can receive the broadcast ,
  • the target application program corresponding to the application program identifier executes the operation instruction, so as to realize the control of the application program by the Bluetooth device.
  • the first communication link is established based on the AVRCP protocol.
  • the terminal device notifying the target application corresponding to the application identifier to perform the operation corresponding to the operation instruction through the second communication link includes: if the terminal device searches for the target application corresponding to the application identifier, Notifying the target application to execute the operation corresponding to the operation instruction.
  • the terminal device receives the data sent by the Bluetooth device through the AVRCP protocol, searches for the installed application according to the application identifier, and if the target application is found, the operation instruction is sent to the target application, so that the target application executes the corresponding operation instruction Operation.
  • the data processing method further includes: After the target application completes the operation corresponding to the operation instruction, the terminal device constructs an AVRCP message corresponding to the operation completion information, and sends the AVRCP message corresponding to the operation completion information to the Bluetooth device, In this way, the two-way communication between the terminal device and the Bluetooth device is realized, and the Bluetooth device can generate corresponding prompt information according to the operation completion information to remind the user of the completion of the operation of the application program.
  • the data sent by the Bluetooth device includes a key value constructed in advance by the Bluetooth device, and the key value is used to indicate an application program identifier and an operation instruction.
  • the data sent by the Bluetooth device further includes identity authentication information of the target application.
  • the Bluetooth device sends the key value and the identity authentication information entered by the user to the terminal device through the AVRCP protocol. After the terminal device detects the key value, it transparently transmits the identity authentication information to the target application, and the user can log in to the application through the Bluetooth device. .
  • the second aspect of the embodiments of the present application provides a data processing method, which is applied to a Bluetooth device, and the data processing method includes:
  • the Bluetooth device After receiving the predetermined information, the Bluetooth device determines data corresponding to the predetermined information, and the data includes an application program identifier and an operation instruction;
  • the Bluetooth device sends the data to the terminal device via the first communication link to instruct the terminal device to notify the target application corresponding to the application identifier to perform the operation corresponding to the operation instruction via the second communication link , Wherein the target application is installed on the terminal device.
  • the first communication link is established based on the RFCOMM protocol.
  • the first communication link is established based on the AVRCP protocol.
  • the data sent by the Bluetooth device includes a key value constructed by the Bluetooth device according to the predetermined information, and the key value is used to indicate an application program identifier and an operation instruction.
  • the data processing method further includes:
  • the Bluetooth device obtains the AVRCP message sent by the terminal device, where the AVRCP message is constructed based on operation completion information after the target application has executed the operation instruction.
  • the data processing method further includes:
  • the Bluetooth device recognizes the AVRCP message, and generates prompt information corresponding to the operation completion information according to the AVRCP message.
  • the predetermined information includes information triggered by a predetermined button, information triggered by a predetermined touch operation, or a predetermined voice instruction.
  • the third aspect of the embodiments of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and running on the processor.
  • the processor executes the computer program, The steps of the data processing method as described in the above first aspect are implemented.
  • the fourth aspect of the embodiments of the present application provides a Bluetooth device, including a memory, a processor, and a computer program stored in the memory and running on the processor.
  • the processor executes the computer program, The steps of the data processing method as described in the above second aspect are implemented.
  • the fifth aspect of the embodiments of the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the data processing as described in the first aspect is realized.
  • the method or the steps of the data processing method described in the second aspect is realized.
  • the sixth aspect of the embodiments of the present application provides a computer program product, which when the computer program product runs on a terminal device, causes the terminal device to execute the data processing method described in the first aspect or the data processing described in the second aspect. Method steps.
  • Fig. 1 is a schematic diagram of a data processing system provided by an embodiment of the present application.
  • FIG. 2 is a schematic diagram of the internal structure of a terminal device provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of the internal structure of a Bluetooth device provided by an embodiment of the present application.
  • FIG. 4 is an application scenario diagram of the data processing method provided by an embodiment of the present application.
  • FIG. 5 is another application scenario diagram of the data processing method provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of the implementation process of the data processing method provided by the first embodiment of the present application.
  • FIG. 7 is a diagram of another application scenario of the data processing method provided by an embodiment of the present application.
  • FIG. 8 is another application scenario diagram of the data processing method provided by an embodiment of the present application.
  • FIG. 9 is another application scenario diagram of the data processing method provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of the implementation process of the data processing method provided by the second embodiment of the present application.
  • Fig. 11 is a structural block diagram of a data processing system provided by an embodiment of the present application.
  • the term “if” can be interpreted as “when” or “once” or “in response to determination” or “in response to detection” depending on the context .
  • the phrase “if determined” or “if detected [described condition or event]” can be interpreted as meaning “once determined” or “in response to determination” or “once detected [described condition or event]” depending on the context ]” or “in response to detection of [condition or event described]”.
  • the application scenario diagram of the data processing method provided in this embodiment of the application is applied to a data processing system.
  • the data processing system includes a terminal device 1 and a Bluetooth device 2.
  • the terminal device 1 and Bluetooth device 2 communicate through a wireless network.
  • the bluetooth device can be a bluetooth speaker, bluetooth headset, bluetooth bracelet and other smart devices supporting the bluetooth communication protocol.
  • Terminal devices can be mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR)/virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs) ), netbooks, personal digital assistants (personal digital assistants, PDAs), etc.
  • the terminal devices support the Bluetooth communication protocol, and the embodiments of the present application do not impose any restrictions on the specific types of terminal devices.
  • the internal structure of the terminal device 1 and the Bluetooth device 2 provided in the embodiment of the present application will be described below.
  • the terminal device 1 provided in the embodiment of the present application includes: at least one processor 110, at least one memory 120, an input unit 130, a display unit 140, a Bluetooth module 150, an audio circuit 160, and a wireless security Components such as a wireless fidelity (WiFi) module 170 and a power supply 180.
  • WiFi wireless fidelity
  • the structure of the terminal device shown in FIG. 2 does not constitute a limitation on the terminal device, and may include more or fewer components than shown in the figure, or combine some components, or arrange different components.
  • the processor 110 is the control center of the terminal device. It uses various interfaces and lines to connect the various parts of the entire terminal device, runs or executes software programs and/or modules stored in the memory 120, and calls data stored in the memory 120. , Perform various functions of the terminal equipment and process data, so as to monitor the terminal equipment as a whole.
  • the processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, application programs, etc. , The modem processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 110.
  • the memory 120 may be used to store software programs and modules.
  • the processor 110 executes various functional applications and data processing of the terminal device by running the software programs and modules stored in the memory 120.
  • the memory 120 may mainly include a program storage area and a data storage area.
  • the program storage area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.;
  • the data (such as audio data, phone book, etc.) created by the use of the terminal device, etc.
  • the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
  • the input unit 130 may be used to receive input digital or character information, and generate key signal input related to user settings and function control of the terminal device 100.
  • the input unit 130 may include a touch panel 131 and other input devices 132.
  • the touch panel 131 also known as a touch screen, can collect user touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc.) on the touch panel 131 or near the touch panel 131. Operation), and drive the corresponding connection device according to the preset program.
  • the touch panel 131 may include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the user's touch position, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it To the processor 110, and can receive and execute the commands sent by the processor 110.
  • the touch panel 131 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave.
  • the input unit 130 may also include other input devices 132.
  • the other input device 132 may include, but is not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackball, mouse, and joystick.
  • the display unit 140 may be used to display information input by the user or information provided to the user and various menus of the terminal device.
  • the display unit 140 may include a display panel 141.
  • the display panel 141 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.
  • the touch panel 131 can cover the display panel 141. When the touch panel 131 detects a touch operation on or near it, it transmits it to the processor 180 to determine the type of the touch event, and then the processor 110 responds to the touch event. The type provides corresponding visual output on the display panel 141.
  • the touch panel 131 and the display panel 141 are used as two independent components to realize the input and input functions of the terminal device, but in some embodiments, the touch panel 131 and the display panel 141 can be integrated And realize the input and output functions of terminal equipment.
  • the Bluetooth module 150 is used to implement the Bluetooth function of the terminal device.
  • the terminal device and the Bluetooth device perform Bluetooth communication through the Bluetooth module 150.
  • the audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the mobile phone.
  • the audio circuit 160 can transmit the electrical signal converted from the received audio data to the speaker 161, which is converted into a sound signal for output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, which is then output by the audio circuit 160. After being received, it is converted into audio data, and then processed by the audio data output processor 180, or the audio circuit 160 sends the audio data to the Bluetooth device through the Bluetooth module 150.
  • WiFi is a short-distance wireless transmission technology.
  • terminal devices can help users send and receive emails, browse web pages, and access streaming media. It provides users with wireless broadband Internet access.
  • FIG. 2 shows the WiFi module 170, it is understandable that it is not a necessary component of the terminal device, and can be omitted as needed without changing the essence of the invention.
  • the terminal device also includes a power supply 180 (such as a battery) for supplying power to various components.
  • a power supply 180 (such as a battery) for supplying power to various components.
  • the power supply can be logically connected to the processor 110 through a power management system, so that functions such as charging, discharging, and power management are realized through the power management system.
  • the Bluetooth device provided by the embodiment of the present application includes at least one processor 210, at least one memory 220, a wireless communication module 230, an audio module 240, a power module 250, an input/output interface 260, and the like.
  • the processor may include one or more interfaces for connecting with other components of the Bluetooth device.
  • the Bluetooth device is stored in the earphone box.
  • the memory 220 can be used to store program codes, such as for virtual connection or physical connection between a Bluetooth device and an electronic device, to switch the physical connection with the electronic device, and to process audio services of the electronic device (such as music playback, /Calling, etc.), as well as program codes for charging Bluetooth devices and wireless pairing and connection between Bluetooth devices and other electronic devices.
  • the memory 220 may also be used to store other information, such as the priority of the electronic device.
  • the processor 210 may be used to execute the above-mentioned application program code and call related modules to implement the functions of the Bluetooth device in the embodiment of the present application. For example, it realizes functions such as virtual connection or physical connection between a Bluetooth device and multiple electronic devices, audio playback, and making/receiving calls.
  • the processor 210 may include one or more processing units, and different processing units may be independent devices or integrated in one or more processors 210.
  • the processor 210 may specifically be an integrated control chip, or may be composed of a circuit including various active and/or passive components, and the circuit is configured to perform the functions belonging to the processor 210 described in the embodiments of the present application.
  • the wireless communication module 230 can be used to support wireless communication between Bluetooth devices and other electronic devices or headset boxes, including BT, WLAN (such as Wi-Fi), Zigbee, FM, NFC, IR, or general 2.4G/5G wireless communication technologies. Communication data exchange.
  • the wireless communication module 230 may be a Bluetooth chip.
  • the Bluetooth device can pair and establish a wireless connection with the Bluetooth chip of other electronic devices through the Bluetooth chip, so as to realize wireless communication and service processing between the Bluetooth device and other electronic devices through the wireless connection.
  • the wireless connection can be a physical connection or a virtual connection.
  • a Bluetooth chip can support basic rate (BR)/enhanced data rate (EDR) Bluetooth and BLE, for example, it can receive/send page information, receive/send BLE broadcast messages, and so on.
  • BR basic rate
  • EDR enhanced data rate
  • the wireless communication module 230 may further include an antenna, and the wireless communication module 230 receives electromagnetic waves via the antenna, modulates the frequency of the electromagnetic wave signals and performs filtering processing, and sends the processed signals to the processor 210.
  • the wireless communication module 230 may also receive the signal to be sent from the processor 210, perform frequency modulation, amplify, and convert it into electromagnetic waves to radiate through the antenna.
  • the audio module 240 may be used to manage audio data, and realize the input and output of audio signals by the Bluetooth device.
  • the audio module 240 can obtain audio signals from the wireless communication module 230, or transmit audio signals to the wireless communication module 230, so as to make calls, play music, turn on/off the voice assistant of the electronic device connected to the headset, and receive the audio signal through the Bluetooth headset. / Send the user's voice data and other functions.
  • the audio module 240 may include a speaker (or earpiece or receiver) component for outputting audio signals, a microphone (or a microphone, or microphone), a microphone radio circuit matched with the microphone, and the like.
  • the speaker can be used to convert audio electrical signals into sound signals and play them.
  • the microphone can be used to convert sound signals into audio electrical signals.
  • the power module 250 can be used to provide system power for the Bluetooth device, supply power to each module of the Bluetooth device, and support the Bluetooth device to receive charging input.
  • the power module 250 may include a power management unit (PMU) and a battery.
  • PMU power management unit
  • the power management unit can receive an external charging input; transform the electrical signal input from the charging circuit and provide it to the battery for charging, and can also transform the electrical signal provided by the battery and provide it to the audio module 240, the wireless communication module 230, etc. Module; and to prevent the battery from overcharging, overdischarging, short circuit or overcurrent, etc.
  • the power module 250 may further include a wireless charging coil for wireless charging of the Bluetooth device.
  • the power management unit can also be used to monitor battery capacity, battery cycle times, battery health status (leakage, impedance) and other parameters.
  • the multiple input/output interfaces 260 may be used to provide wired connections for charging or communication between the Bluetooth device and the earphone box.
  • the input/output interface may be a USB interface.
  • the input/output interface 260 may be a headset electrical connector.
  • the Bluetooth device can establish an electrical connection with the electrical connector in the headset box through the headset electrical connector, thereby Charge the battery in the Bluetooth device.
  • the Bluetooth device can also perform data communication with the headset box, for example, can receive a pairing instruction from the headset box.
  • the Bluetooth device may further include a sensor 270.
  • the sensor 270 may be a distance sensor or a proximity light sensor, which may be used to determine whether the Bluetooth device is worn by the user.
  • the Bluetooth device may use a distance sensor to detect whether there is an object near the Bluetooth device, so as to determine whether the Bluetooth device is worn by the user. When it is determined that the Bluetooth device is worn, the Bluetooth device can turn on the speaker.
  • the sensor 270 may also include a bone conduction sensor combined with a bone conduction earphone.
  • the Bluetooth device can obtain the vibration signal of the vibrating bone block of the human voice, analyze the voice signal, and realize the voice function, thereby receiving the user's voice command.
  • the Bluetooth device can also perform voice authentication based on the user's voice signal obtained by the bone conduction headset to authenticate the user's identity.
  • the senor 270 may also include: a touch sensor, used to detect user touch operations; a fingerprint sensor, used to detect user fingerprints, identify user identity, etc.; ambient light sensor, can be adaptive according to the brightness of the perceived ambient light Adjust some parameters (such as volume); and some other sensors.
  • a touch sensor used to detect user touch operations
  • a fingerprint sensor used to detect user fingerprints, identify user identity, etc.
  • ambient light sensor can be adaptive according to the brightness of the perceived ambient light Adjust some parameters (such as volume); and some other sensors.
  • the touch sensor can detect touch operations such as a single click, double click, multiple clicks, long press, and heavy pressing of the user, and can also perform user fingerprint recognition to authenticate the user's identity.
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the Bluetooth device. It may have more or fewer components than shown in FIG. 3, may combine two or more components, or may have a different component configuration.
  • the outer surface of the Bluetooth device can also include a button 280, indicator light (which can indicate the status of power, incoming/outgoing, pairing mode, etc.), a display screen (which can prompt the user for relevant information), and a dust-proof net (which can be used with the handset) ) And other components.
  • the button 280 may be a physical button or a touch button (used in conjunction with a touch sensor), etc., and is used to trigger operations such as power-on, power-off, pause, play, record, start pairing, and reset.
  • FIG. 3 may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing or application specific integrated circuits.
  • the terminal device obtains data sent by the Bluetooth device.
  • the data includes an application program identifier and an operation instruction.
  • the terminal device notifies the target application corresponding to the application program identifier to perform the operation corresponding to the operation instruction according to the application program identifier. So as to realize the control of the bluetooth device to the application program.
  • the terminal device 1 is a mobile phone
  • the Bluetooth device 2 is a Bluetooth speaker.
  • the Bluetooth speaker After the Bluetooth speaker is connected to the mobile phone via Bluetooth, it will play the audio played by the audio application on the mobile phone.
  • the user needs to collect the currently playing music, perform operations corresponding to the collection instructions on the Bluetooth speaker, for example, input voice, or perform touch operations on the display interface of the Bluetooth speaker, or press the button on the Bluetooth speaker, and the Bluetooth speaker will follow
  • the user operates to generate an application program identification and a collection instruction, and sends the collection instruction to the mobile phone, and the mobile phone controls the audio application corresponding to the application program identification to collect the currently playing music.
  • FIG. 4 shows another application scenario, as shown in FIG.
  • the terminal device 1 is a mobile phone
  • the Bluetooth device 2 is a Bluetooth bracelet.
  • the Bluetooth bracelet collects exercise data and sends the exercise data to the mobile phone.
  • the analysis result is sent to the Bluetooth bracelet for display.
  • the user needs to pause the exercise, perform the trigger button or voice input operation corresponding to the pause instruction on the Bluetooth bracelet.
  • the Bluetooth bracelet generates the application identifier and pause instruction according to the user's operation, sends the pause instruction to the mobile phone, and the mobile phone controls the application. Identifies the corresponding motion application program to pause the exercise.
  • the data processing method provided by the first embodiment of the present application includes:
  • the terminal device establishes a first communication link with the Bluetooth device based on the RFCOMM protocol.
  • the Bluetooth module of the terminal device can find nearby Bluetooth devices, display a list of Bluetooth devices to be paired on the display interface, and pair with the designated Bluetooth device according to the user's selection, thereby according to the predefined
  • the protocol establishes a communication link with the Bluetooth device.
  • the terminal device and the Bluetooth device establish a socket channel through a serial port simulation protocol (Radio Frequency Communication, RFCOMM).
  • RFCOMM Radio Frequency Communication
  • the Bluetooth device After receiving the predetermined information, the Bluetooth device determines data corresponding to the predetermined information, and the data includes an application program identifier and an operation instruction.
  • the predetermined information includes information triggered by a predetermined button, information triggered by a predetermined touch operation, or a predetermined voice instruction. Operation instructions can be stop, play, volume control, collection, etc.
  • the application program is identified as Application Programming Interface (API). There are multiple applications installed on the terminal device, for example, calendar, camera, audio, video, navigation, gallery, call and other applications, each application corresponds to one API.
  • the Bluetooth device After receiving the predetermined information, the Bluetooth device determines the operation instruction according to the preset correspondence relationship between the predetermined information and the operation instruction, and determines the application identifier according to the application identifier associated with the predetermined information. For example, the "pause" button on the Bluetooth headset is associated with the current audio application, the user presses the "pause” button on the Bluetooth headset, the Bluetooth headset generates the key value corresponding to the "pause” button, and the key corresponding to the "pause” button The value is the pause instruction and the application ID of the current audio application.
  • the "favorite” button on the Bluetooth speaker is associated with the current audio application
  • the key value is the favorite instruction and the application identifier of the current audio application.
  • the application associated with the predetermined information needs to be set in advance.
  • the Bluetooth speaker APP is installed on the mobile phone, and the "Collection" button is set on the Bluetooth speaker APP to associate with QQ Music, or the selection button on the Bluetooth speaker is set”
  • the application associated with the "Favorite” button is associated with the current audio application
  • the corresponding relationship between the predetermined information and the operation instruction can be arbitrarily set, which is not limited in this application.
  • the trigger button corresponds to the collection operation instruction
  • the trigger touch panel corresponds to the playback operation instruction.
  • the Bluetooth device sends the data to the terminal device through the first communication link.
  • the Bluetooth device encapsulates the operation instruction and the application program identifier, and sends the encapsulated data to the terminal device through the socket channel.
  • the Bluetooth device is a Bluetooth speaker
  • the terminal device is a mobile phone
  • the music played by an audio application on the mobile phone is played through the Bluetooth speaker.
  • the "favorite” button is associated with the audio application currently running on the terminal device.
  • the Bluetooth speaker encapsulates the key value corresponding to the "favorite” button and passes it
  • the socket port is sent to the mobile phone, and the key value corresponding to the "favorite” button is used to indicate the favorite operation instruction and the identification of the currently running audio application program.
  • the terminal device sends the data sent by the Bluetooth device to the target application in a broadcast manner.
  • the data sent by the Bluetooth device is sent to the target application through the second communication link, and the second communication link is different from the first communication link.
  • the terminal device parses out the application program identifier and the operation instruction, and broadcasts at the application layer according to the analyzed application program identifier.
  • Each application on the terminal device can receive the broadcast, but only the target application receives the operation instruction.
  • the target application executes the corresponding operation according to the operation instruction.
  • the audio application is running on the terminal device, and the music played by the audio application is played through the Bluetooth speaker, which is the "ordinary road" that the audio application is currently playing.
  • the operation instruction sent by the Bluetooth device is a collection operation instruction, and the application program is identified as the API of the current audio application.
  • the terminal device broadcasts at the application layer
  • the current audio application responds to the application layer broadcast and receives the collection instruction.
  • the currently playing music "Ordinary Road” displays the collection logo, and the collection is successful.
  • the target application program needs to be installed on the terminal device to execute the corresponding operation instruction. If the target application program corresponding to the application program identifier is not installed on the terminal device, no application program receives the operation instruction. For example, if the audio playback application corresponding to the application identifier is not installed on the terminal device, when the Bluetooth device sends a collection instruction, the collection is unsuccessful.
  • the application program corresponding to the application program identifier on the mobile phone may also be in a non-running state.
  • the application identifier corresponding to the Bluetooth data broadcasted by the application layer is the API of QQ Music, and QQ Music is not currently running, after QQ Music receives the collection operation command sent by the Bluetooth module, it will collect the most recently played music of QQ Music. The next time you open QQ Music, the most recently played music will be displayed in the favorite list.
  • the Bluetooth speaker is provided with a "play favorite list” button, and the "play favorite list” button is associated with the application ID.
  • the Bluetooth speaker encapsulates the corresponding key value.
  • the encapsulated data is sent to the mobile phone.
  • the mobile phone After the mobile phone receives the data sent by the Bluetooth device, it parses out the play favorite list operation instruction and the application program identifier, broadcasts at the application layer, and the target application corresponding to the application identifier receives the play favorite list Operating instructions. If the current application is not running, run the application and play the last played music in the favorites list.
  • the last played music in the favorites list is "Ordinary Road”
  • the application will accept After the operation instruction to play the favorite list, play "Ordinary Road”. If the current application is running, the last played music in the favorite list will be played directly.
  • the terminal device After the terminal device obtains the data sent by the Bluetooth device, it parses out the application identifier and operation instruction, broadcasts at the application layer according to the application identifier, and the target application corresponding to the application identifier executes the operation corresponding to the operation instruction. In this way, the Bluetooth device can control the application program on the terminal device.
  • the data processing method provided by the second embodiment of the present application includes:
  • the terminal device establishes a first communication link with the Bluetooth device based on the AVRCP protocol.
  • the Bluetooth device and the Bluetooth module establish a communication link through the Audio/Video Remote Control Profile (AVRCP).
  • AVRCP Audio/Video Remote Control Profile
  • the Bluetooth device After receiving the predetermined information, the Bluetooth device determines data corresponding to the predetermined information, and the data includes an application program identifier and an operation instruction.
  • S202 is the same as S201, and will not be repeated here.
  • the Bluetooth device sends the data to the terminal device through the first communication link.
  • the Bluetooth device is provided with a button, the button is associated with the application ID, when the button is triggered, the key value corresponding to the button is encapsulated as an AVRCP data packet, and the encapsulated AVRCP data packet is sent to Terminal equipment, where the key value is used to indicate operation instructions and application program identification.
  • the terminal device after receiving the data sent by the Bluetooth device, the terminal device replies to the Bluetooth device whether the reception is successful, for example, replying to the corresponding confirmation character (Acknowledge character, ACK character) through the AVRCP protocol.
  • the Bluetooth device parses the confirmation character, and if the data is not sent successfully, it will remind the user to resend it.
  • the terminal device After the terminal device receives the data sent by the Bluetooth device, it parses out the application identifier and operation, first searches for the target application according to the application identifier, if the target application corresponding to the application identifier is searched , Send the successful search information to the Bluetooth device, the Bluetooth device can send out a voice reminder to remind the user to search for the application.
  • the terminal device After the terminal device searches for the application, it sends the operation instruction to the application. If the application is running, the application executes the corresponding operation according to the operation instruction, such as collecting the currently playing music, playing the music in the favorite list, and pausing the music. Wait. If the application program is not running, the terminal device first runs the application program, and the application program performs corresponding operations according to the operating instructions, for example, collecting the most recently played music and playing the most recently played music in the favorite list.
  • the terminal device if it does not search for the corresponding application according to the application identifier, it returns the search unsuccessful information to the Bluetooth device. For example, the terminal device sends the unsuccessful search information to the Bluetooth device through the AVRCP protocol. Bluetooth device, after receiving the message that the search is unsuccessful, the Bluetooth device sends out a voice reminder to remind the user that the terminal device has not installed the application or the network is faulty.
  • the data sent by the Bluetooth device also includes identity authentication information.
  • the user can input the identity authentication information of the application program on the Bluetooth device by inputting the account number or voice input.
  • the Bluetooth device encapsulates the received identity authentication information and key value into an AVRCP data packet, and the encapsulated AVRCP data packet Send to the terminal device.
  • the terminal device After receiving the AVRCP data packet, the terminal device first detects whether it includes the predefined key value, and if it includes the key value, the identity authentication information is transparently transmitted to the application.
  • the Bluetooth device encapsulates the identity authentication information and key value entered by the user into an AVRCP data packet, and sends the encapsulated AVRCP data packet to the terminal device .
  • the terminal device After receiving the AVRCP data packet, the terminal device detects whether it includes a predefined key value. If it includes a predefined key value, it parses out the operation instruction and application ID corresponding to the key value, and transparently transmits the identity authentication information to the corresponding application ID The target application.
  • the target application sends the identity authentication information to the server through the WiFi module, and the server authenticates the identity authentication information, and sends the authentication result to the target application.
  • the target application feeds back the authentication failure information to the terminal device in the form of a broadcast packet, and the terminal device constructs an AVRCP message according to the authentication failure information, and sends the AVRCP message to the Bluetooth device.
  • the Bluetooth device parses out the authentication failure information corresponding to the AVRCP message, and reminds the user that the identity authentication has failed.
  • S205 is the same as S105, which will not be repeated here.
  • the terminal device constructs an AVRCP message corresponding to the operation completion information, and sends the AVRCP message corresponding to the operation completion information to the Bluetooth device.
  • the operation completion information is fed back to the terminal device in the form of a broadcast packet, where the operation completion information includes whether the operation instruction is successfully executed.
  • the terminal device generates an AVRCP message according to the received broadcast packet, and then sends the generated AVRCP message to the Bluetooth device.
  • the Bluetooth device recognizes the received AVRCP message and sends out a corresponding voice reminder according to the recognition result.
  • the operation instruction sent by Bluetooth data is to collect music to be played.
  • the application receives the operation instruction and executes the collection operation according to the operation instruction, it generates a broadcast packet of the preset format from the successful collection information, and then The broadcast packet is sent to the terminal device, and the terminal device generates an AVRCP message from the received broadcast package, and then sends the AVRCP message to the Bluetooth device.
  • the Bluetooth device recognizes the successful collection information based on the received AVRCP message, and voice reminds the user to save success.
  • the terminal device After the terminal device obtains the Bluetooth data sent by the Bluetooth device, it parses out the application identifier and operation instructions. If the target application corresponding to the application identifier is searched, the Bluetooth data is transmitted to the target application, indicating the target application The program executes the operation corresponding to the operation instruction, so as to realize the control of the application program by the Bluetooth device.
  • FIG. 11 shows a structural block diagram of a data processing system provided in an embodiment of the present application. For ease of description, only parts related to the embodiment of the present application are shown.
  • the terminal device 1 includes:
  • the receiving module 10 is configured to receive data sent by the Bluetooth device through the first communication link, the data including an application program identifier and an operation instruction;
  • the execution module 20 is configured to notify the target application corresponding to the application identifier to execute the operation corresponding to the operation instruction through the second communication link, wherein the target application is installed on the terminal device.
  • the execution module 20 is specifically configured to:
  • the terminal device notifies the target application corresponding to the application identifier to execute the operation corresponding to the operation instruction in a broadcast manner.
  • the first communication link is established based on the RFCOMM protocol.
  • the execution module 20 is specifically configured to:
  • the terminal device searches for the target application corresponding to the application identifier, notify the target application to perform the operation corresponding to the operation instruction.
  • the first communication link is established based on the AVRCP protocol.
  • the terminal device further includes a sending module, and the sending module is configured to:
  • the target application After the target application completes the operation corresponding to the operation instruction, constructs an AVRCP message corresponding to the operation completion information, and sends the AVRCP message corresponding to the operation completion information to the Bluetooth device.
  • the data sent by the Bluetooth device includes a key value constructed in advance by the Bluetooth device, and the key value is used to indicate an application program identifier and an operation instruction.
  • the data sent by the Bluetooth device further includes identity authentication information of the target application.
  • the operation instruction includes collecting music or playing collected music.
  • Bluetooth device 2 includes,
  • the determining module 30 is configured to determine data corresponding to the predetermined information after receiving the predetermined information, the data including an application program identifier and an operation instruction;
  • the sending module 40 is configured to send the data to the terminal device through the first communication link, so as to instruct the terminal device to notify the target application corresponding to the application identifier through the second communication link to execute the corresponding operation instruction. Operation.
  • the first communication link is established based on the RFCOMM protocol.
  • the first communication link is established based on the AVRCP protocol.
  • the data sent by the Bluetooth device includes a key value constructed by the Bluetooth device according to the predetermined information, and the key value is used to indicate an application program identifier and an operation instruction.
  • the Bluetooth device further includes an acquisition module, and the acquisition module is configured to:
  • AVRCP message sent by the terminal device, where the AVRCP message is constructed based on operation completion information after the target application has executed the operation instruction.
  • the Bluetooth device further includes an acquisition module identification module, and the identification module is configured to:
  • the predetermined information includes information triggered by a predetermined button, information triggered by a predetermined touch operation, or a predetermined voice instruction.
  • the disclosed device/terminal device and method may be implemented in other ways.
  • the device/terminal device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units.
  • components can be combined or integrated into another system, or some features can be omitted or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated module/unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the present application implements all or part of the processes in the above-mentioned embodiments and methods, and can also be completed by instructing relevant hardware through a computer program.
  • the computer program can be stored in a computer-readable storage medium. When the program is executed by the processor, it can implement the steps of the foregoing method embodiments.
  • the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signal, telecommunications signal, and software distribution media, etc.

Abstract

The present application is applicable to the technical field of communications, and provides a data processing method, a terminal device, a Bluetooth device, and a storage medium. The data processing method comprises: a terminal device receives data sent by a Bluetooth device by means of a first communication link, the data comprising an application program identifier and an operation instruction; and the terminal device instructs, by means of a second communication link, a target application program corresponding to the application program identifier to perform an operation corresponding to the operation instruction, wherein the target application program is installed on the terminal device. According to embodiments of the present application, the Bluetooth device can control the application program on a terminal.

Description

数据处理方法、终端设备、蓝牙设备及存储介质Data processing method, terminal device, bluetooth device and storage medium
本申请要求于2019年12月14日提交国家知识产权局、申请号为201911287182.4、申请名称为“数据处理方法、终端设备、蓝牙设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the State Intellectual Property Office, the application number is 201911287182.4, and the application name is "data processing method, terminal equipment, Bluetooth device and storage medium" on December 14, 2019, and all of its contents are passed The reference is incorporated in this application.
技术领域Technical field
本申请属于通信技术领域,尤其涉及数据处理方法、终端设备、蓝牙设备及存储介质。This application belongs to the field of communication technology, and particularly relates to data processing methods, terminal devices, Bluetooth devices, and storage media.
背景技术Background technique
现有的蓝牙设备一般用于响应终端设备上应用程序的指令,进行音频播放,若用户需要对应用程序进行操作,需要在终端设备上打开应用程序才能实现,在用户不方便使用终端设备的情况下,操作不便。Existing Bluetooth devices are generally used to respond to the instructions of the application program on the terminal device to perform audio playback. If the user needs to operate the application program, the application program needs to be opened on the terminal device to achieve this. In the case where the user is inconvenient to use the terminal device The operation is inconvenient.
发明内容Summary of the invention
有鉴于此,本申请实施例提供了数据处理方法、终端设备、蓝牙设备及存储介质,可以实现通过蓝牙设备对终端设备上应用程序的操作。In view of this, the embodiments of the present application provide a data processing method, a terminal device, a Bluetooth device, and a storage medium, which can realize the operation of the application program on the terminal device through the Bluetooth device.
本申请实施例的第一方面提供了一种数据处理方法,应用于终端设备,所述数据处理方法包括:The first aspect of the embodiments of the present application provides a data processing method, which is applied to a terminal device, and the data processing method includes:
所述终端设备接收蓝牙设备通过第一通信链路发送的数据,所述数据包括应用程序标识以及操作指令;The terminal device receives data sent by the Bluetooth device through the first communication link, and the data includes an application program identifier and an operation instruction;
所述终端设备通过第二通信链路通知所述应用程序标识对应的目标应用程序执行所述操作指令对应的操作,其中,所述目标应用程序安装于所述终端设备上。The terminal device notifies the target application corresponding to the application identifier to perform the operation corresponding to the operation instruction through the second communication link, wherein the target application is installed on the terminal device.
本申请实施例中,终端设备通过第一通信链路获取蓝牙设备发送的数据,通过第二通信链路通知应用程序标识对应的目标应用程序执行操作指令对应的操作,从而实现蓝牙设备对终端设备上的应用程序的控制。In the embodiment of the present application, the terminal device obtains the data sent by the Bluetooth device through the first communication link, and notifies the target application corresponding to the application identifier to perform the operation corresponding to the operation instruction through the second communication link, thereby realizing the Bluetooth device to the terminal device Control on the application.
示例性地,当所述目标应用程序为音乐类应用程序时,所述操作指令包括收藏音乐或者播放收藏的音乐。Exemplarily, when the target application is a music application, the operation instruction includes collecting music or playing collected music.
在一种可能的实现方式中,所述第一通信链路是基于RFCOMM协议建立的。所述终端设备通过第二通信链路通知所述应用程序标识对应的目标应用程序执行所述操作指令对应的操作,包括:所述终端设备通过广播的方式通知所述应用程序标识对应的目标应用程序执行所述操作指令对应的操作。In a possible implementation manner, the first communication link is established based on the RFCOMM protocol. The terminal device notifying the target application corresponding to the application identifier to perform the operation corresponding to the operation instruction through the second communication link includes: the terminal device notifying the target application corresponding to the application identifier by broadcasting The program executes the operation corresponding to the operation instruction.
具体地,终端设备基于RFCOMM协议与蓝牙设备建立socket通道,接收蓝牙设备发送的数据,然后终端设备在应用层广播应用程序的标识及操作指令,终端设备上安装的所有应用程序均可以接收到广播,与应用程序的标识对应的目标应用程序执行操作指令,从而实现蓝牙设备对应用程序的控制。Specifically, the terminal device establishes a socket channel with the Bluetooth device based on the RFCOMM protocol, receives data sent by the Bluetooth device, and then the terminal device broadcasts the identification and operation instructions of the application at the application layer, and all applications installed on the terminal device can receive the broadcast , The target application program corresponding to the application program identifier executes the operation instruction, so as to realize the control of the application program by the Bluetooth device.
在另一种可能的实现方式中,所述第一通信链路是基于AVRCP协议建立的。所 述终端设备通过第二通信链路通知所述应用程序标识对应的目标应用程序执行所述操作指令对应的操作,包括:若所述终端设备搜索到所述应用程序标识对应的目标应用程序,通知所述目标应用程序执行所述操作指令对应的操作。In another possible implementation manner, the first communication link is established based on the AVRCP protocol. The terminal device notifying the target application corresponding to the application identifier to perform the operation corresponding to the operation instruction through the second communication link includes: if the terminal device searches for the target application corresponding to the application identifier, Notifying the target application to execute the operation corresponding to the operation instruction.
具体地,终端设备通过AVRCP协议接收蓝牙设备发送的数据,根据应用程序标识搜索安装的应用程序,若搜索出目标应用程序,将操作指令发送至目标应用程序,从而使目标应用程序执行操作指令对应的操作。Specifically, the terminal device receives the data sent by the Bluetooth device through the AVRCP protocol, searches for the installed application according to the application identifier, and if the target application is found, the operation instruction is sent to the target application, so that the target application executes the corresponding operation instruction Operation.
在一种可能的实现方式中,在所述终端设备通过第二通信链路通知所述应用程序标识对应的目标应用程序执行所述操作指令对应的操作之后,所述数据处理方法还包括:在所述目标应用程序执行完所述操作指令对应的操作后,所述终端设备构建与操作完成信息对应的AVRCP报文,将所述与操作完成信息对应的AVRCP报文发送至所述蓝牙设备,从而实现终端设备与蓝牙设备的双向通信,蓝牙设备可以根据操作完成信息生成对应的提示信息,以提醒用户应用程序的操作完成情况。In a possible implementation manner, after the terminal device notifies the target application corresponding to the application identifier to perform the operation corresponding to the operation instruction through the second communication link, the data processing method further includes: After the target application completes the operation corresponding to the operation instruction, the terminal device constructs an AVRCP message corresponding to the operation completion information, and sends the AVRCP message corresponding to the operation completion information to the Bluetooth device, In this way, the two-way communication between the terminal device and the Bluetooth device is realized, and the Bluetooth device can generate corresponding prompt information according to the operation completion information to remind the user of the completion of the operation of the application program.
在一种可能的实现方式中,所述蓝牙设备发送的数据包括所述蓝牙设备预先构建的键值,所述键值用于指示应用程序标识以及操作指令。In a possible implementation manner, the data sent by the Bluetooth device includes a key value constructed in advance by the Bluetooth device, and the key value is used to indicate an application program identifier and an operation instruction.
在一种可能的实现方式中,所述蓝牙设备发送的数据还包括目标应用程序的身份认证信息。具体地,蓝牙设备将键值和用户输入的身份认证信息通过AVRCP协议发送至终端设备,终端设备检测到键值后,将身份认证信息透传至目标应用程序,用户可以通过蓝牙设备登录应用程序。In a possible implementation manner, the data sent by the Bluetooth device further includes identity authentication information of the target application. Specifically, the Bluetooth device sends the key value and the identity authentication information entered by the user to the terminal device through the AVRCP protocol. After the terminal device detects the key value, it transparently transmits the identity authentication information to the target application, and the user can log in to the application through the Bluetooth device. .
本申请实施例的第二方面提供了一种数据处理方法,应用于蓝牙设备,所述数据处理方法包括:The second aspect of the embodiments of the present application provides a data processing method, which is applied to a Bluetooth device, and the data processing method includes:
所述蓝牙设备在接收到预定信息后,确定所述预定信息对应的数据,所述数据包括应用程序标识以及操作指令;After receiving the predetermined information, the Bluetooth device determines data corresponding to the predetermined information, and the data includes an application program identifier and an operation instruction;
所述蓝牙设备通过第一通信链路将所述数据发送至终端设备,以指示所述终端设备通过第二通信链路通知所述应用程序标识对应的目标应用程序执行所述操作指令对应的操作,其中,所述目标应用程序安装于所述终端设备上。The Bluetooth device sends the data to the terminal device via the first communication link to instruct the terminal device to notify the target application corresponding to the application identifier to perform the operation corresponding to the operation instruction via the second communication link , Wherein the target application is installed on the terminal device.
在一种可能的实现方式中,所述第一通信链路是基于RFCOMM协议建立的。In a possible implementation manner, the first communication link is established based on the RFCOMM protocol.
在一种可能的实现方式中,所述第一通信链路是基于AVRCP协议建立的。In a possible implementation manner, the first communication link is established based on the AVRCP protocol.
在一种可能的实现方式中,所述蓝牙设备发送的数据包括所述蓝牙设备根据所述预定信息构建的键值,所述键值用于指示应用程序标识以及操作指令。In a possible implementation manner, the data sent by the Bluetooth device includes a key value constructed by the Bluetooth device according to the predetermined information, and the key value is used to indicate an application program identifier and an operation instruction.
在一种可能的实现方式中,在所述蓝牙设备通过第一通信链路将所述数据发送至终端设备之后,所述数据处理方法还包括:In a possible implementation manner, after the Bluetooth device sends the data to the terminal device through the first communication link, the data processing method further includes:
所述蓝牙设备获取所述终端设备发送的AVRCP报文,其中,所述AVRCP报文是基于所述目标应用程序执行完所述操作指令后的操作完成信息构建的。The Bluetooth device obtains the AVRCP message sent by the terminal device, where the AVRCP message is constructed based on operation completion information after the target application has executed the operation instruction.
在一种可能的实现方式中,在所述蓝牙设备获取所述终端设备发送的AVRCP报文之后,所述数据处理方法还包括:In a possible implementation manner, after the Bluetooth device obtains the AVRCP message sent by the terminal device, the data processing method further includes:
所述蓝牙设备识别所述AVRCP报文,根据所述AVRCP报文生成与所述操作完成信息对应的提示信息。The Bluetooth device recognizes the AVRCP message, and generates prompt information corresponding to the operation completion information according to the AVRCP message.
在一种可能的实现方式中,所述预定信息包括预定按键触发的信息、预定触摸操作触发的信息或预定的语音指令。In a possible implementation manner, the predetermined information includes information triggered by a predetermined button, information triggered by a predetermined touch operation, or a predetermined voice instruction.
本申请实施例的第三方面提供了一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上述第一方面所述的数据处理方法的步骤。The third aspect of the embodiments of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, The steps of the data processing method as described in the above first aspect are implemented.
本申请实施例的第四方面提供了一种蓝牙设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如上述第二方面所述的数据处理方法的步骤。The fourth aspect of the embodiments of the present application provides a Bluetooth device, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, The steps of the data processing method as described in the above second aspect are implemented.
本申请实施例的第五方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如上述第一方面所述的数据处理方法或第二方面所述的数据处理方法的步骤。The fifth aspect of the embodiments of the present application provides a computer-readable storage medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the data processing as described in the first aspect is realized. The method or the steps of the data processing method described in the second aspect.
本申请实施例的第六方面提供了一种计算机程序产品,当计算机程序产品在终端设备上运行时,使得终端设备执行上述第一方面所述的数据处理方法或第二方面所述的数据处理方法的步骤。The sixth aspect of the embodiments of the present application provides a computer program product, which when the computer program product runs on a terminal device, causes the terminal device to execute the data processing method described in the first aspect or the data processing described in the second aspect. Method steps.
可以理解的是,上述第二方面至第六方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。It is understandable that the beneficial effects of the second aspect to the sixth aspect can be referred to the related description in the first aspect, and will not be repeated here.
附图说明Description of the drawings
图1是本申请实施例提供的数据处理系统的示意图;Fig. 1 is a schematic diagram of a data processing system provided by an embodiment of the present application;
图2是本申请实施例提供的终端设备的内部结构示意图;FIG. 2 is a schematic diagram of the internal structure of a terminal device provided by an embodiment of the present application;
图3是本申请实施例提供的蓝牙设备的内部结构示意图;FIG. 3 is a schematic diagram of the internal structure of a Bluetooth device provided by an embodiment of the present application;
图4是本申请实施例提供的数据处理方法的一种应用场景图;FIG. 4 is an application scenario diagram of the data processing method provided by an embodiment of the present application;
图5是本申请实施例提供的数据处理方法的另一种应用场景图;FIG. 5 is another application scenario diagram of the data processing method provided by an embodiment of the present application;
图6是本申请第一实施例提供的数据处理方法的实现流程示意图;FIG. 6 is a schematic diagram of the implementation process of the data processing method provided by the first embodiment of the present application;
图7是本申请实施例提供的数据处理方法的另一种应用场景图;FIG. 7 is a diagram of another application scenario of the data processing method provided by an embodiment of the present application;
图8是本申请实施例提供的数据处理方法的另一种应用场景图;FIG. 8 is another application scenario diagram of the data processing method provided by an embodiment of the present application;
图9是本申请实施例提供的数据处理方法的另一种应用场景图;FIG. 9 is another application scenario diagram of the data processing method provided by an embodiment of the present application;
图10是本申请第二实施例提供的数据处理方法的实现流程示意图;10 is a schematic diagram of the implementation process of the data processing method provided by the second embodiment of the present application;
图11是本申请实施例提供的数据处理系统的结构框图。Fig. 11 is a structural block diagram of a data processing system provided by an embodiment of the present application.
具体实施方式Detailed ways
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, for the purpose of illustration rather than limitation, specific details such as a specific system structure and technology are proposed for a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from obstructing the description of this application.
为了说明本申请所述的技术方案,下面通过具体实施例来进行说明。In order to illustrate the technical solutions described in the present application, specific embodiments are used for description below.
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the existence of the described features, wholes, steps, operations, elements and/or components, but does not exclude one or more other features , The existence or addition of a whole, a step, an operation, an element, a component, and/or a collection thereof.
还应当理解,在此本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。如在本申请说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。It should also be understood that the terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in the specification of this application and the appended claims, unless the context clearly indicates other circumstances, the singular forms "a", "an" and "the" are intended to include plural forms.
还应当进一步理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It should be further understood that the term "and/or" used in the specification and appended claims of this application refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations .
如在本说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "once" or "in response to determination" or "in response to detection" depending on the context . Similarly, the phrase "if determined" or "if detected [described condition or event]" can be interpreted as meaning "once determined" or "in response to determination" or "once detected [described condition or event]" depending on the context ]" or "in response to detection of [condition or event described]".
另外,在本申请的描述中,术语“第一”、“第二”、“第三”等仅用于区分描述,而不能理解为指示或暗示相对重要性。In addition, in the description of this application, the terms "first", "second", "third", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
如图1所示,为本申请实施例提供的数据处理方法的应用场景图,本申请实施例提供的数据处理方法应用于数据处理系统,数据处理系统包括终端设备1和蓝牙设备2,终端设备1和蓝牙设备2通过无线网络进行通信。As shown in Figure 1, the application scenario diagram of the data processing method provided in this embodiment of the application is applied to a data processing system. The data processing system includes a terminal device 1 and a Bluetooth device 2. The terminal device 1 and Bluetooth device 2 communicate through a wireless network.
其中,蓝牙设备可以为蓝牙音箱、蓝牙耳机、蓝牙手环等支持蓝牙通信协议的智能设备。终端设备可以为手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等,终端设备支持蓝牙通信协议,本申请实施例对终端设备的具体类型不作任何限制。Among them, the bluetooth device can be a bluetooth speaker, bluetooth headset, bluetooth bracelet and other smart devices supporting the bluetooth communication protocol. Terminal devices can be mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR)/virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs) ), netbooks, personal digital assistants (personal digital assistants, PDAs), etc. The terminal devices support the Bluetooth communication protocol, and the embodiments of the present application do not impose any restrictions on the specific types of terminal devices.
下面对本申请实施例提供的终端设备1和蓝牙设备2的内部结构进行说明。The internal structure of the terminal device 1 and the Bluetooth device 2 provided in the embodiment of the present application will be described below.
示例性地,如图2所示,本申请实施例提供的终端设备1包括:至少一个处理器110、至少一个存储器120、输入单元130、显示单元140、蓝牙模块150、音频电路160、无线保真(wireless fidelity,WiFi)模块170以及电源180等部件。本领域技术人员可以理解,图2中示出的终端设备结构并不构成对终端设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Exemplarily, as shown in FIG. 2, the terminal device 1 provided in the embodiment of the present application includes: at least one processor 110, at least one memory 120, an input unit 130, a display unit 140, a Bluetooth module 150, an audio circuit 160, and a wireless security Components such as a wireless fidelity (WiFi) module 170 and a power supply 180. Those skilled in the art can understand that the structure of the terminal device shown in FIG. 2 does not constitute a limitation on the terminal device, and may include more or fewer components than shown in the figure, or combine some components, or arrange different components.
下面结合图2对终端设备的各个构成部件进行具体的介绍:The following describes each component of the terminal device in detail with reference to Figure 2:
处理器110是终端设备的控制中心,利用各种接口和线路连接整个终端设备的各个部分,通过运行或执行存储在存储器120内的软件程序和/或模块,以及调用存储在存储器120内的数据,执行终端设备的各种功能和处理数据,从而对终端设备进行整体监控。可选的,处理器110可包括一个或多个处理单元;优选的,处理器110可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器110中。The processor 110 is the control center of the terminal device. It uses various interfaces and lines to connect the various parts of the entire terminal device, runs or executes software programs and/or modules stored in the memory 120, and calls data stored in the memory 120. , Perform various functions of the terminal equipment and process data, so as to monitor the terminal equipment as a whole. Optionally, the processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, application programs, etc. , The modem processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 110.
存储器120可用于存储软件程序以及模块,处理器110通过运行存储在存储器120的软件程序以及模块,从而执行终端设备的各种功能应用以及数据处理。存储器120可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据终端设备的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器120可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 120 may be used to store software programs and modules. The processor 110 executes various functional applications and data processing of the terminal device by running the software programs and modules stored in the memory 120. The memory 120 may mainly include a program storage area and a data storage area. The program storage area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; The data (such as audio data, phone book, etc.) created by the use of the terminal device, etc. In addition, the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
输入单元130可用于接收输入的数字或字符信息,以及产生与终端设备100的用户设置以及功能控制有关的键信号输入。具体地,输入单元130可包括触控面板131以及其他输入设备132。触控面板131,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板131上或在触控面板131附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板131可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器110,并能接收处理器110发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板131。除了触控面板131,输入单元130还可以包括其他输入设备132。具体地,其他输入设备132可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 130 may be used to receive input digital or character information, and generate key signal input related to user settings and function control of the terminal device 100. Specifically, the input unit 130 may include a touch panel 131 and other input devices 132. The touch panel 131, also known as a touch screen, can collect user touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc.) on the touch panel 131 or near the touch panel 131. Operation), and drive the corresponding connection device according to the preset program. Optionally, the touch panel 131 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch position, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it To the processor 110, and can receive and execute the commands sent by the processor 110. In addition, the touch panel 131 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 131, the input unit 130 may also include other input devices 132. Specifically, the other input device 132 may include, but is not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackball, mouse, and joystick.
显示单元140可用于显示由用户输入的信息或提供给用户的信息以及终端设备的各种菜单。显示单元140可包括显示面板141,可选的,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板141。进一步的,触控面板131可覆盖显示面板141,当触控面板131检测到在其上或附近的触摸操作后,传送给处理器180以确定触摸事件的类型,随后处理器110根据触摸事件的类型在显示面板141上提供相应的视觉输出。虽然在图2中,触控面板131与显示面板141是作为两个独立的部件来实现终端设备的输入和输入功能,但是在某些实施例中,可以将触控面板131与显示面板141集成而实现终端设备的输入和输出功能。The display unit 140 may be used to display information input by the user or information provided to the user and various menus of the terminal device. The display unit 140 may include a display panel 141. Optionally, the display panel 141 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 131 can cover the display panel 141. When the touch panel 131 detects a touch operation on or near it, it transmits it to the processor 180 to determine the type of the touch event, and then the processor 110 responds to the touch event. The type provides corresponding visual output on the display panel 141. Although in FIG. 2, the touch panel 131 and the display panel 141 are used as two independent components to realize the input and input functions of the terminal device, but in some embodiments, the touch panel 131 and the display panel 141 can be integrated And realize the input and output functions of terminal equipment.
蓝牙模块150用于实现终端设备的蓝牙功能,例如,终端设备与蓝牙设备通过蓝牙模块150进行蓝牙通信。The Bluetooth module 150 is used to implement the Bluetooth function of the terminal device. For example, the terminal device and the Bluetooth device perform Bluetooth communication through the Bluetooth module 150.
音频电路160、扬声器161,传声器162可提供用户与手机之间的音频接口。音频电路160可将接收到的音频数据转换后的电信号,传输到扬声器161,由扬声器161转换为声音信号输出;另一方面,传声器162将收集的声音信号转换为电信号,由音频电路160接收后转换为音频数据,再将音频数据输出处理器180处理,或者音频电路160将音频数据通过蓝牙模块150发送至蓝牙设备。The audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the mobile phone. The audio circuit 160 can transmit the electrical signal converted from the received audio data to the speaker 161, which is converted into a sound signal for output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, which is then output by the audio circuit 160. After being received, it is converted into audio data, and then processed by the audio data output processor 180, or the audio circuit 160 sends the audio data to the Bluetooth device through the Bluetooth module 150.
WiFi属于短距离无线传输技术,终端设备通过WiFi模块170可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图2示出了WiFi模块170,但是可以理解的是,其并不属于终端设备的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。WiFi is a short-distance wireless transmission technology. Through the WiFi module 170, terminal devices can help users send and receive emails, browse web pages, and access streaming media. It provides users with wireless broadband Internet access. Although FIG. 2 shows the WiFi module 170, it is understandable that it is not a necessary component of the terminal device, and can be omitted as needed without changing the essence of the invention.
终端设备还包括给各个部件供电的电源180(比如电池),优选的,电源可以通过电源管理系统与处理器110逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The terminal device also includes a power supply 180 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 110 through a power management system, so that functions such as charging, discharging, and power management are realized through the power management system.
示例性地,如图3所示,本申请实施例提供的蓝牙设备包括至少一个处理器210、至少一个存储器220、无线通信模块230、音频模块240、电源模块250以及输入/输出接口260等。该处理器可以包括一个或多个接口,用于与蓝牙设备的其他部件相连。该蓝牙设备通过耳机盒进行收纳。Exemplarily, as shown in FIG. 3, the Bluetooth device provided by the embodiment of the present application includes at least one processor 210, at least one memory 220, a wireless communication module 230, an audio module 240, a power module 250, an input/output interface 260, and the like. The processor may include one or more interfaces for connecting with other components of the Bluetooth device. The Bluetooth device is stored in the earphone box.
其中,存储器220可以用于存储程序代码,如用于蓝牙设备与电子设备之间进行虚拟连接或物理连接,切换与电子设备之间的物理连接,处理电子设备的音频业务(例如音乐播放、接/打电话等),以及用于蓝牙设备进行充电,蓝牙设备与其他电子设备进行无线配对连接的程序代码等。存储器220还可以用于存储其他信息,例如电子设备的优先级。Among them, the memory 220 can be used to store program codes, such as for virtual connection or physical connection between a Bluetooth device and an electronic device, to switch the physical connection with the electronic device, and to process audio services of the electronic device (such as music playback, /Calling, etc.), as well as program codes for charging Bluetooth devices and wireless pairing and connection between Bluetooth devices and other electronic devices. The memory 220 may also be used to store other information, such as the priority of the electronic device.
处理器210可以用于执行上述应用程序代码,调用相关模块以实现本申请实施例中蓝牙设备的功能。例如,实现蓝牙设备与多个电子设备之间进行虚拟连接或物理连接,音频播放,接/打电话等功能。The processor 210 may be used to execute the above-mentioned application program code and call related modules to implement the functions of the Bluetooth device in the embodiment of the present application. For example, it realizes functions such as virtual connection or physical connection between a Bluetooth device and multiple electronic devices, audio playback, and making/receiving calls.
处理器210可以包括一个或多个处理单元,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器210中。处理器210具体可以是集成的控制芯片,也可以由包括各种有源和/或无源部件的电路组成,且该电路被配置为执行本申请实施例描述的属于处理器210的功能。The processor 210 may include one or more processing units, and different processing units may be independent devices or integrated in one or more processors 210. The processor 210 may specifically be an integrated control chip, or may be composed of a circuit including various active and/or passive components, and the circuit is configured to perform the functions belonging to the processor 210 described in the embodiments of the present application.
无线通信模块230可以用于,支持蓝牙设备与其他电子设备或耳机盒之间包括BT,WLAN(如Wi-Fi),Zigbee,FM,NFC,IR,或通用2.4G/5G无线通信技术等无线通信的数据交换。The wireless communication module 230 can be used to support wireless communication between Bluetooth devices and other electronic devices or headset boxes, including BT, WLAN (such as Wi-Fi), Zigbee, FM, NFC, IR, or general 2.4G/5G wireless communication technologies. Communication data exchange.
在一些实施例中,该无线通信模块230可以为蓝牙芯片。蓝牙设备可以通过该蓝牙芯片,与其他电子设备的蓝牙芯片之间进行配对并建立无线连接,以通过该无线连接实现蓝牙设备和其他电子设备之间的无线通信和业务处理。该无线连接可以是物理连接或虚拟连接。通常,蓝牙芯片可以支持基础速率(basic rate,BR)/增强速率(enhanceddata rate,EDR)蓝牙和BLE,例如可以收/发寻呼(page)信息,收/发BLE广播消息等。In some embodiments, the wireless communication module 230 may be a Bluetooth chip. The Bluetooth device can pair and establish a wireless connection with the Bluetooth chip of other electronic devices through the Bluetooth chip, so as to realize wireless communication and service processing between the Bluetooth device and other electronic devices through the wireless connection. The wireless connection can be a physical connection or a virtual connection. Generally, a Bluetooth chip can support basic rate (BR)/enhanced data rate (EDR) Bluetooth and BLE, for example, it can receive/send page information, receive/send BLE broadcast messages, and so on.
另外,无线通信模块230还可以包括天线,无线通信模块230经由天线接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器210。无线通信模块230还可以从处理器210接收待发送的信号,对其进行调频,放大,经天线转为电磁波辐射出去。In addition, the wireless communication module 230 may further include an antenna, and the wireless communication module 230 receives electromagnetic waves via the antenna, modulates the frequency of the electromagnetic wave signals and performs filtering processing, and sends the processed signals to the processor 210. The wireless communication module 230 may also receive the signal to be sent from the processor 210, perform frequency modulation, amplify, and convert it into electromagnetic waves to radiate through the antenna.
音频模块240可以用于管理音频数据,实现蓝牙设备输入和输出音频信号。例如,音频模块240可以从无线通信模块230获取音频信号,或者向无线通信模块230传递音频信号,实现通过蓝牙耳机接打电话、播放音乐、启动/关闭与耳机连接的电子设备的语音助手、接收/发送用户的语音数据等功能。音频模块240可以包括用于输出音频信号的扬声器(或称听筒、受话器)组件,麦克风(或称话筒,传声器),与麦克风相配合的麦克收音电路等。扬声器可以用于将音频电信号转换成声音信号并播放。麦克风可以用于将声音信号转换为音频电信号。The audio module 240 may be used to manage audio data, and realize the input and output of audio signals by the Bluetooth device. For example, the audio module 240 can obtain audio signals from the wireless communication module 230, or transmit audio signals to the wireless communication module 230, so as to make calls, play music, turn on/off the voice assistant of the electronic device connected to the headset, and receive the audio signal through the Bluetooth headset. / Send the user's voice data and other functions. The audio module 240 may include a speaker (or earpiece or receiver) component for outputting audio signals, a microphone (or a microphone, or microphone), a microphone radio circuit matched with the microphone, and the like. The speaker can be used to convert audio electrical signals into sound signals and play them. The microphone can be used to convert sound signals into audio electrical signals.
电源模块250,可以用于提供蓝牙设备的系统电源,为蓝牙设备各模块供电;支持蓝牙设备接收充电输入等。电源模块250可以包括电源管理单元(powermanagement unit,PMU)和电池。其中,电源管理单元可以接收外部的充电输入;将充电路输入的电信号变压后提供给电池充电,还可以将电池提供的电信号变压后提供给音频模块240、无线通信模块230等其他模块;以及防止电池过充、过放、短路或过流等。在一些实施例中,电源模块250还可以包括无线充电线圈,用于对蓝牙设备进行无线充电。另外,电源管理单元还可以用于监测电池容量,电池循环次数,电池健康状态(漏电, 阻抗)等参数。The power module 250 can be used to provide system power for the Bluetooth device, supply power to each module of the Bluetooth device, and support the Bluetooth device to receive charging input. The power module 250 may include a power management unit (PMU) and a battery. Among them, the power management unit can receive an external charging input; transform the electrical signal input from the charging circuit and provide it to the battery for charging, and can also transform the electrical signal provided by the battery and provide it to the audio module 240, the wireless communication module 230, etc. Module; and to prevent the battery from overcharging, overdischarging, short circuit or overcurrent, etc. In some embodiments, the power module 250 may further include a wireless charging coil for wireless charging of the Bluetooth device. In addition, the power management unit can also be used to monitor battery capacity, battery cycle times, battery health status (leakage, impedance) and other parameters.
多个输入/输出接口260,可以用于提供蓝牙设备与耳机盒之间进行充电或通信的有线连接。在一些实施例中,该输入/输出接口可以为USB接口。在另一些实施例中,输入/输出接口260可以为耳机电连接器,当蓝牙设备放置于耳机盒中时,蓝牙设备可以通过耳机电连接器与耳机盒中的电连接器建立电连接,从而为蓝牙设备中的电池充电。在另一些实施例中,在该电连接建立后,蓝牙设备还可以与耳机盒进行数据通信,例如可以接收来自耳机盒的配对指令。The multiple input/output interfaces 260 may be used to provide wired connections for charging or communication between the Bluetooth device and the earphone box. In some embodiments, the input/output interface may be a USB interface. In other embodiments, the input/output interface 260 may be a headset electrical connector. When the Bluetooth device is placed in the headset box, the Bluetooth device can establish an electrical connection with the electrical connector in the headset box through the headset electrical connector, thereby Charge the battery in the Bluetooth device. In other embodiments, after the electrical connection is established, the Bluetooth device can also perform data communication with the headset box, for example, can receive a pairing instruction from the headset box.
另外,蓝牙设备还可以包括传感器270。例如,该传感器270可以是距离传感器或接近光传感器,可以用于确定蓝牙设备是否被用户佩戴。示例性的,蓝牙设备可以利用距离传感器来检测蓝牙设备附近是否有物体,从而确定蓝牙设备是否被用户佩戴。在确定蓝牙设备被佩戴时,蓝牙设备可以打开扬声器。In addition, the Bluetooth device may further include a sensor 270. For example, the sensor 270 may be a distance sensor or a proximity light sensor, which may be used to determine whether the Bluetooth device is worn by the user. Exemplarily, the Bluetooth device may use a distance sensor to detect whether there is an object near the Bluetooth device, so as to determine whether the Bluetooth device is worn by the user. When it is determined that the Bluetooth device is worn, the Bluetooth device can turn on the speaker.
再例如,该传感器270还可以包括骨传导传感器,结合成骨传导耳机。利用该骨传导传感器,蓝牙设备可以获取人体声部振动骨块的振动信号,解析出语音信号,实现语音功能,从而接收用户的语音指令。蓝牙设备还可以根据骨传导耳机获取的用户语音信号进行语音鉴权,以对用户身份进行认证等。For another example, the sensor 270 may also include a bone conduction sensor combined with a bone conduction earphone. Using the bone conduction sensor, the Bluetooth device can obtain the vibration signal of the vibrating bone block of the human voice, analyze the voice signal, and realize the voice function, thereby receiving the user's voice command. The Bluetooth device can also perform voice authentication based on the user's voice signal obtained by the bone conduction headset to authenticate the user's identity.
再例如,该传感器270还可以包括:触摸传感器,用于检测用户的触摸操作;指纹传感器,用于检测用户指纹,识别用户身份等;环境光传感器,可以根据感知的环境光的亮度,自适应调节一些参数(如音量大小);以及其他一些传感器。For another example, the sensor 270 may also include: a touch sensor, used to detect user touch operations; a fingerprint sensor, used to detect user fingerprints, identify user identity, etc.; ambient light sensor, can be adaptive according to the brightness of the perceived ambient light Adjust some parameters (such as volume); and some other sensors.
在一些实施例中,触摸传感器可以检测用户的单击、双击、多次点击、长按、重压等触摸操作,还可以进行用户指纹识别,以对用户身份进行鉴权。In some embodiments, the touch sensor can detect touch operations such as a single click, double click, multiple clicks, long press, and heavy pressing of the user, and can also perform user fingerprint recognition to authenticate the user's identity.
可以理解的是,本申请实施例示意的结构并不构成对蓝牙设备的具体限定。其可以具有比图3示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。例如,在蓝牙设备的外表面还可以包括按键280、指示灯(可以指示电量、呼入/呼出、配对模式等状态)、显示屏(可以提示用户相关信息)、防尘网(可以配合听筒使用)等部件。其中,该按键280可以是物理按键或触摸按键(与触摸传感器配合使用)等,用于触发开机、关机、暂停、播放、录音、开始配对、重置等操作。It can be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the Bluetooth device. It may have more or fewer components than shown in FIG. 3, may combine two or more components, or may have a different component configuration. For example, the outer surface of the Bluetooth device can also include a button 280, indicator light (which can indicate the status of power, incoming/outgoing, pairing mode, etc.), a display screen (which can prompt the user for relevant information), and a dust-proof net (which can be used with the handset) ) And other components. Wherein, the button 280 may be a physical button or a touch button (used in conjunction with a touch sensor), etc., and is used to trigger operations such as power-on, power-off, pause, play, record, start pairing, and reset.
图3示出的各种部件可以在包括一个或多个信号处理或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。The various components shown in FIG. 3 may be implemented in hardware, software, or a combination of hardware and software including one or more signal processing or application specific integrated circuits.
本申请实施例中,终端设备获取蓝牙设备发送的数据,数据包括应用程序标识及操作指令,终端设备根据应用程序标识通知所述应用程序标识对应的目标应用程序执行所述操作指令对应的操作,从而实现蓝牙设备对应用程序的控制。In the embodiment of the present application, the terminal device obtains data sent by the Bluetooth device. The data includes an application program identifier and an operation instruction. The terminal device notifies the target application corresponding to the application program identifier to perform the operation corresponding to the operation instruction according to the application program identifier. So as to realize the control of the bluetooth device to the application program.
例如,在一种应用场景中,如图4所示,终端设备1为手机,蓝牙设备2为蓝牙音箱。蓝牙音箱与手机进行蓝牙连接后,播放手机上的音频应用程序所播放的音频。当用户需要收藏当前播放的音乐时,在蓝牙音箱上进行与收藏指令对应的操作,例如,输入语音,或者在蓝牙音箱的显示界面进行触控操作,或者按压蓝牙音箱上的按键,蓝牙音箱根据用户操作生成应用程序标识及收藏指令,将收藏指令发送至手机,手机控制应用程序标识对应的音频应用程序收藏当前播放的音乐。在另一应用场景中,如图5所示,终端设备1为手机,蓝牙设备2为蓝牙手环。蓝牙手环与手机进行蓝牙连接后,蓝牙手环采集运动数据,将运动数据发送至手机,手机上的运动应用程序分析 运动数据后,将分析结果发送至蓝牙手环进行显示。当用户需要暂停运动时,在蓝牙手环上进行与暂停指令对应的触发按键或者语音输入操作,蓝牙手环根据用户操作生成应用程序标识及暂停指令,将暂停指令发送至手机,手机控制应用程序标识对应的运动应用程序暂停运动。For example, in an application scenario, as shown in FIG. 4, the terminal device 1 is a mobile phone, and the Bluetooth device 2 is a Bluetooth speaker. After the Bluetooth speaker is connected to the mobile phone via Bluetooth, it will play the audio played by the audio application on the mobile phone. When the user needs to collect the currently playing music, perform operations corresponding to the collection instructions on the Bluetooth speaker, for example, input voice, or perform touch operations on the display interface of the Bluetooth speaker, or press the button on the Bluetooth speaker, and the Bluetooth speaker will follow The user operates to generate an application program identification and a collection instruction, and sends the collection instruction to the mobile phone, and the mobile phone controls the audio application corresponding to the application program identification to collect the currently playing music. In another application scenario, as shown in FIG. 5, the terminal device 1 is a mobile phone, and the Bluetooth device 2 is a Bluetooth bracelet. After Bluetooth connection between the Bluetooth bracelet and the mobile phone, the Bluetooth bracelet collects exercise data and sends the exercise data to the mobile phone. After the exercise application on the mobile phone analyzes the exercise data, the analysis result is sent to the Bluetooth bracelet for display. When the user needs to pause the exercise, perform the trigger button or voice input operation corresponding to the pause instruction on the Bluetooth bracelet. The Bluetooth bracelet generates the application identifier and pause instruction according to the user's operation, sends the pause instruction to the mobile phone, and the mobile phone controls the application. Identifies the corresponding motion application program to pause the exercise.
下面结合图1-图5,对本申请实施例提供的数据处理方法进行详细说明。The data processing method provided by the embodiment of the present application will be described in detail below with reference to FIG. 1 to FIG. 5.
如图6所示,本申请第一实施例提供的数据处理方法包括:As shown in Figure 6, the data processing method provided by the first embodiment of the present application includes:
S101:终端设备基于RFCOMM协议与蓝牙设备建立第一通信链路。S101: The terminal device establishes a first communication link with the Bluetooth device based on the RFCOMM protocol.
具体地,终端设备打开蓝牙功能后,终端设备的蓝牙模块可以发现附近的蓝牙设备,在显示界面显示待配对的蓝牙设备的列表,根据用户的选择与指定的蓝牙设备配对,从而根据预先定义的协议与所述蓝牙设备建立通信链路。本实施例中,终端设备与蓝牙设备通过串口仿真协议(Radio Frequency Communication,RFCOMM)建立socket通道。Specifically, after the terminal device turns on the Bluetooth function, the Bluetooth module of the terminal device can find nearby Bluetooth devices, display a list of Bluetooth devices to be paired on the display interface, and pair with the designated Bluetooth device according to the user's selection, thereby according to the predefined The protocol establishes a communication link with the Bluetooth device. In this embodiment, the terminal device and the Bluetooth device establish a socket channel through a serial port simulation protocol (Radio Frequency Communication, RFCOMM).
S102:蓝牙设备在接收到预定信息后,确定所述预定信息对应的数据,所述数据包括应用程序标识以及操作指令。S102: After receiving the predetermined information, the Bluetooth device determines data corresponding to the predetermined information, and the data includes an application program identifier and an operation instruction.
其中,所述预定信息包括预定按键触发的信息、预定触摸操作触发的信息或预定的语音指令。操作指令可以为停止、播放、音量控制、收藏等。应用程序标识为应用程序接口(Application Programming Interface,API),终端设备上安装有多个应用程序,例如,日历,相机,音频,视频,导航,图库,通话等应用程序,每个应用程序对应一个API。Wherein, the predetermined information includes information triggered by a predetermined button, information triggered by a predetermined touch operation, or a predetermined voice instruction. Operation instructions can be stop, play, volume control, collection, etc. The application program is identified as Application Programming Interface (API). There are multiple applications installed on the terminal device, for example, calendar, camera, audio, video, navigation, gallery, call and other applications, each application corresponds to one API.
蓝牙设备收到预定信息后,根据预先设定的预定信息与操作指令的对应关系确定操作指令,根据预定信息关联的应用程序标识确定应用程序标识。例如,蓝牙耳机上的“暂停”按键与当前的音频应用程序关联,用户按下蓝牙耳机上的“暂停”按键,蓝牙耳机生成与“暂停”按键对应的键值,“暂停”按键对应的键值为暂停指令和当前音频应用程序的应用程序标识。又例如,蓝牙音箱上的“收藏”按键与当前的音频应用程序关联,用户按下蓝牙音箱上的“收藏”按键,蓝牙音箱生成与“收藏”按键对应的键值,“收藏”按键对应的键值为收藏指令和当前音频应用程序的应用程序标识。其中,与预定信息关联的应用程序需要预先设定,例如,手机上安装有蓝牙音箱APP,通过在蓝牙音箱APP上设置“收藏”按键与QQ音乐关联,或者通过蓝牙音箱上的选择按键设置“收藏”按键关联的应用程序。After receiving the predetermined information, the Bluetooth device determines the operation instruction according to the preset correspondence relationship between the predetermined information and the operation instruction, and determines the application identifier according to the application identifier associated with the predetermined information. For example, the "pause" button on the Bluetooth headset is associated with the current audio application, the user presses the "pause" button on the Bluetooth headset, the Bluetooth headset generates the key value corresponding to the "pause" button, and the key corresponding to the "pause" button The value is the pause instruction and the application ID of the current audio application. For another example, the "favorite" button on the Bluetooth speaker is associated with the current audio application, the user presses the "favorite" button on the Bluetooth speaker, the Bluetooth speaker generates the key value corresponding to the "favorite" button, and the "favorite" button corresponds to The key value is the favorite instruction and the application identifier of the current audio application. Among them, the application associated with the predetermined information needs to be set in advance. For example, the Bluetooth speaker APP is installed on the mobile phone, and the "Collection" button is set on the Bluetooth speaker APP to associate with QQ Music, or the selection button on the Bluetooth speaker is set" The application associated with the "Favorite" button.
可以理解,预定信息与操作指令的对应关系可以任意设定,本申请对此不做限定。例如,触发按键对应收藏操作指令,触发触摸面板对应播放操作指令等。It can be understood that the corresponding relationship between the predetermined information and the operation instruction can be arbitrarily set, which is not limited in this application. For example, the trigger button corresponds to the collection operation instruction, and the trigger touch panel corresponds to the playback operation instruction.
S103:蓝牙设备通过第一通信链路将所述数据发送至终端设备。S103: The Bluetooth device sends the data to the terminal device through the first communication link.
具体地,蓝牙设备将操作指令和应用程序标识进行封装,将封装后的数据通过socket通道发送至终端设备。Specifically, the Bluetooth device encapsulates the operation instruction and the application program identifier, and sends the encapsulated data to the terminal device through the socket channel.
例如,在一种应用场景中,如图4所示,蓝牙设备为蓝牙音箱,终端设备为手机,手机上的音频应用程序播放的音乐通过蓝牙音箱播放。蓝牙音箱上设有“收藏”按键,“收藏”按键与终端设备上当前运行的音频应用程序关联,当用户按下“收藏”按键时,蓝牙音箱将“收藏”按键对应的键值封装后通过socket端口发送至手机,“收藏”按键对应的键值用于指示收藏操作指令和当前运行的音频应用程序的标识。For example, in an application scenario, as shown in Figure 4, the Bluetooth device is a Bluetooth speaker, the terminal device is a mobile phone, and the music played by an audio application on the mobile phone is played through the Bluetooth speaker. There is a "favorite" button on the Bluetooth speaker. The "favorite" button is associated with the audio application currently running on the terminal device. When the user presses the "favorite" button, the Bluetooth speaker encapsulates the key value corresponding to the "favorite" button and passes it The socket port is sent to the mobile phone, and the key value corresponding to the "favorite" button is used to indicate the favorite operation instruction and the identification of the currently running audio application program.
S104:终端设备通过广播的方式将蓝牙设备发送的数据发送至目标应用程序。S104: The terminal device sends the data sent by the Bluetooth device to the target application in a broadcast manner.
其中,终端设备进行广播后,通过第二通信链路将蓝牙设备发送的数据发送至目标应用程序,第二通信链路与第一通信链路不同。Wherein, after the terminal device broadcasts, the data sent by the Bluetooth device is sent to the target application through the second communication link, and the second communication link is different from the first communication link.
在一种可能的实现方式中,终端设备的传输层接收到蓝牙设备发送的数据后,终端设备解析出应用程序标识以及操作指令,根据解析出的应用程序标识在应用层进行广播。终端设备上的每个应用程序均可以接收到广播,但只有目标应用程序接收到操作指令。In a possible implementation manner, after the transmission layer of the terminal device receives the data sent by the Bluetooth device, the terminal device parses out the application program identifier and the operation instruction, and broadcasts at the application layer according to the analyzed application program identifier. Each application on the terminal device can receive the broadcast, but only the target application receives the operation instruction.
S105:终端设备上与所述应用程序标识对应的目标应用程序执行所述操作指令对应的操作。S105: The target application program corresponding to the application program identifier on the terminal device executes the operation corresponding to the operation instruction.
具体地,目标应用程序接收到操作指令后,根据操作指令执行对应的操作。例如,如图7所示,终端设备上运行音频应用程序,音频应用程序播放的音乐通过蓝牙音箱播放,音频应用程序当前正在播放的“平凡之路”。蓝牙设备发送的操作指令为收藏操作指令,应用程序标识为当前音频应用程序的API,终端设备在应用层进行广播时,当前音频应用程序响应应用层的广播,接收到收藏指令。如图8所示,当前音频播放应用程序接收到收藏操作指令后,当前播放的音乐“平凡之路”显示收藏标识,收藏成功。需要说明的是,终端设备上需要安装目标应用程序,才能执行对应的操作指令,若终端设备上没有安装与应用程序标识对应的目标应用程序,则没有应用程序接收操作指令。例如,若终端设备上没有安装与应用程序标识对应的音频播放应用程序,则当蓝牙设备发送收藏指令时,收藏不成功。Specifically, after receiving the operation instruction, the target application executes the corresponding operation according to the operation instruction. For example, as shown in Figure 7, the audio application is running on the terminal device, and the music played by the audio application is played through the Bluetooth speaker, which is the "ordinary road" that the audio application is currently playing. The operation instruction sent by the Bluetooth device is a collection operation instruction, and the application program is identified as the API of the current audio application. When the terminal device broadcasts at the application layer, the current audio application responds to the application layer broadcast and receives the collection instruction. As shown in Figure 8, after the current audio playback application receives the collection operation instruction, the currently playing music "Ordinary Road" displays the collection logo, and the collection is successful. It should be noted that the target application program needs to be installed on the terminal device to execute the corresponding operation instruction. If the target application program corresponding to the application program identifier is not installed on the terminal device, no application program receives the operation instruction. For example, if the audio playback application corresponding to the application identifier is not installed on the terminal device, when the Bluetooth device sends a collection instruction, the collection is unsuccessful.
需要说明的是,手机上与应用程序标识对应的应用程序也可以处于未运行状态。例如,若应用层广播的蓝牙数据对应的应用程序标识为QQ音乐的API,QQ音乐当前没有运行,QQ音乐接收到蓝牙模块发送的收藏操作指令后,收藏QQ音乐最近一次播放的音乐,当用户下一次打开QQ音乐时,最近一次播放的音乐显示在收藏列表。It should be noted that the application program corresponding to the application program identifier on the mobile phone may also be in a non-running state. For example, if the application identifier corresponding to the Bluetooth data broadcasted by the application layer is the API of QQ Music, and QQ Music is not currently running, after QQ Music receives the collection operation command sent by the Bluetooth module, it will collect the most recently played music of QQ Music. The next time you open QQ Music, the most recently played music will be displayed in the favorite list.
在另一场景中,蓝牙音箱上设置有“播放收藏列表”按键,“播放收藏列表”按键与应用程序标识关联,用户按下播放收藏列表的按键时,蓝牙音箱将对应的键值进行封装,将封装后的数据发送至手机,手机收到蓝牙设备发送的数据后,解析出播放收藏列表操作指令和应用程序标识,在应用层进行广播,与应用程序标识对应的目标应用程序接收播放收藏列表操作指令。若当前应用程序没有运行,则运行应用程序,并播放收藏列表中上一次播放的音乐,例如,如图9所示,收藏列表中上一次播放的音乐为“平凡之路”,则应用程序收到播放收藏列表操作指令后,播放“平凡之路”。若当前应用程序处于运行状态,则直接播放收藏列表中上一次播放的音乐。In another scenario, the Bluetooth speaker is provided with a "play favorite list" button, and the "play favorite list" button is associated with the application ID. When the user presses the button to play the favorite list, the Bluetooth speaker encapsulates the corresponding key value. The encapsulated data is sent to the mobile phone. After the mobile phone receives the data sent by the Bluetooth device, it parses out the play favorite list operation instruction and the application program identifier, broadcasts at the application layer, and the target application corresponding to the application identifier receives the play favorite list Operating instructions. If the current application is not running, run the application and play the last played music in the favorites list. For example, as shown in Figure 9, the last played music in the favorites list is "Ordinary Road", then the application will accept After the operation instruction to play the favorite list, play "Ordinary Road". If the current application is running, the last played music in the favorite list will be played directly.
上述实施例中,终端设备获取蓝牙设备发送的数据后,解析出应用程序标识和操作指令,根据应用程序标识在应用层进行广播,与应用程序标识对应的目标应用程序执行操作指令对应的操作,从而实现蓝牙设备对终端设备上的应用程序的控制。In the above embodiment, after the terminal device obtains the data sent by the Bluetooth device, it parses out the application identifier and operation instruction, broadcasts at the application layer according to the application identifier, and the target application corresponding to the application identifier executes the operation corresponding to the operation instruction. In this way, the Bluetooth device can control the application program on the terminal device.
如图10所示,本申请第二实施例提供的数据处理方法包括:As shown in FIG. 10, the data processing method provided by the second embodiment of the present application includes:
S201:终端设备基于AVRCP协议与蓝牙设备建立第一通信链路。S201: The terminal device establishes a first communication link with the Bluetooth device based on the AVRCP protocol.
具体地,终端设备的蓝牙模块与蓝牙设备进行配对后,蓝牙设备与蓝牙模块通过音视频远程控制协议(The Audio/Video Remote Control Profile,AVRCP)建立通信链路。Specifically, after the Bluetooth module of the terminal device is paired with the Bluetooth device, the Bluetooth device and the Bluetooth module establish a communication link through the Audio/Video Remote Control Profile (AVRCP).
S202:蓝牙设备在接收到预定信息后,确定所述预定信息对应的数据,所述数据包括应用程序标识以及操作指令。S202: After receiving the predetermined information, the Bluetooth device determines data corresponding to the predetermined information, and the data includes an application program identifier and an operation instruction.
其中,S202与S201相同,在此不再赘述。Among them, S202 is the same as S201, and will not be repeated here.
S203:蓝牙设备通过第一通信链路将所述数据发送至终端设备。S203: The Bluetooth device sends the data to the terminal device through the first communication link.
在一种可能的实现方式中,蓝牙设备上设有按键,按键与应用程序标识关联,当按键被触发时,将按键对应的键值封装为AVRCP数据包,将封装后的AVRCP数据包发送至终端设备,其中,键值用于指示操作指令和应用程序标识。In a possible implementation, the Bluetooth device is provided with a button, the button is associated with the application ID, when the button is triggered, the key value corresponding to the button is encapsulated as an AVRCP data packet, and the encapsulated AVRCP data packet is sent to Terminal equipment, where the key value is used to indicate operation instructions and application program identification.
在一种可能的实现方式中,终端设备接收到蓝牙设备发送的数据后,向蓝牙设备回复是否接收成功的信息,例如,通过AVRCP协议回复对应的确认字符(Acknowledge character,ACK字符)。蓝牙设备解析确认字符,若数据未发送成功,则提醒用户重新发送。In a possible implementation manner, after receiving the data sent by the Bluetooth device, the terminal device replies to the Bluetooth device whether the reception is successful, for example, replying to the corresponding confirmation character (Acknowledge character, ACK character) through the AVRCP protocol. The Bluetooth device parses the confirmation character, and if the data is not sent successfully, it will remind the user to resend it.
S204:若所述终端设备搜索到所述应用程序标识对应的目标应用程序,将操作指令发送至目标应用程序。S204: If the terminal device searches for the target application corresponding to the application identifier, send an operation instruction to the target application.
在一种可能的实现方式中,终端设备接收到蓝牙设备发送的数据后,解析出应用程序标识和操作,先根据应用程序标识搜索目标应用程序,若搜索到与应用程序标识对应的目标应用程序,将搜索成功的信息发送至蓝牙设备,蓝牙设备可以发出语音提醒,提醒用户搜索到应用程序。终端设备搜索到应用程序后,将操作指令发送至应用程序,若应用程序正在运行,应用程序根据操作指令执行对应的操作,例如,收藏当前播放的音乐、播放收藏列表中的音乐、暂停播放音乐等。若应用程序未运行,终端设备首先运行应用程序,应用程序再根据操作指令执行对应的操作,例如,收藏最近一次播放的音乐、播放收藏列表中最近一次播放的音乐。In a possible implementation, after the terminal device receives the data sent by the Bluetooth device, it parses out the application identifier and operation, first searches for the target application according to the application identifier, if the target application corresponding to the application identifier is searched , Send the successful search information to the Bluetooth device, the Bluetooth device can send out a voice reminder to remind the user to search for the application. After the terminal device searches for the application, it sends the operation instruction to the application. If the application is running, the application executes the corresponding operation according to the operation instruction, such as collecting the currently playing music, playing the music in the favorite list, and pausing the music. Wait. If the application program is not running, the terminal device first runs the application program, and the application program performs corresponding operations according to the operating instructions, for example, collecting the most recently played music and playing the most recently played music in the favorite list.
在另一种可能的实现方式中,若终端设备根据应用程序标识未搜索到对应的应用程序,向蓝牙设备返回搜索不成功的信息,例如,终端设备将搜索不成功的信息通过AVRCP协议发送至蓝牙设备,蓝牙设备接收到搜索不成功的信息后,发出语音提醒,提醒用户终端设备未安装应用程序或网络故障。In another possible implementation, if the terminal device does not search for the corresponding application according to the application identifier, it returns the search unsuccessful information to the Bluetooth device. For example, the terminal device sends the unsuccessful search information to the Bluetooth device through the AVRCP protocol. Bluetooth device, after receiving the message that the search is unsuccessful, the Bluetooth device sends out a voice reminder to remind the user that the terminal device has not installed the application or the network is faulty.
在一种可能的实现方式中,蓝牙设备发送的数据还包括身份认证信息。示例性地,用户可以通过输入帐号或语音输入的方式在蓝牙设备上输入应用程序的身份认证信息,蓝牙设备将接收的身份认证信息和键值封装为AVRCP数据包,将封装后的AVRCP数据包发送至终端设备。终端设备接收到AVRCP数据包后,首先检测是否包括预先定义的键值,若包括键值,则将身份认证信息透传至应用程序。例如,用户在蓝牙设备上通过语音输入的方式输入身份认证信息,同时触发按键,蓝牙设备将用户输入的身份认证信息和键值封装为AVRCP数据包,将封装后的AVRCP数据包发送至终端设备。终端设备接收到AVRCP数据包后,检测是否包括预先定义的键值,若包括预先定义的键值,解析出键值对应的操作指令和应用程序标识,将身份认证信息透传至应用程序标识对应的目标应用程序。目标应用程序将身份认证信息通过WiFi模块发送至服务器,服务器对身份认证信息进行认证,将认证结果发送至目标应用程序。若认证通过,登录目标应用程序,执行键值对应的操作指令。若认证失败,目标应用程序将认证失败信息通过广播包的形式反馈至终端设备,终端设备根据认证失败信息构造AVRCP报文,将AVRCP报文发送至蓝牙设备。蓝牙设备解析出AVRCP报文对应的 认证失败信息,提醒用户身份认证失败。In a possible implementation, the data sent by the Bluetooth device also includes identity authentication information. Exemplarily, the user can input the identity authentication information of the application program on the Bluetooth device by inputting the account number or voice input. The Bluetooth device encapsulates the received identity authentication information and key value into an AVRCP data packet, and the encapsulated AVRCP data packet Send to the terminal device. After receiving the AVRCP data packet, the terminal device first detects whether it includes the predefined key value, and if it includes the key value, the identity authentication information is transparently transmitted to the application. For example, the user enters the identity authentication information by voice input on the Bluetooth device, and at the same time triggers the button, the Bluetooth device encapsulates the identity authentication information and key value entered by the user into an AVRCP data packet, and sends the encapsulated AVRCP data packet to the terminal device . After receiving the AVRCP data packet, the terminal device detects whether it includes a predefined key value. If it includes a predefined key value, it parses out the operation instruction and application ID corresponding to the key value, and transparently transmits the identity authentication information to the corresponding application ID The target application. The target application sends the identity authentication information to the server through the WiFi module, and the server authenticates the identity authentication information, and sends the authentication result to the target application. If the authentication is passed, log in to the target application and execute the operation instruction corresponding to the key value. If the authentication fails, the target application feeds back the authentication failure information to the terminal device in the form of a broadcast packet, and the terminal device constructs an AVRCP message according to the authentication failure information, and sends the AVRCP message to the Bluetooth device. The Bluetooth device parses out the authentication failure information corresponding to the AVRCP message, and reminds the user that the identity authentication has failed.
S205:终端设备上与所述应用程序标识对应的目标应用程序执行所述操作指令对应的操作。S205: The target application program corresponding to the application program identifier on the terminal device executes the operation corresponding to the operation instruction.
其中,S205与S105相同,在此不再赘述。Among them, S205 is the same as S105, which will not be repeated here.
S206:目标应用程序执行完所述操作指令对应的操作后,所述终端设备构建与操作完成信息对应的AVRCP报文,将所述与操作完成信息对应的AVRCP报文发送至所述蓝牙设备。S206: After the target application completes the operation corresponding to the operation instruction, the terminal device constructs an AVRCP message corresponding to the operation completion information, and sends the AVRCP message corresponding to the operation completion information to the Bluetooth device.
具体地,目标应用程序执行完操作指令对应的操作后,将操作完成信息以广播包的形式反馈至终端设备,其中,操作完成信息包括操作指令是否成功执行。终端设备根据接收的广播包生成AVRCP报文,再将生成的AVRCP报文发送至蓝牙设备,蓝牙设备识别接收到的AVRCP报文,根据识别结果发出对应的语音提醒。Specifically, after the target application finishes executing the operation corresponding to the operation instruction, the operation completion information is fed back to the terminal device in the form of a broadcast packet, where the operation completion information includes whether the operation instruction is successfully executed. The terminal device generates an AVRCP message according to the received broadcast packet, and then sends the generated AVRCP message to the Bluetooth device. The Bluetooth device recognizes the received AVRCP message and sends out a corresponding voice reminder according to the recognition result.
例如,在一种应用场景中,蓝牙数据发送的操作指令为收藏播放的音乐,应用程序接收到操作指令,根据操作指令执行收藏操作后,将收藏成功的信息生成预设格式的广播包,再将广播包发送至终端设备,终端设备将接收的广播包生成AVRCP报文,再将该AVRCP报文发送至蓝牙设备,蓝牙设备根据接收到的AVRCP报文识别出收藏成功信息,语音提醒用户收藏成功。For example, in an application scenario, the operation instruction sent by Bluetooth data is to collect music to be played. After the application receives the operation instruction and executes the collection operation according to the operation instruction, it generates a broadcast packet of the preset format from the successful collection information, and then The broadcast packet is sent to the terminal device, and the terminal device generates an AVRCP message from the received broadcast package, and then sends the AVRCP message to the Bluetooth device. The Bluetooth device recognizes the successful collection information based on the received AVRCP message, and voice reminds the user to save success.
上述实施例中,终端设备获取蓝牙设备发送的蓝牙数据后,解析出应用程序标识和操作指令,若搜索到与应用程序标识对应的目标应用程序,将蓝牙数据传送至目标应用程序,指示目标应用程序执行操作指令对应的操作,从而实现蓝牙设备对应用程序的控制。In the above embodiment, after the terminal device obtains the Bluetooth data sent by the Bluetooth device, it parses out the application identifier and operation instructions. If the target application corresponding to the application identifier is searched, the Bluetooth data is transmitted to the target application, indicating the target application The program executes the operation corresponding to the operation instruction, so as to realize the control of the application program by the Bluetooth device.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence number of each step in the foregoing embodiment does not mean the order of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiment of the present application.
对应于上文实施例所述的数据处理方法,图11示出了本申请实施例提供的数据处理系统的结构框图,为了便于说明,仅示出了与本申请实施例相关的部分。Corresponding to the data processing method described in the above embodiment, FIG. 11 shows a structural block diagram of a data processing system provided in an embodiment of the present application. For ease of description, only parts related to the embodiment of the present application are shown.
如图11所示,终端设备1包括,As shown in Fig. 11, the terminal device 1 includes:
接收模块10,用于接收蓝牙设备通过第一通信链路发送的数据,所述数据包括应用程序标识以及操作指令;The receiving module 10 is configured to receive data sent by the Bluetooth device through the first communication link, the data including an application program identifier and an operation instruction;
执行模块20,用于通过第二通信链路通知所述应用程序标识对应的目标应用程序执行所述操作指令对应的操作,其中,所述目标应用程序安装于所述终端设备上。The execution module 20 is configured to notify the target application corresponding to the application identifier to execute the operation corresponding to the operation instruction through the second communication link, wherein the target application is installed on the terminal device.
在一种可能的实现方式中,执行模块20具体用于:In a possible implementation manner, the execution module 20 is specifically configured to:
所述终端设备通过广播的方式通知所述应用程序标识对应的目标应用程序执行所述操作指令对应的操作。The terminal device notifies the target application corresponding to the application identifier to execute the operation corresponding to the operation instruction in a broadcast manner.
在一种可能的实现方式中,所述第一通信链路是基于RFCOMM协议建立的。In a possible implementation manner, the first communication link is established based on the RFCOMM protocol.
在一种可能的实现方式中,执行模块20具体用于:In a possible implementation manner, the execution module 20 is specifically configured to:
若所述终端设备搜索到所述应用程序标识对应的目标应用程序,通知所述目标应用程序执行所述操作指令对应的操作。If the terminal device searches for the target application corresponding to the application identifier, notify the target application to perform the operation corresponding to the operation instruction.
在一种可能的实现方式中,所述第一通信链路是基于AVRCP协议建立的。In a possible implementation manner, the first communication link is established based on the AVRCP protocol.
在一种可能的实现方式中,所述终端设备还包括发送模块,所述发送模块用于:In a possible implementation manner, the terminal device further includes a sending module, and the sending module is configured to:
在所述目标应用程序执行完所述操作指令对应的操作后,构建与操作完成信息对应的AVRCP报文,将所述与操作完成信息对应的AVRCP报文发送至所述蓝牙设备。After the target application completes the operation corresponding to the operation instruction, constructs an AVRCP message corresponding to the operation completion information, and sends the AVRCP message corresponding to the operation completion information to the Bluetooth device.
在一种可能的实现方式中,所述蓝牙设备发送的数据包括所述蓝牙设备预先构建的键值,所述键值用于指示应用程序标识以及操作指令。In a possible implementation manner, the data sent by the Bluetooth device includes a key value constructed in advance by the Bluetooth device, and the key value is used to indicate an application program identifier and an operation instruction.
在一种可能的实现方式中,所述蓝牙设备发送的数据还包括目标应用程序的身份认证信息。In a possible implementation manner, the data sent by the Bluetooth device further includes identity authentication information of the target application.
在一种可能的实现方式中,当所述目标应用程序为音乐类应用程序时,所述操作指令包括收藏音乐或者播放收藏的音乐。In a possible implementation manner, when the target application is a music application, the operation instruction includes collecting music or playing collected music.
蓝牙设备2包括, Bluetooth device 2 includes,
确定模块30,用于在接收到预定信息后,确定所述预定信息对应的数据,所述数据包括应用程序标识以及操作指令;The determining module 30 is configured to determine data corresponding to the predetermined information after receiving the predetermined information, the data including an application program identifier and an operation instruction;
发送模块40,用于通过第一通信链路将所述数据发送至终端设备,以指示所述终端设备通过第二通信链路通知所述应用程序标识对应的目标应用程序执行所述操作指令对应的操作。The sending module 40 is configured to send the data to the terminal device through the first communication link, so as to instruct the terminal device to notify the target application corresponding to the application identifier through the second communication link to execute the corresponding operation instruction. Operation.
在一种可能的实现方式中,所述第一通信链路是基于RFCOMM协议建立的。In a possible implementation manner, the first communication link is established based on the RFCOMM protocol.
在一种可能的实现方式中,所述第一通信链路是基于AVRCP协议建立的。In a possible implementation manner, the first communication link is established based on the AVRCP protocol.
在一种可能的实现方式中,所述蓝牙设备发送的数据包括所述蓝牙设备根据所述预定信息构建的键值,所述键值用于指示应用程序标识以及操作指令。In a possible implementation manner, the data sent by the Bluetooth device includes a key value constructed by the Bluetooth device according to the predetermined information, and the key value is used to indicate an application program identifier and an operation instruction.
在一种可能的实现方式中,所述蓝牙设备还包括获取模块,所述获取模块用于:In a possible implementation manner, the Bluetooth device further includes an acquisition module, and the acquisition module is configured to:
获取所述终端设备发送的AVRCP报文,其中,所述AVRCP报文是基于所述目标应用程序执行完所述操作指令后的操作完成信息构建的。Acquire an AVRCP message sent by the terminal device, where the AVRCP message is constructed based on operation completion information after the target application has executed the operation instruction.
在一种可能的实现方式中,所述蓝牙设备还包括获取模块识别模块,所述识别模块用于:In a possible implementation manner, the Bluetooth device further includes an acquisition module identification module, and the identification module is configured to:
识别所述AVRCP报文,根据所述AVRCP报文生成与所述操作完成信息对应的提示信息。Identify the AVRCP message, and generate prompt information corresponding to the operation completion information according to the AVRCP message.
在一种可能的实现方式中,所述预定信息包括预定按键触发的信息、预定触摸操作触发的信息或预定的语音指令。In a possible implementation manner, the predetermined information includes information triggered by a predetermined button, information triggered by a predetermined touch operation, or a predetermined voice instruction.
需要说明的是,上述装置/单元之间的信息交互、执行过程等内容,由于与本申请方法实施例基于同一构思,其具体功能及带来的技术效果,具体可参见方法实施例部分,此处不再赘述。It should be noted that the information interaction and execution process between the above-mentioned devices/units are based on the same concept as the method embodiment of this application, and its specific functions and technical effects can be found in the method embodiment section for details. I won't repeat it here.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the division of the above functional units and modules is used as an example. In practical applications, the above functions can be allocated to different functional units and modules as needed. Module completion, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist alone physically, or two or more units can be integrated into one unit. The above-mentioned integrated units can be hardware-based Formal realization can also be realized in the form of a software functional unit. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the present application. For the specific working process of the units and modules in the foregoing system, reference may be made to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own focus. For parts that are not described in detail or recorded in an embodiment, reference may be made to related descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person of ordinary skill in the art may realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
在本申请所提供的实施例中,应该理解到,所揭露的装置/终端设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/终端设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed device/terminal device and method may be implemented in other ways. For example, the device/terminal device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units. Or components can be combined or integrated into another system, or some features can be omitted or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。If the integrated module/unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiments and methods, and can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the program is executed by the processor, it can implement the steps of the foregoing method embodiments. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electrical carrier signal, telecommunications signal, and software distribution media, etc.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still implement the foregoing The technical solutions recorded in the examples are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the application, and should be included in Within the scope of protection of this application.

Claims (18)

  1. 一种数据处理方法,应用于终端设备,其特征在于,所述数据处理方法包括:A data processing method applied to a terminal device, characterized in that the data processing method includes:
    所述终端设备接收蓝牙设备通过第一通信链路发送的数据,所述数据包括应用程序标识以及操作指令;The terminal device receives data sent by the Bluetooth device through the first communication link, and the data includes an application program identifier and an operation instruction;
    所述终端设备通过第二通信链路通知所述应用程序标识对应的目标应用程序执行所述操作指令对应的操作,其中,所述目标应用程序安装于所述终端设备上。The terminal device notifies the target application corresponding to the application identifier to perform the operation corresponding to the operation instruction through the second communication link, wherein the target application is installed on the terminal device.
  2. 如权利要求1所述的数据处理方法,其特征在于,所述终端设备通过第二通信链路通知所述应用程序标识对应的目标应用程序执行所述操作指令对应的操作,包括:The data processing method according to claim 1, wherein the terminal device notifies the target application corresponding to the application identifier to perform the operation corresponding to the operation instruction through the second communication link, comprising:
    所述终端设备通过广播的方式通知所述应用程序标识对应的目标应用程序执行所述操作指令对应的操作。The terminal device notifies the target application corresponding to the application identifier to execute the operation corresponding to the operation instruction in a broadcast manner.
  3. 如权利要求1或2所述的数据处理方法,其特征在于,所述第一通信链路是基于串口仿真协议RFCOMM建立的。The data processing method according to claim 1 or 2, wherein the first communication link is established based on the serial port simulation protocol RFCOMM.
  4. 如权利要求1所述的数据处理方法,其特征在于,所述第一通信链路是基于音视频远程控制协议AVRCP建立的。The data processing method according to claim 1, wherein the first communication link is established based on the audio and video remote control protocol AVRCP.
  5. 如权利要求4所述的数据处理方法,其特征在于,在所述终端设备通过第二通信链路通知所述应用程序标识对应的目标应用程序执行所述操作指令对应的操作之后,所述数据处理方法还包括:The data processing method according to claim 4, wherein after the terminal device notifies the target application corresponding to the application identifier through the second communication link to perform the operation corresponding to the operation instruction, the data Treatment methods also include:
    在所述目标应用程序执行完所述操作指令对应的操作后,所述终端设备构建与操作完成信息对应的AVRCP报文,并将所述与操作完成信息对应的AVRCP报文发送至所述蓝牙设备。After the target application completes the operation corresponding to the operation instruction, the terminal device constructs an AVRCP message corresponding to the operation completion information, and sends the AVRCP message corresponding to the operation completion information to the Bluetooth equipment.
  6. 如权利要求5所述的数据处理方法,其特征在于,所述蓝牙设备发送的数据包括所述蓝牙设备预先构建的键值,所述键值用于指示应用程序标识以及操作指令。The data processing method according to claim 5, wherein the data sent by the Bluetooth device includes a key value constructed in advance by the Bluetooth device, and the key value is used to indicate an application program identification and an operation instruction.
  7. 如权利要求6所述的数据处理方法,其特征在于,所述蓝牙设备发送的数据还包括目标应用程序的身份认证信息。7. The data processing method of claim 6, wherein the data sent by the Bluetooth device further includes identity authentication information of the target application.
  8. 如权利要求1所述的数据处理方法,其特征在于,当所述目标应用程序为音乐类应用程序时,所述操作指令包括收藏音乐或者播放收藏的音乐。The data processing method according to claim 1, wherein when the target application is a music application, the operation instruction includes collecting music or playing collected music.
  9. 一种数据处理方法,应用于蓝牙设备,其特征在于,所述数据处理方法包括:A data processing method applied to a Bluetooth device, characterized in that the data processing method includes:
    所述蓝牙设备在接收到预定信息后,确定所述预定信息对应的数据,所述数据包括应用程序标识以及操作指令;After receiving the predetermined information, the Bluetooth device determines data corresponding to the predetermined information, and the data includes an application program identifier and an operation instruction;
    所述蓝牙设备通过第一通信链路将所述数据发送至终端设备,以指示所述终端设备通过第二通信链路通知所述应用程序标识对应的目标应用程序执行所述操作指令对应的操作,其中,所述目标应用程序安装于所述终端设备上。The Bluetooth device sends the data to the terminal device via the first communication link to instruct the terminal device to notify the target application corresponding to the application identifier to perform the operation corresponding to the operation instruction via the second communication link , Wherein the target application is installed on the terminal device.
  10. 如权利要求9所述的数据处理方法,其特征在于,所述第一通信链路是基于RFCOMM协议建立的。9. The data processing method of claim 9, wherein the first communication link is established based on the RFCOMM protocol.
  11. 如权利要求9所述的数据处理方法,其特征在于,所述第一通信链路是基于AVRCP协议建立的。9. The data processing method of claim 9, wherein the first communication link is established based on the AVRCP protocol.
  12. 如权利要求11所述的数据处理方法,其特征在于,所述蓝牙设备发送的数据包括所述蓝牙设备根据所述预定信息构建的键值,所述键值用于指示应用程序标识以及操作指令。The data processing method of claim 11, wherein the data sent by the Bluetooth device includes a key value constructed by the Bluetooth device according to the predetermined information, and the key value is used to indicate an application program identification and an operation instruction .
  13. 如权利要求9所述的数据处理方法,其特征在于,在所述蓝牙设备通过第一通信链路将所述数据发送至终端设备之后,所述数据处理方法还包括:9. The data processing method of claim 9, wherein after the Bluetooth device sends the data to the terminal device through the first communication link, the data processing method further comprises:
    所述蓝牙设备获取所述终端设备发送的AVRCP报文,其中,所述AVRCP报文是基于所述目标应用程序执行完所述操作指令后的操作完成信息构建的。The Bluetooth device obtains the AVRCP message sent by the terminal device, where the AVRCP message is constructed based on operation completion information after the target application has executed the operation instruction.
  14. 如权利要求13所述的数据处理方法,其特征在于,在所述蓝牙设备获取所述终端设备发送的AVRCP报文之后,所述数据处理方法还包括:The data processing method according to claim 13, wherein after the Bluetooth device obtains the AVRCP message sent by the terminal device, the data processing method further comprises:
    所述蓝牙设备识别所述AVRCP报文,根据所述AVRCP报文生成与所述操作完成信息对应的提示信息。The Bluetooth device recognizes the AVRCP message, and generates prompt information corresponding to the operation completion information according to the AVRCP message.
  15. 如权利要求9-14任一项所述的数据处理方法,其特征在于,所述预定信息包括预定按键触发的信息、预定触摸操作触发的信息或预定的语音指令。The data processing method according to any one of claims 9-14, wherein the predetermined information includes information triggered by a predetermined button, information triggered by a predetermined touch operation, or a predetermined voice instruction.
  16. 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至8任一项所述的数据处理方法。A terminal device, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program as claimed in claims 1 to 8. The data processing method of any one of the above.
  17. 一种蓝牙设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求9至15任一项所述的数据处理方法。A Bluetooth device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program as claimed in claims 9 to 15. The data processing method described in any one of items.
  18. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至8或如权利要求9-15任一项所述的数据处理方法。A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, it implements any one of claims 1 to 8 or claims 9-15. The described data processing method.
PCT/CN2020/125588 2019-12-14 2020-10-30 Data processing method, terminal device, bluetooth device, and storage medium WO2021114952A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911287182.4 2019-12-14
CN201911287182.4A CN110944315A (en) 2019-12-14 2019-12-14 Data processing method, terminal device, Bluetooth device and storage medium

Publications (1)

Publication Number Publication Date
WO2021114952A1 true WO2021114952A1 (en) 2021-06-17

Family

ID=69910715

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/125588 WO2021114952A1 (en) 2019-12-14 2020-10-30 Data processing method, terminal device, bluetooth device, and storage medium

Country Status (2)

Country Link
CN (1) CN110944315A (en)
WO (1) WO2021114952A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113852848A (en) * 2021-09-18 2021-12-28 海信电子科技(武汉)有限公司 Virtual remote controller control method, display device and terminal device
CN113873589A (en) * 2021-09-18 2021-12-31 深圳市爱都科技有限公司 Bluetooth connection switching method, Bluetooth headset and computer readable storage medium
CN114422574A (en) * 2022-02-10 2022-04-29 Oppo广东移动通信有限公司 Connection establishment method and device, electronic equipment and computer readable storage medium
CN116709576A (en) * 2022-12-05 2023-09-05 荣耀终端有限公司 Parking processing method, device and storage medium

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110944315A (en) * 2019-12-14 2020-03-31 华为技术有限公司 Data processing method, terminal device, Bluetooth device and storage medium
CN111857835B (en) * 2020-07-23 2024-01-19 珠海优特电力科技股份有限公司 Signal processing method and device, smart card and readable storage medium
CN112887949A (en) * 2021-01-20 2021-06-01 Oppo广东移动通信有限公司 Information processing method, Bluetooth device, electronic device and storage medium
CN114143765B (en) * 2022-02-08 2022-07-08 荣耀终端有限公司 Bluetooth connection method, device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005352648A (en) * 2004-06-09 2005-12-22 Denso Corp Usb-compatible system for vehicle and usb-compatible device for vehicle
EP2043054A1 (en) * 2007-09-25 2009-04-01 Continental Automotive GmbH Wireless flashable remote control
CN103023538A (en) * 2012-11-22 2013-04-03 无锡中星微电子有限公司 Communication method based on Bluetooth accessory and Bluetooth device
CN104050966A (en) * 2013-03-12 2014-09-17 百度国际科技(深圳)有限公司 Voice interaction method of terminal equipment and terminal equipment employing voice interaction method
CN108899025A (en) * 2018-07-24 2018-11-27 中国联合网络通信集团有限公司 Terminal equipment control method, equipment and storage medium
CN110944315A (en) * 2019-12-14 2020-03-31 华为技术有限公司 Data processing method, terminal device, Bluetooth device and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2713629A1 (en) * 2012-09-28 2014-04-02 GN Netcom A/S A headset having an RFID reader
CN106572426A (en) * 2015-10-09 2017-04-19 陈文妮 Intelligent Bluetooth equipment and intelligent Bluetooth equipment communication method and system
CN110531864A (en) * 2019-09-18 2019-12-03 华为技术有限公司 A kind of gesture interaction method, device and terminal device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005352648A (en) * 2004-06-09 2005-12-22 Denso Corp Usb-compatible system for vehicle and usb-compatible device for vehicle
EP2043054A1 (en) * 2007-09-25 2009-04-01 Continental Automotive GmbH Wireless flashable remote control
CN103023538A (en) * 2012-11-22 2013-04-03 无锡中星微电子有限公司 Communication method based on Bluetooth accessory and Bluetooth device
CN104050966A (en) * 2013-03-12 2014-09-17 百度国际科技(深圳)有限公司 Voice interaction method of terminal equipment and terminal equipment employing voice interaction method
CN108899025A (en) * 2018-07-24 2018-11-27 中国联合网络通信集团有限公司 Terminal equipment control method, equipment and storage medium
CN110944315A (en) * 2019-12-14 2020-03-31 华为技术有限公司 Data processing method, terminal device, Bluetooth device and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113852848A (en) * 2021-09-18 2021-12-28 海信电子科技(武汉)有限公司 Virtual remote controller control method, display device and terminal device
CN113873589A (en) * 2021-09-18 2021-12-31 深圳市爱都科技有限公司 Bluetooth connection switching method, Bluetooth headset and computer readable storage medium
CN113852848B (en) * 2021-09-18 2024-04-05 Vidaa(荷兰)国际控股有限公司 Virtual remote controller control method, display device and terminal device
CN114422574A (en) * 2022-02-10 2022-04-29 Oppo广东移动通信有限公司 Connection establishment method and device, electronic equipment and computer readable storage medium
CN116709576A (en) * 2022-12-05 2023-09-05 荣耀终端有限公司 Parking processing method, device and storage medium

Also Published As

Publication number Publication date
CN110944315A (en) 2020-03-31

Similar Documents

Publication Publication Date Title
WO2021114952A1 (en) Data processing method, terminal device, bluetooth device, and storage medium
US20230362028A1 (en) Home device control method and device
CN105163366B (en) Wireless network connecting method and device
CN109946986B (en) Household appliance control method, wearable device and computer readable storage medium
KR102441850B1 (en) Service processing method and mobile communication terminal
CN110166439B (en) Equipment sharing method, terminal, router and server
EP1720328A1 (en) Apparatus and method for displaying information in Bluetooth communication mode of wireless terminal
JP2017506403A (en) Apparatus, method, terminal device, program, and recording medium for realizing touch button and fingerprint authentication
KR102144588B1 (en) Sensor module and device therewith
WO2020088387A1 (en) Uplink transmission method, user equipment and network-side device
US20210014716A1 (en) Method for processing communication range information and terminal
US20220124607A1 (en) Method for Accessing Network by Smart Home Device and Related Device
CN108600887B (en) Touch control method based on wireless earphone and related product
CN107071862A (en) Account binding method and device and smart machine
CN110287719B (en) File encryption method and mobile terminal
CN109788114B (en) Call processing method and terminal
CN106413032B (en) Hotspot establishing method and terminal equipment
CN111414097A (en) Interaction method, interaction system and display equipment
CN109525919B (en) On-off control device, on-off control method, system and storage medium
CN108834013B (en) Wearable equipment electric quantity balancing method and related product
CN108882084B (en) Wearable equipment electric quantity balancing method and related product
CN106358064A (en) Method and equipment for controlling television
CN111313114B (en) Charging method and electronic equipment
WO2018049968A1 (en) Hotspot establishment method and terminals
CN106792434B (en) Hotspot establishing method and terminal equipment

Legal Events

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

Ref document number: 20897877

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20897877

Country of ref document: EP

Kind code of ref document: A1