Message sending method and Bluetooth earphone
By obtaining the device access priority and switching to the target device to send messages, the delay and disconnection problems when Bluetooth headsets switch between multiple devices are solved, and the reliability of message transmission and user experience are improved.
Patent Information
- Application Number
- CN202510827308.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2025-09-16
AI Technical Summary
Bluetooth headsets experience message sending delays and disconnection issues when switching between multiple devices, affecting the user experience.
By obtaining the device access priority, the first device to be connected is determined, and a message is sent to the target device during the switching process to ensure the consistency and reliability of the message content.
This ensures zero delay and zero disconnection when switching between multiple devices, improving the reliability of message transmission and user experience.
Smart Images

Figure CN120659111A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of communications, and in particular to a method for sending a message and a Bluetooth headset. Background Art
[0002] In today's highly connected world, the popularity of smart devices means that users often need to switch seamlessly between multiple devices such as smartphones, tablets, laptops and even smart watches to meet their communication and entertainment needs in different scenarios.
[0003] However, in related technologies, delays or disconnections may occur when Bluetooth headsets switch between different devices. This is an obvious problem for scenarios that require real-time audio transmission or message sending. The sending of messages usually depends on the network connection of the device. If the Bluetooth headset cannot effectively support cross-device transmission of messages when the user switches devices, the sending of messages will be affected, and even cause message loss or delay.
[0004] Secondly, in related technologies, users need to switch between multiple devices, and usually need to manually disconnect the current device and then connect to another device, which not only increases the complexity of user operations, but may also cause connection interruption and affect user experience. Summary of the Invention
[0005] The embodiments of the present invention provide a method for sending messages and a Bluetooth headset, so as to at least solve the problems of message sending delay and disconnection when the Bluetooth headset switches between multiple devices in the related art.
[0006] According to one embodiment of the present invention, a method for sending messages is provided, which is applied to a Bluetooth headset, including: obtaining a device access priority, and determining a first device to be connected among multiple devices connected to the Bluetooth headset based on the device access priority; determining the need to send a first message to a target device based on a first message sent by a second device to the Bluetooth headset, wherein the multiple devices connected to the Bluetooth headset include the target device; switching the first device to the target device, and sending the first message to the target device.
[0007] According to another embodiment of the present invention, a Bluetooth headset is provided for implementing the steps in any of the above method embodiments.
[0008] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when run.
[0009] According to another embodiment of the present invention, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0010] According to yet another embodiment of the present invention, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0011] Through the above-described embodiment of the present invention, since the Bluetooth headset determines the first device to be connected among multiple devices connected to the Bluetooth headset based on the device access priority, when it is determined based on the first message sent by the second device to the Bluetooth headset that the first message needs to be sent to the target device, the first device is switched to the target device and the first message is sent to the target device. Therefore, the problems of message transmission delay and disconnection when Bluetooth headsets switch between multiple devices in the related art can be solved, thereby achieving a zero-delay and zero-disconnection switching process, improving the reliability of message transmission and user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 is a flowchart of a method for sending a message according to an embodiment of the present invention (I);
[0013] Figure 2 is a structural block diagram of a Bluetooth headset according to an embodiment of the present invention;
[0014] Figure 3 is a flowchart (II) of a method for sending a message according to an embodiment of the present invention;
[0015] Figure 4 Flowchart (3) of the method for sending a message according to an embodiment of the present invention. DETAILED DESCRIPTION
[0016] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with embodiments.
[0017] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0018] In this embodiment, a method for sending a message running on a Bluetooth headset is provided. Figure 1 Flowchart (1) of the method for sending a message according to an embodiment of the present invention, such as Figure 1 As shown, the process includes the following steps:
[0019] Step S102: obtaining a device access priority, and determining a first device to be connected among multiple devices connected to the Bluetooth headset according to the device access priority.
[0020] For example, a Bluetooth headset can be connected to multiple devices, such as a mobile phone, tablet, computer, smart watch, and in-vehicle system. The Bluetooth headset can determine the first device to be connected among the multiple devices connected to it based on the obtained device access priority. For example, the Bluetooth headset can determine that the tablet is the first device to be connected among the mobile phone, tablet, computer, smart watch, and in-vehicle system connected to it based on the device access priority.
[0021] In an exemplary embodiment, step S102 includes:
[0022] Get the device access priority set by the user; or,
[0023] Device context information is obtained, and a device access priority is determined based on the device context information, wherein the device context information includes at least one of a device type, a usage scenario, and a user habit.
[0024] Exemplarily, the obtained device access priority can be set by the user or determined by the Bluetooth headset itself based on the obtained device context information. For example, the device access priority can include rules such as prioritizing connecting to a mobile phone that is in the process of making a call rather than a tablet that is playing music.
[0025] In an exemplary embodiment, obtaining device context information includes:
[0026] Obtain Bluetooth signals of multiple devices, and determine device types of the multiple devices based on the Bluetooth signals;
[0027] Detect the working status of multiple devices and determine the usage scenario based on the working status;
[0028] Obtain user usage data and determine user habits based on the user usage data.
[0029] For example, the device type (such as mobile phone, tablet, computer, smart watch, car system, etc.) can be automatically identified by analyzing the Bluetooth signals of multiple devices (such as signal strength, device name, manufacturer information, unique identifier of Bluetooth device (such as MAC address), etc.). The active status of multiple devices can be monitored, such as call status, media playback status, sensor data (such as acceleration, light sensor), etc., to determine the current usage scenario. For example, when it is detected that the device is in a call state, it is judged to be a call scenario. When it is detected that the media is playing, it is judged to be a listening to music or watching a video scenario. Real-time data stream processing technology can be used to quickly analyze the active status of the device to determine the usage scenario. User usage data can be collected, including device connection records, scene switching records, user operation records, etc., and user usage data can be analyzed to determine user habits. For example, users usually use mobile phones when talking on the phone and use tablets when listening to music.
[0030] For example, the device access priority can be adjusted in real time according to the device type, usage scenario and user habits. For example, in a call scenario, the priority of a mobile phone is higher than that of a tablet, and in a music listening scenario, the priority of a tablet is higher than that of a mobile phone.
[0031] Step S104: determining, based on the first message sent by the second device to the Bluetooth headset, that the first message needs to be sent to the target device, wherein the multiple devices connected to the Bluetooth headset include the target device.
[0032] For example, taking the first device as a tablet, the second device as a mobile phone, and the target device as a vehicle-mounted system, the Bluetooth headset is connected to the tablet, the mobile phone, and the vehicle-mounted system, and accesses the tablet according to the device access priority. The mobile phone receives the first message and sends the first message to the Bluetooth headset. The Bluetooth headset determines that the first message needs to be sent to the vehicle-mounted system based on the first message.
[0033] Step S106: Switch the first device to the target device and send a first message to the target device.
[0034] For example, taking the above example, the Bluetooth headset switches the connected tablet to the vehicle system and sends a first message to the vehicle system.
[0035] In an exemplary embodiment, step S106 includes:
[0036] Verify whether the first message sent by the second device to the Bluetooth headset is consistent with the first message to be sent by the Bluetooth headset;
[0037] In response to the first message sent by the second device to the Bluetooth headset being consistent with the first message to be sent by the Bluetooth headset, the first message is sent to the target device.
[0038] For example, to synchronize messages, ensure that message content remains consistent across devices, and prevent message loss, delay, or tampering, message verification is required. The Bluetooth headset needs to verify the first message it receives with the first message it is about to send, and if the messages are consistent, send the first message to the target device.
[0039] In an exemplary embodiment, the method further comprises:
[0040] receiving a first response message sent by the target device, wherein the first response message is used to indicate whether the first message is sent successfully;
[0041] In response to determining, according to the first response message, that the first message is sent successfully, the target device is switched back to the first device according to the device access priority.
[0042] For example, using the above example, the Bluetooth headset receives a first response message from the vehicle system indicating whether the first message was successfully sent. If the first response message indicates that the first message was successfully sent, the Bluetooth headset switches the vehicle system back to the tablet based on the device access priority. If the first response message indicates that the first message failed to be sent, the Bluetooth headset needs to resend the first message to the vehicle system.
[0043] In an exemplary embodiment, the method further comprises:
[0044] receiving a second response message sent by the target device, wherein the second response message is used to reply to the first message;
[0045] Verify whether the second response message sent by the target device is consistent with the second response message to be sent by the Bluetooth headset;
[0046] In response to the second response message sent by the target device being consistent with the second response message to be sent by the Bluetooth headset, sending a second response message to the second device;
[0047] The target device is switched back to the first device according to the device access priority.
[0048] For example, taking the above example, the Bluetooth headset receives a second response message sent by the vehicle system to reply to the first message. Before sending the second response message, the Bluetooth headset needs to verify the message to ensure that the received second response message is consistent with the second response message to be sent. After confirming that the messages are consistent, the second response message is sent to the second device, and then the vehicle system is switched back to the tablet according to the device access priority.
[0049] In an exemplary embodiment, the method further comprises:
[0050] Displaying device types of multiple devices connected to the Bluetooth headset through the first interface;
[0051] Display usage scenarios through the second interface;
[0052] The device access priority is displayed through the third interface.
[0053] For example, by displaying the device types of multiple devices connected to the Bluetooth headset through the first interface, users can easily manage the connections of multiple devices and support pairing and disconnection of devices. By displaying the usage scenario through the second interface, users can manually select the current usage scenario and provide scenario preference settings. By displaying the device access priority through the third interface, users can view and adjust the device access priority, provide intuitive drag or slide operations, and allow users to easily adjust the device access priority (such as user-defined adjustment of device priority in different scenarios), provide real-time status feedback, so that users can understand the current connection status and priority adjustment results, such as displaying the currently connected device, the reason for the priority adjustment, etc.
[0054] Through the above steps, the problems of message sending delay and disconnection when Bluetooth headsets switch between multiple devices in the related technology are solved, thereby achieving a delay-free and disconnect-free switching process, improving the reliability of message transmission and user experience.
[0055] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of various embodiments of the present invention.
[0056] In this embodiment, a Bluetooth headset is also provided. The device is used to implement the above-mentioned embodiments and preferred embodiments. Details that have already been described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0057] Figure 2 : is a structural block diagram of a Bluetooth headset according to an embodiment of the present invention, such as Figure 2 As shown, the apparatus 20 includes a multi-device management module 22 , a message receiving module 24 , and a message sending module 26 .
[0058] The multi-device management module 22 is used to manage the connection status of multiple devices, allowing the Bluetooth headset to maintain connection with multiple devices at the same time, ensuring the reasonable allocation of Bluetooth headset resources, supporting audio stream processing of multiple devices, ensuring that the Bluetooth headset can simultaneously receive and process audio signals from multiple devices, optimizing audio transmission protocols, and reducing audio delay and packet loss rate.
[0059] The message receiving module 24 is used to obtain device access priority and device context information, and determine the device access priority based on the device context information. It is also used to receive messages, temporarily store received messages, and prepare for relay transmission. It can also monitor and obtain the device's activity status (such as in a call, playing music, etc.) in real time through Bluetooth communication or sensors, and dynamically adjust the message forwarding path based on the device status, integrating interfaces.
[0060] The message sending module 26 is used to forward temporarily stored messages to the target device, verify the messages to be sent to ensure the integrity and accuracy of the message content, and perform switching between multiple devices.
[0061] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0062] Figure 3 Flowchart (II) of the method for sending a message according to an embodiment of the present invention, such as Figure 3 As shown, the process includes the following steps:
[0063] Step S301: Pairing Bluetooth headsets with multiple devices.
[0064] For example, the Bluetooth headset can connect to multiple devices at the same time and identify the types of multiple devices (such as mobile phones, tablets, computers, car systems, etc.) through the multi-device management module.
[0065] Step S302: Intelligent pairing algorithm check.
[0066] Exemplarily, the multi-device management module checks whether the connection is successful through the intelligent pairing algorithm. If the Bluetooth headset is offline or disconnected, step S203 is executed. If the device can be connected normally, step S204 is executed.
[0067] Step S303: Mark the device as unavailable and end the process.
[0068] Step S304: Determine a first device to be connected among multiple devices connected to the Bluetooth headset according to the device access priority.
[0069] Exemplarily, the Bluetooth headset may obtain the device access priority set by the user through the message receiving module, or obtain device context information, and determine the device access priority according to the device context information.
[0070] Step S305: Receive the first message.
[0071] Exemplarily, the Bluetooth headset receives a first message sent by the second device through a message receiving module, and determines, based on the first message, that the first message needs to be sent to the target device.
[0072] Step S306: verify the first message to be sent.
[0073] Exemplarily, the Bluetooth headset obtains a first message to be sent from the message receiving module via the message sending module, and verifies whether the first message received by the message receiving module is consistent with the first message to be sent by the message sending module, and whether they belong to the same account. If they are inconsistent, the first message can be retrieved again from the message receiving module. If they are consistent, step S307 can be executed.
[0074] Step S307: Send a first message to the target device.
[0075] Exemplarily, the Bluetooth headset may send the first message to the target device through the message sending module.
[0076] Step S308: Receive a first response message.
[0077] Exemplarily, the Bluetooth headset may receive, through the message receiving module, a first response message sent by the target device to indicate whether the first message is sent successfully.
[0078] Step S309: determine whether the sending is successful.
[0079] Exemplarily, if the first response message indicates that the first message fails to be sent, step S307 is executed to resend the first message. If the first response message indicates that the first message is successfully sent, step S310 is executed.
[0080] Step S310: Switch the target device back to the first device.
[0081] Exemplarily, the Bluetooth headset can switch the target device back to the first device according to the device access priority through the message sending module.
[0082] Example
[0083] This embodiment takes the example of a user sending a message by seamlessly switching between a Bluetooth headset and multiple devices while driving, where the first device is a tablet, the second device is a mobile phone, and the target device is an in-vehicle system. Figure 4Flowchart (3) of the method for sending a message according to an embodiment of the present invention, such as Figure 4 As shown, the process includes the following steps:
[0084] Step S401: Pairing Bluetooth headsets with multiple devices.
[0085] For example, a Bluetooth headset can connect to multiple devices simultaneously through a multi-device management module, identifying the types of multiple devices (such as mobile phones, tablets, computers, and in-vehicle systems). By analyzing the Bluetooth signal characteristics of the devices (such as signal strength, device name, and manufacturer information), an intelligent pairing algorithm quickly completes device pairing, eliminating the need for users to manually select device types. For example, a Bluetooth headset can be paired with a mobile phone, in-vehicle system, tablet, or computer, and can simultaneously receive and process audio and messages from these devices.
[0086] Step S402: Intelligent pairing algorithm check.
[0087] Exemplarily, the multi-device management module checks whether the connection is successful through the intelligent pairing algorithm. If the Bluetooth headset is offline or disconnected, step S403 is executed. If the device can be connected normally, step S404 is executed.
[0088] Step S403: Mark the device as unavailable and end the process.
[0089] Step S404: Determine a first device to be connected among multiple devices connected to the Bluetooth headset according to the device access priority.
[0090] For example, the Bluetooth headset can obtain the device access priority set by the user through the message receiving module, or obtain device context information, and determine the device access priority based on the device context information. For example, the tablet is determined to be the first device to be connected based on the device access priority.
[0091] Step S405: Determine whether the mobile phone receives the first message.
[0092] Exemplarily, if the mobile phone does not receive the first message, no switching is required. If the mobile phone receives the first message, step S406 is executed.
[0093] Step S406: Receive the first message.
[0094] Exemplarily, the Bluetooth headset receives a first message sent by the mobile phone through a message receiving module, and determines, based on the first message, that the first message needs to be sent to the in-vehicle system.
[0095] Step S407: verify the first message to be sent.
[0096] For example, the Bluetooth headset receives a first message to be sent from the message receiving module via the message sending module, and verifies whether the first message received by the message receiving module is consistent with the first message to be sent by the message sending module, and whether they belong to the same account. If they are inconsistent, the first message can be retrieved again from the message receiving module. If they are consistent, the first message can be sent to the in-vehicle system.
[0097] Step S408: The in-vehicle system displays the first message.
[0098] For example, if the vehicle-mounted system does not receive the first message, it sends a first response message to the Bluetooth headset to indicate that the first message has failed to be sent. The Bluetooth headset will resend the first message. If the vehicle-mounted system receives the first message, the vehicle-mounted system can display the received first message to the user through voice or screen. The user does not need to look down at the phone while driving, thereby improving driving safety.
[0099] Step S409: Determine whether the user replies to the first message.
[0100] For example, if the first message does not need to be replied, a first response message is sent to the Bluetooth headset to indicate that the first message was sent successfully, and the Bluetooth headset can execute step S412 to switch back to the tablet. If the first message needs to be replied, step S410 is executed.
[0101] Step S410: The in-vehicle system receives a second response message.
[0102] Exemplarily, the in-vehicle system receives the user's voice command through voice recognition technology and generates a second response message for replying to the first message.
[0103] Step S411: verify the second response message to be sent.
[0104] Exemplarily, the Bluetooth headset receives a second response message to be sent from the message receiving module via the message sending module, and verifies whether the second response message received by the message receiving module is consistent with the second response message to be sent by the message sending module, and whether they belong to the same account. If they are inconsistent, the second response message can be retrieved again from the message receiving module. If they are consistent, the second response message can be sent to the mobile phone, and step S412 is executed to switch back to the tablet.
[0105] Step S412: Switch the target device back to the first device.
[0106] For example, the Bluetooth headset can switch the vehicle system back to the tablet through the message sending module according to the device access priority.
[0107] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when running.
[0108] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0109] An embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0110] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0111] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail here.
[0112] Obviously, those skilled in the art will appreciate that the various modules or steps of the present invention described above can be implemented using a general-purpose computing device, can be centralized on a single computing device, or can be distributed across a network of multiple computing devices. They can be implemented using program code executable by the computing device, and thus, can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described herein can be performed in a different order than that shown, or can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0113] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention are intended to be within the scope of protection of the present invention.
Claims
1. A method for sending a message, characterized in that: Applicable to Bluetooth headsets, including: Obtaining a device access priority, and determining a first device to be connected among multiple devices connected to the Bluetooth headset according to the device access priority; determining, according to a first message sent by a second device to the Bluetooth headset, that the first message needs to be sent to a target device, wherein the multiple devices connected to the Bluetooth headset include the target device; Switch the first device to the target device, and send the first message to the target device.
2. The method according to claim 1, characterized in that The method further comprises: receiving a first response message sent by the target device, wherein the first response message is used to indicate whether the first message is sent successfully; In response to determining, according to the first response message, that the first message is sent successfully, the target device is switched back to the first device according to the device access priority.
3. The method according to claim 1, characterized in that Obtaining device access priority includes: Obtaining the device access priority set by the user; or, Device context information is acquired, and the device access priority is determined according to the device context information, wherein the device context information includes at least one of a device type, a usage scenario, and a user habit.
4. The method according to claim 3, characterized in that Obtaining device context information includes: Acquire Bluetooth signals of the multiple devices, and determine device types of the multiple devices according to the Bluetooth signals; detecting the working status of the plurality of devices, and determining the usage scenario according to the working status; Obtain user usage data, and determine the user habits based on the user usage data.
5. The method according to claim 1, wherein Sending the first message to the target device includes: Verifying whether the first message sent by the second device to the Bluetooth headset is consistent with the first message to be sent by the Bluetooth headset; In response to the first message sent by the second device to the Bluetooth headset being consistent with the first message to be sent by the Bluetooth headset, the first message is sent to the target device.
6. The method according to claim 1, characterized in that The method further comprises: receiving a second response message sent by the target device, wherein the second response message is used to reply to the first message; Verify whether the second response message sent by the target device is consistent with the second response message to be sent by the Bluetooth headset; In response to the second response message sent by the target device being consistent with the second response message to be sent by the Bluetooth headset, sending the second response message to the second device; The target device is switched back to the first device according to the device access priority.
7. The method according to claim 1, characterized in that The method further comprises: Displaying device types of multiple devices connected to the Bluetooth headset through a first interface; Display usage scenarios through the second interface; The device access priority is displayed via a third interface.
8. A Bluetooth headset, characterized in that: The Bluetooth headset is used to implement the steps of the method described in any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.