A Bluetooth data transmission method, device, terminal and storage medium

By detecting the number and type of Bluetooth devices and optimizing the data transmission path, the problem of multimedia data and call data sharing the same device output in Bluetooth devices was solved, enabling independent transmission and improving user experience and privacy.

CN112469009BActive Publication Date: 2025-10-17ZTE CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201910843854.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-09-06
Publication Date
2025-10-17
Estimated Expiration
2039-09-06

AI Technical Summary

Technical Problem

In existing Bluetooth data transmission methods, multimedia data and call data are output through the same Bluetooth device, resulting in poor flexibility and affecting the user's multimedia playback and call experience. Especially in the scenarios of in-vehicle Bluetooth and Bluetooth headsets, it is impossible to simultaneously guarantee privacy and data sharing.

Method used

By detecting the number and type of connected Bluetooth devices, data transmission is optimized based on device attribute status. Multimedia data and call data are distinguished and transmitted to different Bluetooth devices respectively. A mechanism for distinguishing between multimedia attribute status and call attribute status is adopted to ensure that data is transmitted independently and does not affect each other.

Benefits of technology

It realizes the independent transmission of multimedia data and call data, improves the flexibility of Bluetooth data transmission, improves the user's multimedia playback and call experience, and ensures the privacy and data sharing needs of car owners.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112469009B_ABST
    Figure CN112469009B_ABST
Patent Text Reader

Abstract

The application provides a Bluetooth data transmission method and device, a terminal and a storage medium. The method detects the number and type of connected Bluetooth devices, determines the attribute state of the connected Bluetooth devices according to the number and type of the connected Bluetooth devices, and transmits the Bluetooth data to be output to the corresponding connected Bluetooth device according to the attribute state.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the Bluetooth communication technology, for example, relates to a Bluetooth data transmission method, device, terminal and storage medium. BACKGROUND

[0002] With the development of wireless communication and close-range technology, the application field of Bluetooth technology is increasingly expanding, and the types of Bluetooth devices supporting Bluetooth connection are also increasing. Different devices can transmit data within a certain range to achieve resource sharing. In the related art, when the terminal is connected with the Bluetooth device, the multimedia data and the call content of the terminal are output through the same Bluetooth device, and different data influence each other, for example, in the process of transmitting the call content to the Bluetooth speaker for playing, the transmission of the multimedia data is paused, and the audio and video playing is interrupted. This Bluetooth data transmission method is not flexible, which leads to poor user experience in multimedia playing and calling. SUMMARY

[0003] The present application provides a Bluetooth data transmission method, device, terminal and storage medium to improve the flexibility of Bluetooth data transmission.

[0004] The present application provides a Bluetooth data transmission method, device, terminal and storage medium to improve the flexibility of Bluetooth data transmission.

[0005] Detecting the number and type of connected Bluetooth devices;

[0006] According to the number and type of connected Bluetooth devices, determining the attribute state of the connected Bluetooth devices;

[0007] According to the attribute state, transmitting the to-be-output Bluetooth data to the corresponding connected Bluetooth device.

[0008] The present application provides a Bluetooth data transmission method, device, terminal and storage medium to improve the flexibility of Bluetooth data transmission.

[0009] The detection module is configured to detect the number and type of connected Bluetooth devices;

[0010] The attribute determination module is configured to determine the attribute state of each connected Bluetooth device according to the number and type of connected Bluetooth devices;

[0011] The output module is configured to output the to-be-output Bluetooth data through the corresponding Bluetooth device according to the attribute state.

[0012] The present application provides a Bluetooth data transmission method, device, terminal and storage medium to improve the flexibility of Bluetooth data transmission.

[0013] One or more processors;

[0014] The storage device is configured to store one or more programs;

[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the Bluetooth data transmission method described above.

[0016] The embodiment of the present application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and the program is executed by a processor to implement the Bluetooth data transmission method described above. BRIEF DESCRIPTION OF DRAWINGS

[0017] Figure 1 A flow chart of a Bluetooth data transmission method provided by an embodiment;

[0018] Figure 2 A flow chart of a multimedia data transmission method provided by an embodiment;

[0019] Figure 3 A flow chart of a call data transmission method provided by an embodiment;

[0020] Figure 4 A flow chart of another Bluetooth data transmission method provided by an embodiment;

[0021] Figure 5 A flow chart of determining the number and types of connected Bluetooth devices provided by an embodiment;

[0022] Figure 6 A schematic diagram of configuring the maximum number of connections provided by an embodiment;

[0023] Figure 7 A structural schematic diagram of a Bluetooth data transmission device provided by an embodiment;

[0024] Figure 8 A structural schematic diagram of a device provided by an embodiment. DETAILED DESCRIPTION

[0025] The present application will be described below in conjunction with the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other arbitrarily without conflict. In addition, it should be noted that only the parts related to the present application are shown in the drawings for convenience of description, rather than all the structures.

[0026] In the related art, multimedia data and call data are transmitted to the same Bluetooth device for playing, and the transmission method of Bluetooth data has poor flexibility. For example, during driving, a terminal is connected with a vehicle-mounted Bluetooth device to play multimedia data such as audio and video to the driver and passengers. However, if there is an incoming call during the playing process, the transmission and playing of the multimedia data are paused. In this case, the call content of the driver is transmitted to the vehicle-mounted Bluetooth device and played, and the privacy of the driver cannot be guaranteed because there are other passengers in the vehicle. Alternatively, the terminal is connected with a Bluetooth headset to facilitate the driver to answer the phone at any time. However, in this case, the multimedia data can only be output on the Bluetooth headset side, and although the privacy of the driver is guaranteed, the driver cannot share the audio and video with other passengers.

[0027] The Bluetooth data transmission method provided by the embodiment is suitable for the case that a terminal is connected with at least two Bluetooth devices, and can be applied to the scene of transmitting multimedia data and call data. The terminal can be connected with multiple Bluetooth devices at the same time, and different data can be transmitted to different Bluetooth devices for output by optimizing the protocol attributes supported by the Bluetooth devices and distinguishing multimedia data and call data. For example, in the case of receiving a multimedia playing instruction, multimedia data is transmitted to a vehicle-mounted Bluetooth device for playing, and will not be transmitted to a Bluetooth headset, so that the multimedia data can be shared with the driver and passengers. In the case of receiving a call instruction, such as during an incoming or outgoing call, call data (including incoming or outgoing ring tones and call content) is transmitted to the Bluetooth headset, and will not be transmitted to the vehicle-mounted Bluetooth device, so that the privacy of the driver during the call can be guaranteed, and multimedia data can also be shared during the call. The two kinds of data are transmitted through different channels and do not affect each other, the flexibility of Bluetooth data transmission is improved, and the multimedia playing and call experience of the user is improved.

[0028] Figure 1 A flowchart of a Bluetooth data transmission method provided by an embodiment is shown in FIG. 1. Figure 1 The method provided by the embodiment includes steps 110, 120 and 130.

[0029] In step 110, the number and types of connected Bluetooth devices are detected.

[0030] In step 120, the attribute states of the connected Bluetooth devices are determined according to the number and types of the connected Bluetooth devices. The attribute states include a multimedia (Media Audio) attribute state and a call (Phone Calls) attribute state.

[0031] In step 130, Bluetooth data to be output is transmitted to the corresponding connected Bluetooth device according to the attribute states.

[0032] In this embodiment, the terminal can simultaneously establish connections with multiple Bluetooth devices, the maximum number of connections of the Bluetooth devices can be configured by the user, the attribute state of each connected Bluetooth device is determined according to the number and type of the connected Bluetooth devices, and different Bluetooth data to be output is transmitted to different Bluetooth devices. The attribute state includes a multimedia attribute state and a call attribute state. The call attribute corresponds to a Hands-free Profile (HFP) or a Head-Set Profile (HSP) protocol of Bluetooth, and the multimedia attribute corresponds to an Advanced Audio Distribution Profile (A2DP) of Bluetooth.

[0033] For example, the connected Bluetooth devices include one vehicle Bluetooth and one Bluetooth headset. In this case, for the vehicle Bluetooth, the call attribute state is set to the closed state, and the multimedia attribute state is set to the open state, so that the multimedia data is transmitted to the vehicle Bluetooth for playing. For the Bluetooth headset, the multimedia attribute state is set to the closed state, and the call attribute state is set to the open state, so that the call data is transmitted to the Bluetooth headset for playing. For another example, the attribute state of each connected Bluetooth device is by default in the open state, and the Bluetooth data can be transmitted to any connected Bluetooth device according to certain rules for playing. However, when a multimedia playing instruction is received, the call attribute of the Bluetooth headset is closed, so that the multimedia data is only transmitted to the vehicle Bluetooth. When a call instruction is received, the call attribute of the vehicle Bluetooth is closed, so that the call data is only transmitted to the Bluetooth headset. For another example, there are multiple Bluetooth devices of a certain type connected to the terminal, for example, the connected Bluetooth devices include two vehicle Bluetooth devices. In this case, the attribute state of the vehicle Bluetooth device connected to the terminal first can be set to the closed state, and the attribute state of the vehicle Bluetooth device connected to the terminal later can be set to the open state, so that the multimedia data and the call data are both transmitted to the vehicle Bluetooth device connected to the terminal later.

[0034] In this embodiment, the protocol attributes supported by the Bluetooth devices are optimized according to the number and type of the connected Bluetooth devices. Different types of data are transmitted to different Bluetooth devices by setting the attribute state of the connected Bluetooth devices. Different types of data can be independently transmitted and do not affect each other, which improves the flexibility of Bluetooth data transmission and improves the user experience of multimedia playing and calling.

[0035] In an embodiment, the connected Bluetooth devices are represented by an array paired device [1, 2, …, N], where N is the maximum number of Bluetooth devices that can be connected to the terminal at the same time. For example, paired device = [1] represents another terminal connected to the terminal via Bluetooth; paired device = [2] represents a Bluetooth headset; paired device = [3] represents a Bluetooth speaker; paired device = [4] represents a car Bluetooth; paired device = [5] represents a Bluetooth keyboard; paired device = [6] represents a Bluetooth adapter; and paired device = [7] represents other Bluetooth devices (such as a smart bracelet, a locator, etc.). In the case where the terminal is not connected to any Bluetooth device, taking the first connection to a Bluetooth headset as an example, after the connection is successful, the number of connected Bluetooth devices is 1, and paired device = [2]; taking the first connection to a car Bluetooth as an example, after the connection is successful, the number of connected Bluetooth devices is 1, and paired device = [4]; in the case where the terminal is connected to a Bluetooth headset and a car Bluetooth at the same time, the number of connected Bluetooth devices is 2, and paired device = [2, 4].

[0036] In an embodiment, step 110 is performed when a multimedia playing instruction (such as an instruction to play audio and video) or a call instruction (such as an instruction to receive or make a call) is received.

[0037] In an embodiment, step 120 includes: when the number of connected Bluetooth devices is greater than or equal to 2, and the device types of the connected Bluetooth devices are not all the same, determining the attribute state of each connected Bluetooth device according to the first priority. In this embodiment, the attribute state includes a multimedia attribute state, and the Bluetooth data to be output is multimedia data generated according to the multimedia playing instruction.

[0038] In this embodiment, determining the attribute state of each connected Bluetooth device according to the first priority includes: setting the multimedia attribute state of each connected Bluetooth device except the Bluetooth device with the highest priority to an off state according to the first priority.

[0039] In an embodiment, before step 120, further comprising: sorting the connected Bluetooth devices according to the privacy corresponding to the device type from low to high, to obtain a first priority of the connected Bluetooth devices. Taking an example that the connected Bluetooth devices include a car Bluetooth, a Bluetooth speaker and a Bluetooth headset, the car Bluetooth and the Bluetooth speaker are suitable for playing Bluetooth data for the owner and passengers, and the privacy is low, while the Bluetooth headset is suitable for playing Bluetooth data for the owner personally, and the privacy is high, in this embodiment, the privacy of the car Bluetooth is set to be the lowest, and the privacy of the Bluetooth headset is set to be the highest, so that the first priority is obtained as: the priority of the car Bluetooth is higher than the priority of the Bluetooth speaker, and the priority of the Bluetooth speaker is higher than the priority of the Bluetooth headset.

[0040] In an embodiment, the higher the privacy of the Bluetooth device is, the lower the sharing is. For example, the car Bluetooth and the Bluetooth speaker can play Bluetooth data for the owner and passengers, and the sharing is high, while the Bluetooth headset is suitable for playing Bluetooth data for the owner personally, and the sharing is low. In this case, the connected Bluetooth devices are sorted according to the sharing corresponding to the device type from high to low, to obtain a first priority of the connected Bluetooth devices. Figure 2 A flowchart of a multimedia data transmission method provided by an embodiment is shown in FIG. 2, and the method provided by this embodiment includes steps 210-260. Figure 2

[0041] In step 210, the number and the type of the connected Bluetooth devices are detected.

[0042] In step 220, in the case that the number of the connected Bluetooth devices is 0, the multimedia data is directly output from the terminal, for example, the multimedia data can be played through the earpiece of the mobile phone.

[0043] In step 230, in the case that the number of the connected Bluetooth devices is 1, the attribute state of the connected Bluetooth device is determined according to the type of the device. For example, in the case that the paired device is [1], [5], [6] or [7], the multimedia attribute state of the connected Bluetooth device is set to be a closed state, so that the multimedia data is directly output from the terminal; in the case that the paired device is [2], [3] or [4], the multimedia attribute state of the connected Bluetooth device is kept to be an open state, so that the multimedia data is transmitted to the connected Bluetooth device for playing.

[0044] In step 240, in the case that the number of the connected Bluetooth devices is greater than or equal to 2, the connected Bluetooth devices are sorted according to the privacy corresponding to the device type from low to high, to obtain a first priority of the connected Bluetooth devices.

[0045] In step 250, the attribute state of each connected Bluetooth device is determined according to the first priority.

[0046] ​The attribute state includes a multimedia attribute state. Taking the case where the number of connected Bluetooth devices is 2 as an example, paireddevice=[X,Y],

[0047] For example, in the case where and , the multimedia attribute state of the two connected Bluetooth devices is set to the closed state, and multimedia data is directly output from the terminal;

[0048] For example, in the case where and Y∈{2,3,4}, the multimedia attribute state of the connected Bluetooth device X is set to the closed state, the multimedia attribute state of the connected Bluetooth device Y is kept in the open state, and multimedia data is transmitted to the connected Bluetooth device Y for playing;

[0049] For example, in the case where and X∈{2,3,4}, the multimedia attribute state of the connected Bluetooth device Y is set to the closed state, the multimedia attribute state of the connected Bluetooth device X is kept in the open state, and multimedia data is transmitted to the connected Bluetooth device X for playing;

[0050] For example, in the case where X∈{2,3,4}, Y∈{2,3,4}, and X=Y, the multimedia attribute state of the Bluetooth device that is last connected is kept in the open state, the multimedia attribute state of the Bluetooth device that is not last connected is set to the closed state, and multimedia data is transmitted to the Bluetooth device that is last connected for playing. In this case, it can also be understood that, for the same type of connected Bluetooth device, the priority of the Bluetooth device that is last connected is higher than the priority of the Bluetooth device that is not last connected.

[0051] For example, in the case where X∈{2,3,4}, Y∈{2,3,4}, and X≠Y, the privacy corresponding to the device type is sorted from low to high to obtain a first priority, and according to the first priority, multimedia data is transmitted to the Bluetooth device with the highest priority in [X] and [Y] for playing. For example, the privacy of the vehicle-mounted Bluetooth is lower than the privacy of the Bluetooth sound box, which is lower than the privacy of the Bluetooth earphone, so the first priority is: the priority of the vehicle-mounted Bluetooth > the priority of the Bluetooth sound box > the priority of the Bluetooth earphone. For example, in the case where X=2 (Bluetooth earphone) and Y=3 (Bluetooth sound box), the multimedia attribute state of the Bluetooth earphone is set to the closed state, and multimedia data is transmitted to the Bluetooth sound box for playing. For another example, in the case where X=4 (vehicle-mounted Bluetooth) and Y=3, the multimedia attribute state of the Bluetooth sound box is set to the closed state, and multimedia data is transmitted to the vehicle-mounted Bluetooth for playing.

[0052] In step 260, multimedia data is transmitted to the connected Bluetooth device with the open multimedia attribute state.

[0053] The above example sets the multimedia attribute state of the non-highest priority Bluetooth device among the connected Bluetooth devices to the closed state, and transmits the multimedia data to the highest priority Bluetooth device among the connected Bluetooth devices for playing, thereby meeting the data sharing requirement. In this case, if the device types of the connected Bluetooth devices are the same, the multimedia attribute state of the Bluetooth device that is last connected is kept in the open state, and the multimedia attribute state of the Bluetooth device that is not last connected is set to the closed state, so that the multimedia data is transmitted to the Bluetooth device that is last connected for playing.

[0054] In this embodiment, the multimedia attribute state and the call attribute state of the connected Bluetooth devices are both in the open state by default, so that different data can be transmitted and played in the default channel at any time. For a Bluetooth device that needs to transmit multimedia data, the multimedia attribute state thereof is kept in the open state, and for a Bluetooth device that does not need to transmit multimedia data, the multimedia attribute state thereof is set to the closed state.

[0055] In this embodiment, the first priority includes: the priority of the vehicle-mounted Bluetooth > the priority of the Bluetooth sound box > the priority of the Bluetooth earphone > the priority of the terminal itself > the priority of other types of Bluetooth devices, wherein the other types of Bluetooth devices refer to Bluetooth devices that cannot be used to play multimedia data or call data, such as a Bluetooth keyboard, a Bluetooth adapter, and the like.

[0056] In an embodiment, the step 120 includes: in a case where the number of the connected Bluetooth devices is greater than or equal to 2 and the device types of the connected Bluetooth devices are not completely the same, determining the attribute state of each connected Bluetooth device according to the second priority. In this embodiment, the attribute state includes the call attribute state, and the Bluetooth data to be output is call data generated according to a call instruction.

[0057] In this embodiment, determining the attribute state of each connected Bluetooth device according to the second priority includes: setting the call attribute state of the Bluetooth device other than the highest priority Bluetooth device among the connected Bluetooth devices to the closed state according to the second priority.

[0058] In an embodiment, before the step 120, there is further included: sorting the connected Bluetooth devices according to the privacy corresponding to the device type from high to low, to obtain the second priority of the connected Bluetooth devices. Taking an example in which the connected Bluetooth devices include a vehicle-mounted Bluetooth, a Bluetooth sound box, and a Bluetooth earphone, the privacy of the vehicle-mounted Bluetooth is the lowest, and the privacy of the Bluetooth earphone is the highest, so that the second priority is obtained as the priority of the Bluetooth earphone being higher than the priority of the vehicle-mounted Bluetooth, and the priority of the vehicle-mounted Bluetooth being higher than the priority of the Bluetooth sound box.

[0059] In one embodiment, the connected Bluetooth devices are sorted from low to high according to the sharing capabilities corresponding to the device types to obtain a first priority of the connected Bluetooth devices.

[0060] Figure 3 A flowchart of a method for transmitting call data is provided in an embodiment. Figure 3 As shown, the method provided in this embodiment includes steps 310 to 360.

[0061] In step 310 , the number and device types of connected Bluetooth devices are detected.

[0062] In step 320, when the number of connected Bluetooth devices is 0, the call data is directly output from the terminal, for example, it can be played through the handset of the mobile phone;

[0063] In step 330, when the number of connected Bluetooth devices is 1, the attribute state of the connected Bluetooth device is determined according to the device type. For example, when paired device = [1], [5], [6], or [7], the call attribute state of the connected Bluetooth device is set to off, so that the call data is directly output from the terminal; when paired device = [2], [3], or [4], the call attribute state of the connected Bluetooth device is kept on, so that the call data is transmitted to the connected Bluetooth device for playback;

[0064] In step 340 , when the number of connected Bluetooth devices is 2, the connected Bluetooth devices are sorted from high to low according to the privacy corresponding to the device type to obtain the second priority of the connected Bluetooth devices.

[0065] In step 350, the attribute status of each connected Bluetooth device is determined according to the second priority.

[0066] The attribute state includes the call attribute state. For example, when the number of connected Bluetooth devices is 2, paireddevice = [X, Y].

[0067] For example, in and In this case, the call attribute status of the two connected Bluetooth devices is set to closed, so that the call data is output directly from the terminal;

[0068] For example, in and Y∈{2,3,4}, set the call attribute state of the connected Bluetooth device X to the closed state, keep the call attribute state of the connected Bluetooth device Y to the open state, and transmit the call data to the connected Bluetooth device Y for playback;

[0069] For example, in and X e {2, 3, 4}, the call attribute state of the connected Bluetooth device Y is set to the closed state, the call attribute state of the connected Bluetooth device X is kept in the open state, and the call data is transmitted to the connected Bluetooth device X for playing;

[0070] For example, in the case of X e {2, 3, 4}, Y e {2, 3, 4}, and X = Y, the call attribute state of the last connected Bluetooth device is kept in the open state, and the call attribute state of the non-last connected Bluetooth device is set to the closed state, so that the call data is transmitted to the last connected Bluetooth device for playing. In this case, it can also be understood that for the same type of connected Bluetooth device, the priority of the last connected Bluetooth device is higher than that of the non-last connected Bluetooth device.

[0071] For example, in the case of X e {2, 3, 4}, Y e {2, 3, 4}, and X ≠ Y, the privacy corresponding to the device type is sorted from high to low to obtain the second priority of the connected Bluetooth device, and the call attribute state of the connected Bluetooth device is determined according to the second priority, so that the call data is transmitted to the Bluetooth device with the highest priority in [X] and [Y] for playing. For example, the privacy of the vehicle-mounted Bluetooth is lower than that of the Bluetooth speaker, which is lower than that of the Bluetooth earphone, so the second priority is: the priority of the Bluetooth earphone > the priority of the vehicle-mounted Bluetooth > the priority of the Bluetooth speaker. For example, in the case of X = 2 (Bluetooth earphone) and Y = 3 (Bluetooth speaker), the call attribute state of the Bluetooth speaker is set to the closed state, and the call data is transmitted to the Bluetooth earphone for playing. For example, in the case of X = 4 (vehicle-mounted Bluetooth) and Y = 3, the call attribute state of the Bluetooth speaker is set to the closed state, and the call data is transmitted to the vehicle-mounted Bluetooth for playing.

[0072] The above examples set the call attribute state of the non-highest priority Bluetooth device in the connected Bluetooth device to the closed state, so that the call data is transmitted to the highest priority Bluetooth device in the connected Bluetooth device for playing, thereby meeting the data sharing requirement. In this case, if the device types of the connected Bluetooth devices are the same, the call attribute state of the last connected Bluetooth device is kept in the open state, and the call attribute state of the non-last connected Bluetooth device is set to the closed state, so that the call data is transmitted to the last connected Bluetooth device for playing.

[0073] In this embodiment, the call attribute state and the call attribute state of the connected Bluetooth device are both in the open state by default, which facilitates the transmission and playing of different data according to the default channel. For the Bluetooth device that needs to transmit call data, its call attribute state is kept in the open state, and for the Bluetooth device that does not need to transmit call data, its call attribute state is set to the closed state.

[0074] In an embodiment, the second priority comprises: priority of the Bluetooth earphone > priority of the Bluetooth of the vehicle > priority of the Bluetooth sound box > priority of the terminal itself > priority of other types of Bluetooth devices, wherein the other types of Bluetooth devices refer to Bluetooth devices that cannot be used to play multimedia data or call data, such as Bluetooth keyboard, Bluetooth adapter, etc.

[0075] In the above embodiment, when the number of the connected Bluetooth devices is greater than or equal to 2, and the device types of the connected Bluetooth devices are all the same, the attribute state of the Bluetooth device that is last connected among the connected Bluetooth devices is set to the open state, and the attribute state of the Bluetooth device that is not last connected among the connected Bluetooth devices is set to the closed state.

[0076] In the above embodiment, the attribute state of the connected Bluetooth device is set to the open state by default.

[0077] In an embodiment, the default attribute state of the connected Bluetooth device is not limited, and when a multimedia playing instruction or a call instruction is received, the attribute state of the connected Bluetooth device is set according to the number and the device type of the connected Bluetooth device.

[0078] In the above embodiment, the application scenarios of the Bluetooth device are described. When the terminal is connected with the Bluetooth device and the wired device at the same time, the Bluetooth data to be output can be played through the device that is last connected between the Bluetooth device and the wired device.

[0079] In an embodiment, the Bluetooth data to be output comprises at least one of multimedia data and call data. The attribute state comprises a multimedia attribute state and a call attribute state. In this embodiment, the step 130 comprises at least one of the following: transmitting the multimedia data to the connected Bluetooth device whose multimedia attribute state is in the open state; and transmitting the call data to the connected Bluetooth device whose call attribute state is in the open state. For example, when a multimedia playing instruction is received, the audio and video data to be played are the Bluetooth data to be output, among the connected Bluetooth devices connected with the terminal, the multimedia attribute state of the Bluetooth earphone is in the closed state, and the multimedia attribute state of the Bluetooth of the vehicle is in the open state, the terminal transmits the Bluetooth data to be output to the Bluetooth of the vehicle, and the audio and video data are played through the Bluetooth of the vehicle. For another example, when a call instruction is received, the incoming ring tone, the outgoing ring tone, and the call content are the Bluetooth data to be output, among the connected Bluetooth devices connected with the terminal, the multimedia attribute state of the Bluetooth earphone is in the open state, and the multimedia attribute state of the Bluetooth of the vehicle is in the closed state, the terminal transmits the Bluetooth data to be output to the Bluetooth earphone, and the call is made through the Bluetooth earphone.

[0080] In an embodiment, the connected Bluetooth devices include a first device and a second device, the privacy of the first device is lower than that of the second device, and the attribute states include multimedia attribute states and call attribute states. For example, the first device can be a car Bluetooth, and the second device can be a Bluetooth headset.

[0081] In the embodiment, step 120 includes: setting the call attribute state of the first device to the closed state when the call instruction is received; and setting the multimedia attribute state of the second device to the closed state when the multimedia playing instruction is received. The attribute states of the first device and the second device are in the open state by default; and the first device and the second device are at least one, and in the case where there are multiple connected Bluetooth devices of the same type, only the Bluetooth device that is last connected to the terminal can receive the corresponding Bluetooth data to be output.

[0082] Figure 4 The flowchart of another Bluetooth data transmission method provided by an embodiment is shown in FIG. 4, and the method provided by the embodiment includes steps 410-480. Figure 4

[0083] In step 410, the number and types of the connected Bluetooth devices are detected. In the embodiment, the terminal is connected to the first device and the second device, the privacy of the first device is lower than that of the second device, the first device can be a car Bluetooth, and the second device can be a Bluetooth headset. The number of the connected Bluetooth devices is 2, paired device = [2, 4], and the attribute states of the first device and the second device are in the open state by default.

[0084] In step 420, the multimedia attribute state of the second device is set to the closed state when the multimedia playing instruction is received. In this step, the multimedia data is preferentially transmitted to the first device for playing according to the privacy of the device type, the call attribute and the multimedia attribute of the first device are both in the open state, and the call attribute of the second device can also be in the open state, but the multimedia attribute state of the second device is set to the closed state, and step 430 is performed.

[0085] In step 430, the multimedia data is transmitted to the connected Bluetooth device whose multimedia attribute state is in the open state. The multimedia data is output through the first device, and the second device does not output the multimedia data, so that all passengers in the car can listen to the multimedia data shared by the terminal.

[0086] ​In step 440, the multimedia attribute state of the second device is set to the open state in the case that the multimedia playing is ended. In the case that there is no Bluetooth device with higher priority available for outputting multimedia data (for example, no connection is established with the first device or the connection with the first device is disconnected), the second device can be used for playing multimedia at any time.

[0087] In step 450, the call attribute state of the first device is set to the closed state in the case that the call instruction is received. For example, in the case that a call is received during the playing of audio and video, a number is dialed out, etc., the call data is preferentially transmitted to the second device for playing. The multimedia attribute of the second device has been closed, the call attribute continues to be in the open state, the multimedia attribute of the first device remains in the open state, but the call attribute state is set to the closed state, so that the call data is transmitted to the second device for output, and the first device can continue to play audio and video.

[0088] In step 460, the call data is transmitted to the connected Bluetooth device with the replacement attribute state set to the open state. The call data is output through the second device, and the first device does not output multimedia data, so that the driver can use the second device for calling, and the privacy of the call is ensured.

[0089] In step 470, the call attribute state of the first device is set to the open state in the case that the call is ended. In the case that there is no Bluetooth device with higher priority available for outputting call data (for example, no connection is established with the second device or the connection with the second device is disconnected), the first device can be used for calling at any time.

[0090] In step 480, the Bluetooth data to be output is transmitted to the corresponding connected Bluetooth device according to the attribute state.

[0091] In the embodiment, the driver can use the second device to receive a call, and also can play multimedia to other passengers in the vehicle through the first device. The calling and the playing of multimedia can be performed in parallel and do not interfere with each other, the flexibility of Bluetooth data transmission is improved, and the experience of the user in multimedia playing and calling is improved.

[0092] In the above embodiment, in the case that the multimedia playing instruction is received, the first priority can also be determined according to the privacy or sharing of the device type, and the multimedia attribute state of the Bluetooth device with the non-highest priority is set to the closed state. In the case that the call instruction is received, the second priority can also be determined according to the privacy or sharing of the device type, and the call attribute state of the Bluetooth device with the non-highest priority is set to the closed state, so that the independent transmission of the call data and the multimedia data is realized, and the independent performance of the calling and the playing of multimedia is realized.

[0093] In the above embodiment, the attribute state of the connected Bluetooth device is set to the open state by default, and in the case that the multimedia playing is finished, the multimedia attribute state of the Bluetooth device with the highest non-priority is set (restored) to the open state according to the first priority, and in the case that the call is finished, the call attribute of the Bluetooth device with the highest non-priority is set (restored) to the open state according to the second priority, so as to ensure that the connected Bluetooth device can be used for call or multimedia playing at any time.

[0094] In an embodiment, the method further comprises: detecting a Bluetooth device to be paired; if the number of the connected Bluetooth devices is less than the maximum number of connections, attempting to establish a connection with the detected Bluetooth device to be paired; otherwise, refusing to establish a connection with the detected Bluetooth device to be paired; wherein the maximum number of connections is determined according to the configuration information of the candidate maximum number of connections by the user.

[0095] In an embodiment, the method further comprises: after establishing a connection with the detected Bluetooth device to be paired, updating the number of the connected Bluetooth devices, and recording the device type of the detected Bluetooth device to be paired.

[0096] Figure 5 An embodiment provides a flowchart for determining the number and device type of the connected Bluetooth devices, as shown in Figure 5 The method provided by the embodiment comprises steps 510-560.

[0097] In step 510, the configuration information of the candidate maximum number of connections by the user is acquired. In the embodiment, the maximum number of connections can be configured by the user. For example, the user selects the maximum number of connections from the candidate options through the configuration interface of the terminal.

[0098] In step 520, the Bluetooth device to be paired is detected.

[0099] In step 530, it is judged whether the number of the connected Bluetooth devices is less than the maximum number of connections. If yes, step 550 is executed; if no, step 540 is executed.

[0100] In step 540, the connection with the detected Bluetooth device to be paired is refused. In this step, if the number of the connected Bluetooth devices is equal to the maximum number of connections, the Bluetooth connection with the detected Bluetooth device to be paired cannot be established.

[0101] In step 550, the connection with the detected Bluetooth device to be paired is attempted.

[0102] In step 560, after the detected Bluetooth device to be paired is connected, the number of connected Bluetooth devices is updated, and the device type of the detected Bluetooth device to be paired is recorded. In this embodiment, the number of connected Bluetooth devices is initially 0, and after each detected Bluetooth device to be paired is connected, the number of connected Bluetooth devices is increased by 1, and the device type of the detected Bluetooth device to be paired is recorded as a basis for determining the attribute state of the connected Bluetooth device.

[0103] Figure 6 The configuration of the maximum number of connections is provided in an embodiment. In this embodiment, the user can select the maximum number of connections from the candidate options or input the maximum number of connections through the configuration interface of the terminal. The maximum number of connections is controlled by adding a configuration item of the maximum number of connections (Connection Numbers) in the software underlying connection events. In the case where the user does not configure the maximum number of connections, the maximum number of connections is the default value. The default value of Connection Numbers is N, indicating that the terminal can simultaneously connect N Bluetooth devices, including Bluetooth earphones, car-mounted devices, sound boxes, and related devices. Connected Numbers indicates the number of connected Bluetooth devices.

[0104] As shown in Figure 6 , the user configures the maximum number of connections by clicking the maximum number of connections, and a single selection box is popped up, and the candidate options include 1-N. For example, in the case where the user selects the maximum number of connections as 3, the terminal sends an instruction to the connection event to set or modify the maximum number of connections to 3. In the case where the terminal is not connected to any Bluetooth device, Connected Numbers = 0; in the case where the terminal is connected to the first Bluetooth device, Connected Numbers = 1, and so on, until Connected Number = Connection Numbers, after which the terminal will refuse to establish a connection with the detected Bluetooth device. If the terminal and a connected Bluetooth device are disconnected, the value of Connected Number is reduced by 1. During the connection process of the terminal and the Bluetooth device, whether the Bluetooth device can be connected is determined according to whether the value of Connected Number is less than Connection Numbers.

[0105] The application further provides a Bluetooth data transmission device. Figure 7 The structure of the Bluetooth data transmission device is provided in an embodiment. As shown in Figure 7 , the device comprises a detection module 10, an attribute determination module 20, and an output module 30.

[0106] The detection module 10 is configured to detect the number and type of connected Bluetooth devices;

[0107] The attribute determination module 20 is configured to determine the attribute state of each connected Bluetooth device according to the number and type of connected Bluetooth devices.

[0108] The output module 30 is configured to output the Bluetooth data to be output through the corresponding Bluetooth device according to the attribute state.

[0109] In an embodiment, the attribute determination module 20 is specifically configured to:

[0110] In the case that the number of connected Bluetooth devices is greater than or equal to 2 and the types of connected Bluetooth devices are not completely identical, the attribute state of each connected Bluetooth device is determined according to a first priority; the attribute state includes a multimedia attribute state, and the Bluetooth data to be output is multimedia data generated according to a multimedia playing instruction.

[0111] In an embodiment, the attribute determination module 20 is specifically configured to:

[0112] According to the first priority, the multimedia attribute state of the Bluetooth devices other than the Bluetooth device with the highest priority among the connected Bluetooth devices is set to a closed state.

[0113] In an embodiment, the device further comprises:

[0114] The first priority determination module is configured to sort the connected Bluetooth devices according to the privacy corresponding to the type of the connected Bluetooth devices from low to high to obtain a first priority of the connected Bluetooth devices before the attribute determination module 20 determines the attribute state of the connected Bluetooth devices according to the number and type of connected Bluetooth devices.

[0115] In an embodiment, the attribute determination module 20 is specifically configured to:

[0116] In the case that the number of connected Bluetooth devices is greater than or equal to 2 and the types of connected Bluetooth devices are not completely identical, the attribute state of each connected Bluetooth device is determined according to a second priority; the attribute state includes a call attribute state, and the Bluetooth data to be output is call data generated according to a call instruction.

[0117] In an embodiment, the attribute determination module 20 is specifically configured to:

[0118] According to the second priority, the call attribute state of the Bluetooth devices other than the Bluetooth device with the highest priority among the connected Bluetooth devices is set to a closed state.

[0119] In an embodiment, the apparatus further comprises:

[0120] The second priority determining module is configured to, before determining the attribute state of the connected Bluetooth device according to the number and the type of the connected Bluetooth device, sort the connected Bluetooth device according to the privacy of the type of the connected Bluetooth device from high to low to obtain a first priority of the connected Bluetooth device.

[0121] In an embodiment, the attribute determining module 20 is specifically configured to:

[0122] In the case that the number of the connected Bluetooth device is greater than or equal to 2 and the type of each of the connected Bluetooth device is completely the same, the attribute state of the last connected Bluetooth device among the connected Bluetooth device is set to the open state, and the attribute state of the non-last connected Bluetooth device among the connected Bluetooth device is set to the closed state.

[0123] In an embodiment, the connected Bluetooth device comprises a first device and a second device, and the privacy of the first device is lower than the privacy of the second device.

[0124] The attribute state comprises a multimedia attribute state and a call attribute state.

[0125] The attribute determining module 20 is specifically configured to:

[0126] In the case that the call instruction is received, the call attribute state of the first device is set to the closed state.

[0127] In the case that the multimedia playing instruction is received, the multimedia attribute state of the second device is set to the closed state.

[0128] In an embodiment, the to-be-output Bluetooth data comprises at least one of multimedia data and call data.

[0129] The attribute state comprises a multimedia attribute state and a call attribute state.

[0130] Correspondingly, the output module 30 is specifically configured to at least one of the following:

[0131] The multimedia data is transmitted to the connected Bluetooth device with the open multimedia attribute state.

[0132] The call data is transmitted to the connected Bluetooth device with the open call attribute state.

[0133] In an embodiment, the attribute state of the connected Bluetooth device is set to the open state by default.

[0134] In an embodiment, the apparatus further comprises:

[0135] a device detecting module configured to detect a Bluetooth device to be paired;

[0136] a connecting module configured to, if the number of connected Bluetooth devices is less than a maximum number of connections, attempt to establish a connection with the detected Bluetooth device to be paired, and otherwise, refuse to establish a connection with the detected Bluetooth device to be paired, wherein the maximum number of connections is determined according to configuration information of a candidate maximum number of connections by a user.

[0137] an updating module configured to, after establishing a connection with the detected Bluetooth device to be paired, update the number of connected Bluetooth devices and record a device type of the detected Bluetooth device to be paired.

[0138] The Bluetooth data transmission apparatus of the embodiment optimizes protocol attributes supported by Bluetooth devices according to the number of connected Bluetooth devices and the device types, distinguishes multimedia data and call data, and transmits different data to different Bluetooth devices for output, without affecting each other, thereby improving the flexibility of Bluetooth data transmission and improving the multimedia playing and call experience of users.

[0139] Figure 8 A structural schematic diagram of a terminal is provided in an embodiment. The terminal can be a desktop computer, a notebook computer, a smart phone, a tablet computer, or the like. As shown in Figure 8 The terminal provided in the embodiment includes a processor 810 and a storage apparatus 820. The processor in the terminal can be one or more, Figure 8 For example, the processor 810 and the storage apparatus 820 in the terminal are connected through a bus or other means, Figure 8 For example, the processor 810 and the storage apparatus 820 are connected through a bus.

[0140] The one or more programs are executed by the one or more processors 810, so that the one or more processors implement the transmission method in any of the above embodiments.

[0141] The storage apparatus 820 in the terminal is a computer readable storage medium, which can be used to store one or more programs, such as software programs, computer executable programs, and modules, and the like. For example, the program instructions / modules corresponding to the transmission method in the embodiment of the application are stored in the storage apparatus 820. Figure 7 The modules in the Bluetooth data transmission apparatus include a detecting module 10, an attribute determining module 20, and a transmission module 30. The processor 810 executes various functional applications and data processing of the terminal by running the software programs, instructions, and modules stored in the storage apparatus 820, that is, implements the transmission method in the above method embodiments.

[0142] The storage 820 mainly includes a program storage area and a data storage area, wherein the program storage area can store application programs required for operating at least one function; the data storage area can store data created according to the use of the device and the like (such as the Bluetooth data to be output, the attribute state and the like in the above embodiment). In addition, the storage 820 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state memory device. In some examples, the storage 820 can further include a memory remotely arranged with respect to the processor 810, and these remote memories can be connected to the terminal through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0143] And when one or more programs included in the terminal are executed by the one or more processors 810, the following operations are implemented: detecting the number and the type of the connected Bluetooth devices; determining the attribute state of the connected Bluetooth devices according to the number and the type of the connected Bluetooth devices; and transmitting the Bluetooth data to be output to the corresponding connected Bluetooth device according to the attribute state.

[0144] The terminal proposed in the embodiment belongs to the same inventive concept as the Bluetooth data transmission method proposed in the above embodiment, and the technical details not described in detail in the embodiment can be referred to any of the above embodiments, and the embodiment has the same beneficial effects as the execution of the transmission method.

[0145] The embodiment of the present application also provides a storage medium containing computer executable instructions, which are used to execute a transmission method when executed by a computer processor.

[0146] Through the above description of the embodiments, those skilled in the art can understand that the present application can be realized by means of software and general hardware, and can also be realized by hardware. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product. The computer software product can be stored in a computer readable storage medium, such as a floppy disk, a read-only memory (ROM), a random access memory (RAM), a FLASH memory, a hard disk, or an optical disc, and includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in any embodiment of the present application.

[0147] The above description is only exemplary embodiments of the present application, and is not intended to limit the protection scope of the present application.

[0148] The block diagrams of any logical flow of the present application in the drawings can represent program steps or can represent interconnected logic circuits, modules, and functions, or can represent a combination of program steps and logic circuits, modules, and functions. The computer program can be stored on a memory. The memory can be of any type suitable to the local technical environment and can be implemented using any suitable data storage technology, such as, but not limited to, random access memory (RAM), read only memory (ROM), optical storage devices, and systems, such as digital versatile disc (DVD) or CD-ROM, and the like. The computer readable media can include non-transitory storage media. The data processor can be of any type suitable to the local technical environment, and can include one or more of general purpose computers, special purpose computers, microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASIC), programmable logic devices (PLD), and processors based on multi-core processor architectures, as examples.

[0149] A detailed description of exemplary embodiments of the application has been provided above with reference to the drawings. Numerous modifications and adjustments to the above embodiments will be apparent to those skilled in the art in view of the foregoing description, which do not depart from the scope of the application. Accordingly, the proper scope of the application is to be determined by the claims.

Claims

1. A Bluetooth data transmission method, characterized in that: include: Detect the number and type of connected Bluetooth devices; Determining the attribute status of the connected Bluetooth devices according to the number and device types of the connected Bluetooth devices; Transmitting the to-be-output Bluetooth data to the corresponding connected Bluetooth device according to the attribute status; The determining, according to the number and device type of the connected Bluetooth devices, the attribute status of the connected Bluetooth devices includes: When the number of the connected Bluetooth devices is greater than or equal to 2 and the device types of the connected Bluetooth devices are exactly the same, the attribute state of the Bluetooth device that was last connected to the connected Bluetooth devices is set to an on state, and the attribute state of the Bluetooth devices that were not last connected to the connected Bluetooth devices is set to an off state.

2. The method according to claim 1, characterized in that The determining, according to the number and device type of the connected Bluetooth devices, the attribute status of the connected Bluetooth devices includes: When the number of the connected Bluetooth devices is greater than or equal to 2 and the device types of the connected Bluetooth devices are not completely the same, determining the attribute status of each of the connected Bluetooth devices according to a first priority; The attribute state includes a multimedia attribute state, and the Bluetooth data to be output is multimedia data generated according to a multimedia play instruction.

3. The method according to claim 2, characterized in that The determining the attribute status of each of the connected Bluetooth devices according to the first priority includes: According to the first priority, the multimedia attribute states of the connected Bluetooth devices except the Bluetooth device with the highest priority are set to be closed.

4. The method according to claim 2, characterized in that Before determining the attribute status of the connected Bluetooth devices according to the number and device types of the connected Bluetooth devices, the method further includes: Sort the connected Bluetooth devices from low to high according to the privacy corresponding to the device type, and obtain the first priority of the connected Bluetooth devices.

5. The method according to claim 1, wherein The determining, according to the number and device type of the connected Bluetooth devices, the attribute status of the connected Bluetooth devices includes: When the number of the connected Bluetooth devices is greater than or equal to 2 and the device types of the connected Bluetooth devices are not completely the same, determining the attribute status of each of the connected Bluetooth devices according to the second priority; The attribute state includes a call attribute state, and the Bluetooth data to be output is call data generated according to a call instruction.

6. The method according to claim 5, characterized in that The determining the attribute status of each of the connected Bluetooth devices according to the second priority level includes: According to the second priority, the call attribute states of the connected Bluetooth devices except the Bluetooth device with the highest priority are set to be closed.

7. The method according to claim 5, characterized in that Before determining the attribute status of the connected Bluetooth devices according to the number and device types of the connected Bluetooth devices, the method further includes: The connected Bluetooth devices are sorted from high to low according to the privacy corresponding to the device type to obtain the second priority of the connected Bluetooth device.

8. The method according to claim 1, characterized in that The connected Bluetooth devices include a first device and a second device, and the privacy of the first device is lower than the privacy of the second device; The attribute status includes multimedia attribute status and call attribute status; The determining, according to the number and device type of the connected Bluetooth devices, the attribute status of the connected Bluetooth devices includes: When a call instruction is received, setting the call attribute state of the first device to a closed state; When a multimedia play instruction is received, the multimedia attribute state of the second device is set to a closed state.

9. The method according to claim 1, characterized in that The Bluetooth data to be output includes at least one of multimedia data and call data; The attribute status includes multimedia attribute status and call attribute status; Accordingly, transmitting the to-be-output Bluetooth data to the corresponding connected Bluetooth device according to the attribute state includes at least one of the following: Transmitting multimedia data to a connected Bluetooth device whose multimedia attribute status is turned on; Transmits call data to connected Bluetooth devices whose call attribute is turned on.

10. The method according to any one of claims 1 to 9, characterized in that The attribute status of the connected Bluetooth device is enabled by default.

11. The method according to any one of claims 1 to 9, characterized in that Also includes: Detect Bluetooth devices to be paired; If the number of connected Bluetooth devices is less than the maximum number of connections, try to establish a connection with the detected Bluetooth device to be paired; Otherwise, refuse to establish a connection with the detected Bluetooth device to be paired; The maximum number of connections is determined according to user configuration information of a candidate maximum number of connections.

12. The method according to claim 11, characterized in that Also includes: After establishing a connection with the detected Bluetooth device to be paired, the number of connected Bluetooth devices is updated, and the device type of the detected Bluetooth device to be paired is recorded.

13. A Bluetooth data transmission device, characterized in that: include: A detection module configured to detect the number and type of connected Bluetooth devices; an attribute determination module, configured to determine an attribute state of each connected Bluetooth device according to the number and device type of the connected Bluetooth devices; An output module, configured to output the Bluetooth data to be output through a corresponding Bluetooth device according to the attribute state; The attribute determination module is specifically configured as follows: When the number of the connected Bluetooth devices is greater than or equal to 2 and the device types of the connected Bluetooth devices are exactly the same, the attribute state of the Bluetooth device that was last connected to the connected Bluetooth devices is set to an on state, and the attribute state of the Bluetooth devices that were not last connected to the connected Bluetooth devices is set to an off state.

14. A terminal, characterized in that: include: one or more processors; a storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the Bluetooth data transmission method according to any one of claims 1 to 12.

15. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the Bluetooth data transmission method according to any one of claims 1 to 12 is implemented.

Citation Information

Patent Citations

  • Information transmission method and information transmission device

    CN104980884A