Bluetooth earphone communication method and device, computer device and storage medium

By using multi-hop relay transmission through a self-organized network in the Bluetooth headset, the problem of long-distance communication in Bluetooth headsets in environments without a network is solved, achieving a kilometer-level voice coverage range.

CN122395571APending Publication Date: 2026-07-14SHENZHEN JIESHENG TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN JIESHENG TECHNOLOGY CO LTD
Filing Date
2026-06-09
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Bluetooth headsets cannot achieve long-distance voice communication in outdoor environments where there is no mobile signal or Wi-Fi base station.

Method used

By pairing a Bluetooth headset with at least one other Bluetooth headset, an ad hoc network is established, forming a multi-node structure. Communication broadcast frames in the ad hoc network are received and processed to identify target relay nodes. Voice data is then transmitted through a multi-hop relay method to extend the communication range.

Benefits of technology

In environments without a network, the effective communication range of Bluetooth headsets is extended from hundreds of meters to over a kilometer, significantly improving communication coverage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122395571A_ABST
    Figure CN122395571A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of wireless communication, and relates to a Bluetooth earphone communication method and device, computer equipment and a storage medium, which comprises the following steps: pairing a current Bluetooth earphone with at least one other Bluetooth earphone to establish an ad hoc network; receiving a current communication broadcast frame sent by other nodes in the ad hoc network, wherein the current communication broadcast frame comprises voice data, source node information and a current relay node identifier; storing the source node information in a preset storage space and controlling the current Bluetooth earphone to play the voice data; when the current relay node identifier is consistent with a current node identifier corresponding to the current node, determining a plurality of neighbor nodes corresponding to the current node according to the ad hoc network; determining a target relay node from the plurality of neighbor nodes, encapsulating the voice data, the source node information and the target relay node identifier to obtain a target communication broadcast frame, and broadcasting the target communication broadcast frame to the plurality of neighbor nodes. The application enables the Bluetooth earphone to realize long-distance intercom in a network-free environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of wireless communication technology, and in particular to a Bluetooth headset communication method, apparatus, computer device, and storage medium. Background Technology

[0002] With the popularization of wireless portable communication technology, Bluetooth headsets have become the mainstream device for daily audio-visual entertainment and mobile voice communication. In scenarios such as outdoor work, wilderness exploration, and emergency rescue, the demand for Bluetooth headsets to achieve independent communication without external devices is constantly increasing.

[0003] Currently, most Bluetooth headsets on the market use short-range wireless communication solutions, relying on point-to-point direct connections between devices to complete audio and voice transmission. Some products with simple intercom functions only achieve short-range voice interaction through basic wireless direct connection mode, and the communication coverage is determined by the signal strength of the direct connection between the devices. However, when users are outdoors, in emergency situations, or at construction sites where there is no mobile signal or Wi-Fi base station, Bluetooth headsets cannot directly conduct long-distance voice communication with other headsets.

[0004] In view of the above, this application is hereby submitted. Summary of the Invention

[0005] The purpose of this application is to provide a Bluetooth headset communication method, device, computer equipment, and storage medium to solve the technical problem of insufficient communication range of Bluetooth headsets when they do not rely on external devices.

[0006] To address the aforementioned technical problems, this application provides a Bluetooth headset communication method, employing the following technical solution: The current Bluetooth headset is paired with at least one other Bluetooth headset to establish a self-organizing network, which includes multiple nodes, with one Bluetooth headset corresponding to one node; Receive current communication broadcast frames sent by other nodes in the self-organizing network, wherein the current communication broadcast frames include voice data, source node information and current relay node identifier; When the source node information does not exist in the preset storage space of the current node corresponding to the current Bluetooth headset, the source node information is stored in the preset storage space, and the current Bluetooth headset is controlled to play the voice data. When the current relay node identifier is consistent with the current node identifier corresponding to the current node, multiple neighbor nodes corresponding to the current node are determined according to the ad hoc network. A target relay node is determined among the multiple neighboring nodes. The voice data, the source node information, and the target relay node identifier corresponding to the target relay node are encapsulated to obtain a target communication broadcast frame, which is then broadcast to the multiple neighboring nodes.

[0007] Furthermore, determining the target relay node among the plurality of neighboring nodes includes: Obtain the signal strength and wireless link quality corresponding to each of the neighboring nodes, as well as the first weight corresponding to the signal strength and the second weight corresponding to the wireless link quality; The communication quality score of each neighbor node is calculated based on the signal strength, the wireless link quality, the first weight, and the second weight. Among the multiple neighboring nodes, the node with the highest communication quality score is selected as the target relay node.

[0008] Furthermore, the current communication broadcast frame also includes a cumulative hop count and historical relay node identifiers. When the current relay node identifier matches the current node identifier corresponding to the current node, multiple neighboring nodes corresponding to the current node are determined based on the ad hoc network, including: When the current relay node identifier is consistent with the current node identifier, check whether the cumulative hop count is less than or equal to the preset hop count limit; If the cumulative number of hops is less than or equal to the preset hop count limit, then based on the self-organizing network, obtain the list of neighboring nodes of the current node; Based on the historical relay node identifier, the nodes in the neighbor node list are filtered to obtain multiple neighbor nodes.

[0009] Furthermore, the plurality of neighboring nodes includes the target relay node and other neighboring nodes, and the broadcasting of the target communication broadcast frame to the plurality of neighboring nodes includes: If a disconnection is detected between the current node and the target relay node, a backup node is determined based on the self-organizing network. The target relay node identifier in the target communication broadcast frame is replaced with the backup node identifier corresponding to the backup node to obtain a repair broadcast frame, which is then broadcast to the backup node and the other neighboring nodes.

[0010] Furthermore, determining the backup node based on the self-organizing network includes: Based on the self-organizing network, obtain the neighbor nodes of the target relay node; According to the preset routing table, find the alternative path for the current node to broadcast to the neighboring nodes of the target relay node; The backup node is determined in the backup path.

[0011] Furthermore, after broadcasting the target communication broadcast frame to the multiple neighboring nodes, the method further includes: When a communication termination signal is detected in the current Bluetooth headset, the transmission power of the current Bluetooth headset is adjusted to a preset base power. According to a preset time interval, the current Bluetooth beacon frame is broadcast to at least one other Bluetooth headset, so that other nodes in the ad hoc network update their respective neighbor node lists based on the beacon frame.

[0012] Furthermore, the step of pairing the current Bluetooth headset with at least one other Bluetooth headset to establish an ad hoc network includes: In response to a pairing trigger signal, a pairing request frame from at least one other Bluetooth headset is received, and a pairing confirmation frame is generated based on the pairing request frame. The establishment of a communication link between the Bluetooth headset and at least one other Bluetooth headset is completed based on the pairing confirmation frame, thus obtaining the self-organizing network.

[0013] To address the aforementioned technical problems, this application also provides a Bluetooth headset communication device, which employs the following technical solution: A Bluetooth headset communication device, comprising: A setup module is used to pair the current Bluetooth headset with at least one other Bluetooth headset to establish a self-organizing network, wherein the self-organizing network includes multiple nodes, with one Bluetooth headset corresponding to one node; The receiving module is used to receive current communication broadcast frames sent by other nodes in the self-organizing network. The current communication broadcast frame includes voice data, source node information, and current relay node identifier. The storage module is used to store the source node information into the preset storage space when the source node information does not exist in the preset storage space of the current node corresponding to the current Bluetooth headset, and to control the current Bluetooth headset to play the voice data. The determination module is used to determine multiple neighbor nodes corresponding to the current node based on the ad hoc network when the current relay node identifier is consistent with the current node identifier corresponding to the current node. The broadcast module is used to determine the target relay node among multiple neighboring nodes, encapsulate the voice data, the source node information, and the target relay node identifier corresponding to the target relay node to obtain a target communication broadcast frame, and broadcast the target communication broadcast frame to multiple neighboring nodes.

[0014] To address the aforementioned technical problems, this application also provides a computer device that employs the following technical solution: A computer device includes a memory and a processor, the memory storing computer-readable instructions, the processor executing the computer-readable instructions to implement the steps of the Bluetooth headset communication method described above.

[0015] To address the aforementioned technical problems, this application also provides a computer-readable storage medium, employing the technical solution described below: A computer-readable storage medium storing computer-readable instructions, which, when executed by a processor, implement the steps of the Bluetooth headset communication method described above.

[0016] Compared with the prior art, this application has the following main advantages: The Bluetooth headset communication method disclosed in this application forms an ad hoc network by pairing the current Bluetooth headset with at least one other Bluetooth headset, enabling multiple headset nodes to cooperate and extend the communication range without relying on a mobile phone or base station. It receives current communication broadcast frames sent by other nodes in the ad hoc network. These broadcast frames contain voice data, source node information, and a current relay node identifier, allowing each node to identify the voice source and forwarding responsibility. When the source node information is not present in the current node's preset storage space, the information is stored and the voice data is played, preventing the same voice content from being played repeatedly and improving the listening experience. When the current relay node identifier matches the current node identifier, multiple neighboring nodes corresponding to the current node are determined based on the ad hoc network, ensuring that only the designated node initiates forwarding preparation, reducing unnecessary processing. A target relay node is determined among the multiple neighboring nodes, and the voice data, source node information, and target relay node identifier are encapsulated into a target communication broadcast frame and broadcast to all neighboring nodes, thus realizing the relay transmission of voice data from the current node to a more distant area. Through the aforementioned multi-hop relay method, the effective communication distance of Bluetooth headsets can be extended from hundreds of meters to over a kilometer, enabling Bluetooth headsets to achieve long-distance communication even in environments without a network, thus significantly improving communication coverage. Attached Figure Description

[0017] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is an exemplary system architecture diagram to which this application can be applied; Figure 2 This is a flowchart of one embodiment of the Bluetooth headset communication method according to this application; Figure 3 This is a schematic diagram of one embodiment of the Bluetooth headset communication device according to this application; Figure 4 This is a schematic diagram of the structure of one embodiment of the computer device according to this application. Detailed Implementation

[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.

[0020] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0021] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0022] like Figure 1 As shown, the system architecture 100 may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0023] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0024] The first terminal device 101, the second terminal device 102, and the third terminal device 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, e-book readers, MP3 (Moving Picture Experts Group Audio Layer Ⅲ) players, MP4 (Moving Picture Experts Group Audio Layer IV) players, laptops, and desktop computers, etc.

[0025] Server 105 can be a server that provides various services, such as a backend server that supports the pages displayed on the first terminal device 101, the second terminal device 102, and the third terminal device 103.

[0026] It should be noted that the Bluetooth headset communication method provided in this application embodiment is generally executed by the terminal device, and correspondingly, the Bluetooth headset communication device is generally set in the terminal device.

[0027] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0028] Continue to refer to Figure 2 A flowchart illustrating an embodiment of the Bluetooth headset communication method according to this application is shown. The Bluetooth headset communication method includes the following steps: Step S201: Pair the current Bluetooth headset with at least one other Bluetooth headset to establish a self-organizing network. The self-organizing network includes multiple nodes, with one Bluetooth headset corresponding to one node.

[0029] In this embodiment, the Bluetooth headset communication method operates on an electronic device (e.g., Figure 1The terminal device shown can send or receive data via wired or wireless connection. It should be noted that the aforementioned wireless connection methods may include, but are not limited to, 3G / 4G / 5G connections, Wi-Fi connections, Bluetooth connections, WiMAX connections, Zigbee connections, UWB (ultra-wide band) connections, and other currently known or future wireless connection methods.

[0030] In this embodiment, Bluetooth headset pairing can be initiated by the user simultaneously pressing and holding the intercom button on both the current Bluetooth headset and the peer device (another Bluetooth headset) for 5 seconds. During pairing, the current Bluetooth headset sends a pairing request frame via a broadcast channel. This frame contains the device's node ID, device type, and maximum supported hop count; simultaneously, it receives pairing request frames from the peer device. The node ID and protocol version of the peer device are parsed, compatibility is verified, a pairing confirmation frame is generated, and sent to the peer. Both parties complete the handshake and establish a communication link. After the link is established, the current Bluetooth headset and the peer device exchange initial routing information, including their respective known lists of other nodes, routing table entries, and channel interference maps. Subsequently, using the paired device as an anchor, more Bluetooth headsets can be added to the network sequentially: for example, the pairing steps are repeated between this device and a third headset. The third headset obtains the existing node list and routing information from this device and broadcasts a join notification. By repeating this chain-like expansion operation, the network size can be expanded to multiple nodes. After joining the network, each node periodically broadcasts beacon frames (containing its own node ID and hop count) and receives beacon frames from other nodes within its radio frequency coverage area. Based on this, it updates its local neighbor node list, recording one-hop reachable neighbors and their signal strength and link quality. Through neighbor discovery and routing table broadcasting, a multi-node, self-organizing distributed ad hoc network is eventually formed, in which multi-hop paths may exist between any two nodes, and voice broadcast frames can be relayed hop-by-hop.

[0031] Step S202: Receive a current communication broadcast frame sent by other nodes in the self-organizing network. The current communication broadcast frame includes voice data, source node information, and current relay node identifier.

[0032] In this embodiment, during normal operation of the ad hoc network, the Bluetooth headset listens to the radio frequency channel in real time through its Bluetooth receiver module to receive current communication broadcast frames sent by other nodes. This broadcast frame specifically includes the following fields: voice data, source node information, current relay node identifier, cumulative hop count, and historical relay node identifiers. The voice data is a real-time voice payload collected and encoded by the Bluetooth headset microphone, decoded by the receiving node, and played back to the user; the voice data content is not altered when relay nodes forward the data; the source node information is the unique identifier of the original Bluetooth headset that initiated the voice broadcast, including the source node identifier and serial number; the current relay node identifier is the node ID that specifies which of the nodes receiving this frame should assume the responsibility of continuing to forward the data; the cumulative hop count is the number of relay forwards the broadcast frame has undergone since originating from the source node, incrementing by 1 for each forward; and the historical relay node identifier refers to the identifiers of all nodes that have acted as relay nodes since the source node.

[0033] Step S203: When the source node information does not exist in the preset storage space of the current node corresponding to the current Bluetooth headset, the source node information is stored in the preset storage space, and the current Bluetooth headset is controlled to play the voice data.

[0034] In this embodiment, the preset storage space refers to the playback history cache, which is used to record the source information of previously played audio data to avoid repeatedly playing the same audio content to the user. Its source node information includes a source node identifier and a sequence number, which distinguishes different audio frames emitted by the same source node. The current node queries the playback history cache to see if a record matching the source node information exists. If no record exists, it indicates that the audio data has not yet been played by the current node. In this case, the combination (source node ID + sequence number) is stored in the playback history cache, and a timestamp is recorded. The parsed audio data is sent to the audio decoder, decoded, and played to the user through the headphone speaker. If the cache is full, the oldest record is removed according to the first-in-first-out principle, and a new record is stored. If a record exists, it indicates that the audio data has already been played by the current node, and the current node does not play the audio data in this case.

[0035] Step S204: When the current relay node identifier is consistent with the current node identifier corresponding to the current node, determine multiple neighbor nodes corresponding to the current node according to the ad hoc network.

[0036] In this embodiment, the current node receives the current communication broadcast frame. This frame, in addition to voice data, source node ID, and sequence number, also includes the cumulative hop count and historical relay node identifiers. First, the current relay node identifier in the frame is compared with its own ID (current node identifier). If they match, the current node is designated as a relay and needs to forward the broadcast frame. Before forwarding, the current node checks if the cumulative hop count is less than or equal to a preset hop count limit (e.g., 10 hops). If the limit has been reached, forwarding is stopped (to avoid infinite propagation); if the limit has not been reached, forwarding continues. First, the current node obtains a list of neighboring nodes, which records all one-hop reachable neighboring nodes, along with their RSSI values ​​and link quality parameters. To avoid immediately sending the broadcast frame back to the previous hop or other nodes that have already performed forwarding tasks, the neighbor list is filtered based on the historical relay node identifiers in the frame to obtain candidate neighboring nodes. Then, the best candidate neighbor is selected as the next-hop target relay node. By checking the number of hops and filtering historical relays, this solution effectively prevents infinite looping of broadcast frames and ping-pong forwarding, ensuring the stability and efficiency of multi-hop relays.

[0037] In addition, all neighbor nodes in the neighbor node list are used as candidate nodes, but during the election, nodes that match the historical relay node identifier are first filtered among all neighbor nodes and given extremely low weight (or even zero weight) so that they are almost never selected.

[0038] Step S205: Determine the target relay node among the multiple neighboring nodes, encapsulate the voice data, the source node information, and the target relay node identifier corresponding to the target relay node to obtain a target communication broadcast frame, and broadcast the target communication broadcast frame to the multiple neighboring nodes.

[0039] In this embodiment, the current node elects a target relay node from multiple neighboring nodes. First, each neighbor record is read, containing signal strength index (RSSI) and wireless link quality. To standardize the units, the RSSI is normalized to the 0-1 range: for example, a preset effective range of -95dBm to -30dBm, with the normalization formula being RSSI. norm =(RSSI+95) / 65, with a value of 0 or 1 if the value exceeds the boundary. Simultaneously, obtain the first weight w1 (signal strength weight) and the second weight w2 (link quality weight). Based on outdoor measurement data, set w1=0.3 and w2=0.7, meaning link quality is more important, prioritizing stable neighbors as relays. For each candidate neighbor node, calculate the communication quality score by weighting and summing the above signal strength, wireless link quality, first weight, and second weight. This achieves dynamic selection of the most suitable relay node in the current environment, balancing signal strength and long-term stability.

[0040] Next, the voice data and source node information (source ID + sequence number) are extracted from the received current communication broadcast frame. These two parts remain unchanged during forwarding. The current node records the "current relay node identifier" field from the current communication broadcast frame into the historical relay node identifier, and then records the identifier corresponding to the selected target relay node. Simultaneously, the cumulative hop count in the frame needs to be updated: the cumulative hop count in the current communication broadcast frame is read, incremented by 1, and the new cumulative hop count is obtained. Finally, the current node encapsulates the above fields into a new data packet. After encapsulation, the target communication broadcast frame is sent to all neighboring nodes via the Bluetooth broadcast channel. Because this frame is broadcast, all neighbors within the radio frequency coverage area can receive it, but only nodes whose relay node identifier matches their own ID will continue to forward it; other neighbors will only play the voice.

[0041] This application establishes an ad hoc network by pairing a current Bluetooth headset with at least one other Bluetooth headset, enabling multiple headset nodes to collaborate and extend communication range without relying on a mobile phone or base station. It receives current communication broadcast frames from other nodes in the ad hoc network. These broadcast frames contain voice data, source node information, and a current relay node identifier, allowing each node to identify the voice source and forwarding responsibility. When the source node information is not present in the current node's preset storage space, it stores the information and plays the voice data, preventing the same voice content from being played repeatedly and improving the listening experience. When the current relay node identifier matches the current node identifier, multiple neighboring nodes corresponding to the current node are determined based on the ad hoc network, ensuring that only the designated node initiates forwarding preparation, reducing unnecessary processing. A target relay node is determined from among the multiple neighboring nodes, and the voice data, source node information, and target relay node identifier are encapsulated into a target communication broadcast frame, which is then broadcast to all neighboring nodes, thus achieving the relay transmission of voice data from the current node to a more distant area. Through the aforementioned multi-hop relay method, the effective communication distance of Bluetooth headsets can be extended from hundreds of meters to over a kilometer, enabling Bluetooth headsets to achieve long-distance communication even in environments without a network, thus significantly improving communication coverage.

[0042] In some optional implementations of this embodiment, the step of determining the target relay node among the plurality of neighboring nodes includes: Obtain the signal strength and wireless link quality corresponding to each of the neighboring nodes, as well as the first weight corresponding to the signal strength and the second weight corresponding to the wireless link quality; The communication quality score of each neighbor node is calculated based on the signal strength, the wireless link quality, the first weight, and the second weight. Among the multiple neighboring nodes, the node with the highest communication quality score is selected as the target relay node.

[0043] In this embodiment, the signal strength and wireless link quality of each neighboring node can be read from the current node's neighbor node list. This table is dynamically updated through periodic beacon frame interactions, with one record corresponding to each neighboring node. The Signal Strength Index (RSSI) is the received signal strength indication when a beacon frame or heartbeat frame is received from that neighboring node, and the RSSI value is normalized to the range of 0 to 1. For example, if the preset effective RSSI range is -95dBm to -30dBm, then the normalization formula is: RSSI norm =(RSSI+95) / 65. If RSSI is higher than -30dBm, it is set to 1; if it is lower than -95dBm, it is set to 0. Wireless link quality refers to the reception success rate based on a past period (e.g., the last 10 interactions), that is, the proportion of successful receptions of a neighbor node's response or beacon out of the total expected number of interactions, with a value ranging from 0 to 1. The current node also pre-stores a first weight (w1) and a second weight (w2), used to adjust the proportion of signal strength and link quality in the total score, respectively. In a specific example, based on a large amount of outdoor measurement data, w1=0.3 and w2=0.7 are set, meaning link quality is more important, prioritizing neighbors with stable connections and low packet loss rates as relays. Next, a communication quality score is calculated for each candidate neighbor node by multiplying the signal strength by the first weight and adding the wireless link quality score by the second weight. The node with the highest communication quality score is determined as the target relay node.

[0044] This application selects the optimal relay node by calculating a weighted score of signal strength and link quality, which can improve the success rate of relay transmission, reduce voice packet loss and repeated forwarding, thereby extending the effective communication distance and ensuring intercom quality.

[0045] In some optional implementations of this embodiment, the current communication broadcast frame further includes a cumulative hop count and a historical relay node identifier. The step of determining multiple neighboring nodes corresponding to the current node based on the ad hoc network when the current relay node identifier matches the current node identifier corresponding to the current node includes: When the current relay node identifier is consistent with the current node identifier, check whether the cumulative hop count is less than or equal to the preset hop count limit; If the cumulative number of hops is less than or equal to the preset hop count limit, then based on the self-organizing network, obtain the list of neighboring nodes of the current node; Based on the historical relay node identifier, the nodes in the neighbor node list are filtered to obtain multiple neighbor nodes.

[0046] In this embodiment, the current node receives a current communication broadcast frame from the previous hop node via its Bluetooth receiver module. This current communication broadcast frame includes the following fields: voice data, source node identifier (ID), sequence number, current relay node identifier, cumulative hop count, and historical relay node identifier. The sequence number refers to the incrementing number assigned by the source node to each frame of voice data; the cumulative hop count indicates the number of relays the broadcast frame has passed through; and the historical relay node identifier records the labels of the historical relay nodes for this broadcast frame.

[0047] The system determines whether the current node needs to undertake a broadcast task based on the current relay node's identifier. Specifically, when the current relay node identifier matches the current node identifier, it means that the current node has been designated as the relay for this broadcast frame and needs to undertake the forwarding task. Before forwarding, the current node first checks the cumulative hop count. If the cumulative hop count is less than or equal to the preset hop count limit, forwarding is allowed to continue; if the cumulative hop count has reached the hop count limit, the current node will no longer perform any forwarding or playback (because further forwarding will not expand the coverage area and will waste resources). The preset hop count limit is the maximum number of times a broadcast frame is allowed to be forwarded in the network, a parameter that ensures the stable and efficient operation of the ad hoc network.

[0048] When the cumulative number of hops is less than or equal to the preset hop count limit, the current node obtains its neighbor node list based on the ad hoc network. This neighbor node list is a dynamic table that the current node maintains through periodic beacon scanning, recording all other nodes that can communicate directly with one hop, their corresponding RSSI values, link quality, etc.

[0049] To avoid selecting nodes that have previously performed relay forwarding, the neighbor node list needs to be filtered based on historical relay node identifiers. For example, if the current node's neighbor node list includes A, B, C, D, E, and F, where A, B, and C are historical relay nodes, then filtering the neighbor node list yields D, E, and F as the current node's neighbors. These nodes will serve as the candidate pool for subsequent relay elections. The current node will then elect the optimal node from these candidate nodes based on metrics such as link quality as the next-hop target relay node.

[0050] This application avoids the unlimited propagation of voice frames by setting a hop limit and filters historical relay nodes to prevent immediate data backhaul, thereby reducing wireless channel congestion and invalid forwarding, extending network communication distance and improving multi-hop transmission efficiency.

[0051] In some optional implementations of this embodiment, the plurality of neighboring nodes include the target relay node and other neighboring nodes, and the step of broadcasting the target communication broadcast frame to the plurality of neighboring nodes includes: If a disconnection is detected between the current node and the target relay node, a backup node is determined based on the self-organizing network. The target relay node identifier in the target communication broadcast frame is replaced with the backup node identifier corresponding to the backup node to obtain a repair broadcast frame, which is then broadcast to the backup node and the other neighboring nodes.

[0052] In this embodiment, before detecting whether the current node and the target relay node have lost connection, it is first determined that the current node's cumulative hop count is less than the preset maximum hop count limit, to ensure that the target relay node needs to continue broadcasting after receiving the broadcast frame. Then, the current node sends heartbeat probe packets to the target relay node at a fixed period (e.g., 2 seconds) and expects to receive a response. If no heartbeat response is received from the target relay node three consecutive times, it is determined that the target relay node has lost connection (possibly due to shutdown, exceeding distance, or hardware failure). At this time, the current node suspends the transmission of subsequent broadcast frames and determines an available backup node based on its locally maintained ad hoc network topology information (including a neighbor node list, routing table, and historical beacon records).

[0053] The target communication broadcast frame already encapsulates voice data, source node information, and the original target relay node identifier. The current node modifies the target relay node identifier field in the frame header to the identifier field corresponding to the backup node, while leaving the remaining fields (source node ID, sequence number, voice payload, etc.) unchanged. The modified broadcast frame is a repair broadcast frame. The current node broadcasts the repair broadcast frame to the newly selected backup node and other neighboring nodes.

[0054] This application maintains the continuity and coverage of long-distance intercom by automatically switching to a backup node to continue broadcasting when the link is lost, thus avoiding interruption of voice transmission and reducing communication failures caused by node departure or failure.

[0055] In some optional implementations of this embodiment, the step of determining the backup node based on the ad hoc network includes: Based on the self-organizing network, obtain the neighbor nodes of the target relay node; According to the preset routing table, find the alternative path for the current node to broadcast to the neighboring nodes of the target relay node; The backup node is determined in the backup path.

[0056] In this embodiment, the current node obtains the list of neighboring nodes of the target relay node based on the ad hoc network topology information it maintains locally. The neighboring nodes of the target relay node are those nodes that can directly receive the target relay node's broadcasts during normal communication. The current node can obtain this information in the following ways: during the network initialization phase, each node exchanges and stores some neighbor relationships; through previously received routing tables or beacon frames broadcast by the target relay node, the current node learns the target relay node's coverage area; the current node infers the target relay node's neighboring nodes based on the path information carried in historically monitored broadcast frames. For example, the current node knows that the target relay node's neighbors include nodes A, B, and C. Node A is also a one-hop neighbor of the current node (i.e., the current node can communicate directly with node A), while nodes B and C require multiple hops to reach. The current node's goal is to find an alternative path originating from itself that can reach at least one neighboring node (e.g., node A) of the target relay node, and this alternative path does not pass through the target relay node whose connection has been broken.

[0057] Next, the current node queries its local routing table. This routing table is dynamically maintained through periodic route broadcasts and neighbor discovery, recording the next-hop node and hop count information for each destination node. The current node uses a neighbor node of the target relay node (e.g., node A) as its destination address and searches the routing table for a path from the current node to node A, provided that the first hop (next-hop node) of this path is not the target relay node whose link has been broken. Since node A is a one-hop neighbor of the current node (the two can communicate directly), the current node's routing table contains an entry directly to node A: next-hop node is node A, and hop count is 1. This path constitutes a backup path. If a neighbor node of the target relay node (e.g., node B) is not a one-hop neighbor of the current node, the current node searches for a multi-hop path. For example, if the routing table shows that the current node can reach node B via node D (2 hops), and node D is online and has good link quality, then the path from the current node to node D and then to node B is also a backup path. After finding all the alternative paths of each neighboring node that can reach the target relay node, the current node extracts the first-hop node (i.e. the next-hop node that node A needs to directly send broadcast frames) from these paths as a candidate alternative node.

[0058] This application obtains alternative paths by searching the neighboring nodes of the target relay node, which can quickly obtain alternative relays without initiating a full network query, shortening the link break repair time and ensuring the continuous transmission of multi-hop voice data.

[0059] In some optional implementations of this embodiment, after the step of broadcasting the target communication broadcast frame to the plurality of neighboring nodes, the method further includes: When a communication termination signal is detected in the current Bluetooth headset, the transmission power of the current Bluetooth headset is adjusted to a preset base power. According to a preset time interval, the current Bluetooth beacon frame is broadcast to at least one other Bluetooth headset, so that other nodes in the ad hoc network update their respective neighbor node lists based on the beacon frame.

[0060] In this embodiment, the communication termination signal includes one or more of the following: the user releases the Bluetooth headset's intercom button and does not press it again for a preset mute time (e.g., 1 second); when the current Bluetooth headset is acting as a relay node, its forwarding queue is empty and a preset idle time (e.g., 2 seconds) has been exceeded. When the communication termination signal is detected, the bias voltage of the radio frequency power amplifier (PA) is controlled to gradually or all at once reduce the transmit power from the high power value in broadcast mode (e.g., 100mW to 500mW) to a preset base power (e.g., 0dBm or -6dBm). This base power only needs to ensure that the beacon frame can be reliably received by neighboring nodes within a short distance (e.g., 10 to 30 meters), thereby significantly reducing power consumption.

[0061] Next, the current Bluetooth headset enters a low duty cycle standby mode. Each Bluetooth headset is configured with a timer that periodically wakes up at preset time intervals (e.g., 2 seconds) and performs a beacon frame broadcast operation within a short window (e.g., 20 milliseconds) after each wake-up. The current Bluetooth headset sends this beacon frame to all other Bluetooth headsets within its radio frequency coverage area via the broadcast channel. After receiving the beacon frame, other Bluetooth headsets (i.e., neighboring nodes in the ad hoc network) parse the node ID and update their respective local neighbor node lists: if the node ID is a newly appeared neighbor, a new entry is added, recording the reception timestamp and signal strength; if it already exists, the link quality parameters are updated. Through this periodic beacon broadcasting and receiving, even if the device enters a low-power standby state, its online status can still be perceived by the entire ad hoc network, maintaining the network's topological connectivity.

[0062] This application significantly reduces standby power consumption by reducing transmission power and periodically broadcasting beacon frames after communication ends, while maintaining real-time updates of the neighbor node list in the ad hoc network, allowing the headset to maintain network connectivity even in power-saving mode.

[0063] In some optional implementations of this embodiment, the steps of pairing the current Bluetooth headset with at least one other Bluetooth headset to establish an ad hoc network include: In response to a pairing trigger signal, a pairing request frame from at least one other Bluetooth headset is received, and a pairing confirmation frame is generated based on the pairing request frame. The establishment of a communication link between the Bluetooth headset and at least one other Bluetooth headset is completed based on the pairing confirmation frame, thus obtaining the self-organizing network.

[0064] In this embodiment, the current Bluetooth headset, in pairing mode, sends a pairing request frame via a broadcast channel. This pairing request frame includes at least the device's node ID, device type identifier, and maximum supported hop count. Simultaneously, the current Bluetooth headset also receives pairing request frames from peer devices, where the peer device is sending a request to another Bluetooth headset. The current Bluetooth headset can pair with multiple Bluetooth headsets. After receiving the pairing request frame from the peer device, the current Bluetooth headset parses the node ID and protocol version to verify compatibility. Upon successful verification, the current Bluetooth headset generates a pairing confirmation frame, which includes the device's node ID and an indication of agreement to establish a link. The current Bluetooth headset sends the pairing confirmation frame to the peer device and receives a pairing confirmation frame returned by the peer device. After the handshake is completed, a communication link (e.g., an ACL link or a LE-CIS link) is established according to the Bluetooth protocol standard.

[0065] Once the communication link is established, the current Bluetooth headset and connected Bluetooth headsets can exchange initial routing information, such as their respective lists of other known nodes, routing table entries, and channel interference maps. Subsequently, using the paired device (the current or connected Bluetooth headset) as an anchor point, more Bluetooth headsets can be added to the network sequentially. For example, pairing the current Bluetooth headset with a third headset using the same steps, the third headset obtains the existing node list and routing information from this device and broadcasts a join notification. Repeating this chain-like expansion operation allows the network to be scaled up to multiple nodes.

[0066] After joining the network, each node periodically (e.g., every 2 seconds) broadcasts a beacon frame. This beacon frame contains at least its own node ID and the current hop count (usually 1). Simultaneously, each node receives beacon frames broadcast by other nodes within its radio coverage area and updates its local neighbor list based on the received beacon frames, recording reachable neighbors within one hop, their signal strength, link quality, and other information. Through neighbor discovery and beacon interaction, each node gradually improves its local neighbor table. Combined with the routing table broadcast mechanism, this ultimately forms a multi-node, self-organizing distributed network, i.e., an ad hoc network. In this ad hoc network, multi-hop paths may exist between any two nodes, and voice broadcast frames can be forwarded hop-by-hop through relay nodes.

[0067] This application establishes a communication link and exchanges routing information through pairing, and then gradually forms a multi-hop network through chain expansion and beacon broadcasting, enabling multiple Bluetooth headsets to form a network autonomously without external devices, laying the foundation for long-distance intercom.

[0068] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.

[0069] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.

[0070] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware through computer-readable instructions. These computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).

[0071] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0072] Further reference Figure 3 As a response to the above Figure 2 The implementation of the method shown in this application provides an embodiment of a Bluetooth headset communication device, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0073] like Figure 3As shown, the Bluetooth headset communication device 300 described in this embodiment includes: an establishment module 301, a receiving module 302, a storage module 303, a determination module 304, and a broadcast module 305. Wherein: The module 301 is used to pair the current Bluetooth headset with at least one other Bluetooth headset to establish a self-organizing network, wherein the self-organizing network includes multiple nodes, and one Bluetooth headset corresponds to one node; The receiving module 302 is used to receive current communication broadcast frames sent by other nodes in the self-organizing network. The current communication broadcast frame includes voice data, source node information and current relay node identifier. The storage module 303 is used to store the source node information into the preset storage space when the source node information does not exist in the preset storage space of the current node corresponding to the current Bluetooth headset, and to control the current Bluetooth headset to play the voice data. The determination module 304 is used to determine multiple neighbor nodes corresponding to the current node based on the ad hoc network when the current relay node identifier is consistent with the current node identifier corresponding to the current node. The broadcast module 305 is used to determine the target relay node among the multiple neighboring nodes, encapsulate the voice data, the source node information and the target relay node identifier corresponding to the target relay node to obtain a target communication broadcast frame, and broadcast the target communication broadcast frame to the multiple neighboring nodes.

[0074] The Bluetooth headset communication device provided in this application forms an ad hoc network by pairing the current Bluetooth headset with at least one other Bluetooth headset, enabling multiple headset nodes to cooperate and extend the communication range without relying on a mobile phone or base station. It receives current communication broadcast frames sent by other nodes in the ad hoc network. These broadcast frames contain voice data, source node information, and a current relay node identifier, allowing each node to identify the voice source and forwarding responsibility. When the source node information is not present in the current node's preset storage space, the information is stored and the voice data is played, preventing the same voice content from being played repeatedly and improving the listening experience. When the current relay node identifier matches the current node identifier, multiple neighboring nodes corresponding to the current node are determined based on the ad hoc network, ensuring that only the designated node initiates forwarding preparation, reducing unnecessary processing. A target relay node is determined among the multiple neighboring nodes, and the voice data, source node information, and target relay node identifier are encapsulated into a target communication broadcast frame, which is then broadcast to all neighboring nodes, thus realizing the relay transmission of voice data from the current node to a more distant area. Through the aforementioned multi-hop relay method, the effective communication distance of Bluetooth headsets can be extended from hundreds of meters to over a kilometer, enabling Bluetooth headsets to achieve long-distance communication even in environments without a network, thus significantly improving communication coverage.

[0075] In some optional implementations of this embodiment, the broadcast module 305 is further configured to: Obtain the signal strength and wireless link quality corresponding to each of the neighboring nodes, as well as the first weight corresponding to the signal strength and the second weight corresponding to the wireless link quality; The communication quality score of each neighbor node is calculated based on the signal strength, the wireless link quality, the first weight, and the second weight. Among the multiple neighboring nodes, the node with the highest communication quality score is selected as the target relay node.

[0076] The Bluetooth headset communication device provided in this application selects the optimal relay node by calculating a weighted score of signal strength and link quality, which can improve the success rate of relay transmission, reduce voice packet loss and repeated forwarding, thereby extending the effective communication distance and ensuring the quality of intercom.

[0077] In some optional implementations of this embodiment, the determining module 304 is further configured to: When the current relay node identifier is consistent with the current node identifier, check whether the cumulative hop count is less than or equal to the preset hop count limit; If the cumulative number of hops is less than or equal to the preset hop count limit, then based on the self-organizing network, obtain the list of neighboring nodes of the current node; Based on the historical relay node identifier, the nodes in the neighbor node list are filtered to obtain multiple neighbor nodes.

[0078] The Bluetooth headset communication device provided in this application avoids the infinite propagation of voice frames by setting an upper limit on the number of hops and filters historical relay nodes to prevent data from being immediately transmitted back, thereby reducing wireless channel congestion and invalid forwarding, extending the network communication distance and improving multi-hop transmission efficiency.

[0079] In some optional implementations of this embodiment, the broadcast module 305 is further configured to: If a disconnection is detected between the current node and the target relay node, a backup node is determined based on the self-organizing network. The target relay node identifier in the target communication broadcast frame is replaced with the backup node identifier corresponding to the backup node to obtain a repair broadcast frame, which is then broadcast to the backup node and the other neighboring nodes.

[0080] The Bluetooth headset communication device provided in this application automatically switches to a backup node to continue broadcasting when the link is lost, avoiding interruption of voice transmission and reducing communication failures caused by node departure or failure, thereby maintaining the continuity and coverage of long-distance intercom.

[0081] In some optional implementations of this embodiment, the broadcast module 305 is further configured to: Based on the self-organizing network, obtain the neighbor nodes of the target relay node; According to the preset routing table, find the alternative path for the current node to broadcast to the neighboring nodes of the target relay node; The backup node is determined in the backup path.

[0082] The Bluetooth headset communication device provided in this application obtains an alternative path by searching the neighboring nodes of the target relay node. It can quickly obtain an alternative relay without initiating a full network query, shortening the link breakage repair time and ensuring the continuous transmission of multi-hop voice.

[0083] In some optional implementations of this embodiment, the broadcast module 305 is further configured to: When a communication termination signal is detected in the current Bluetooth headset, the transmission power of the current Bluetooth headset is adjusted to a preset base power. According to a preset time interval, the current Bluetooth beacon frame is broadcast to at least one other Bluetooth headset, so that other nodes in the ad hoc network update their respective neighbor node lists based on the beacon frame.

[0084] The Bluetooth headset communication device provided in this application can significantly reduce standby power consumption by reducing the transmission power and periodically broadcasting beacon frames after communication ends, while maintaining real-time updates of the neighbor node list in the ad hoc network, so that the headset can still maintain network connectivity in a power-saving state.

[0085] In some optional implementations of this embodiment, the establishment module 301 is further configured to: In response to a pairing trigger signal, a pairing request frame from at least one other Bluetooth headset is received, and a pairing confirmation frame is generated based on the pairing request frame. The establishment of a communication link between the Bluetooth headset and at least one other Bluetooth headset is completed based on the pairing confirmation frame, thus obtaining the self-organizing network.

[0086] The Bluetooth headset communication device provided in this application establishes a communication link and exchanges routing information through pairing, and then gradually forms a multi-hop network through chain expansion and beacon broadcasting, enabling multiple Bluetooth headsets to form a network autonomously without external devices, laying the foundation for long-distance intercom.

[0087] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0088] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected via a system bus. It should be noted that only the computer device 4 with components 41, 42, and 43 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0089] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.

[0090] The memory 41 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as the hard disk or memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 4. Of course, the memory 41 may also include both the internal storage unit and its external storage device of the computer device 4. In this embodiment, the memory 41 is typically used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions for Bluetooth headset communication methods. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or will be output.

[0091] In some embodiments, the processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to execute computer-readable instructions stored in the memory 41 or to process data, for example, to execute computer-readable instructions for the Bluetooth headset communication method.

[0092] The network interface 43 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 4 and other electronic devices.

[0093] The computer device provided in this application forms an ad hoc network by pairing a current Bluetooth headset with at least one other Bluetooth headset, enabling multiple headset nodes to cooperate and extend communication range without relying on a mobile phone or base station. It receives current communication broadcast frames sent by other nodes in the ad hoc network. These broadcast frames contain voice data, source node information, and a current relay node identifier, allowing each node to identify the voice source and forwarding responsibility. When the source node information is not present in the current node's preset storage space, the information is stored and the voice data is played, preventing the same voice content from being played repeatedly and improving the listening experience. When the current relay node identifier matches the current node identifier, multiple neighboring nodes corresponding to the current node are determined based on the ad hoc network, ensuring that only the designated node initiates forwarding preparation, reducing unnecessary processing. A target relay node is determined among the multiple neighboring nodes, and the voice data, source node information, and target relay node identifier are encapsulated into a target communication broadcast frame and broadcast to all neighboring nodes, thus realizing the relay transmission of voice data from the current node to a more distant area. Through the aforementioned multi-hop relay method, the effective communication distance of Bluetooth headsets can be extended from hundreds of meters to over a kilometer, enabling Bluetooth headsets to achieve long-distance communication even in environments without a network, thus significantly improving communication coverage.

[0094] This application also provides another embodiment, namely, providing a computer-readable storage medium storing computer-readable instructions that can be executed by at least one processor to cause the at least one processor to perform the steps of the Bluetooth headset communication method described above.

[0095] The computer-readable storage medium provided in this application enables multiple headset nodes to cooperate and extend communication range without relying on mobile phones or base stations by pairing a current Bluetooth headset with at least one other Bluetooth headset to form an ad hoc network. It receives current communication broadcast frames sent by other nodes in the ad hoc network. These broadcast frames contain voice data, source node information, and a current relay node identifier, allowing each node to identify the voice source and forwarding responsibility. When the source node information is not present in the current node's preset storage space, the information is stored and the voice data is played, preventing the same voice content from being played repeatedly and improving the listening experience. When the current relay node identifier matches the current node identifier, multiple neighboring nodes corresponding to the current node are determined based on the ad hoc network, ensuring that only the designated node initiates forwarding preparation, reducing unnecessary processing. A target relay node is determined among the multiple neighboring nodes, and the voice data, source node information, and target relay node identifier are encapsulated into a target communication broadcast frame and broadcast to all neighboring nodes, thus realizing the relay transmission of voice data from the current node to a more distant area. Through the aforementioned multi-hop relay method, the effective communication distance of Bluetooth headsets can be extended from hundreds of meters to over a kilometer, enabling Bluetooth headsets to achieve long-distance communication even in environments without a network, thus significantly improving communication coverage.

[0096] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they 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 this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0097] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, these embodiments are provided to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.

Claims

1. A Bluetooth headset communication method, characterized in that, Includes the following steps: The current Bluetooth headset is paired with at least one other Bluetooth headset to establish a self-organizing network, which includes multiple nodes, with one Bluetooth headset corresponding to one node; Receive current communication broadcast frames sent by other nodes in the self-organizing network, wherein the current communication broadcast frames include voice data, source node information and current relay node identifier; When the source node information is not present in the preset storage space of the current node corresponding to the current Bluetooth headset, the source node information is stored in the preset storage space, and the current Bluetooth headset is controlled to play the voice data. When the current relay node identifier is consistent with the current node identifier corresponding to the current node, multiple neighbor nodes corresponding to the current node are determined according to the ad hoc network. A target relay node is determined among the multiple neighboring nodes. The voice data, the source node information, and the target relay node identifier corresponding to the target relay node are encapsulated to obtain a target communication broadcast frame, which is then broadcast to the multiple neighboring nodes.

2. The Bluetooth headset communication method according to claim 1, characterized in that, The step of determining the target relay node among the multiple neighboring nodes includes: Obtain the signal strength and wireless link quality corresponding to each of the neighboring nodes, as well as the first weight corresponding to the signal strength and the second weight corresponding to the wireless link quality; The communication quality score of each neighbor node is calculated based on the signal strength, the wireless link quality, the first weight, and the second weight. Among the multiple neighboring nodes, the node with the highest communication quality score is selected as the target relay node.

3. The Bluetooth headset communication method according to claim 1, characterized in that, The current communication broadcast frame also includes a cumulative hop count and historical relay node identifiers. When the current relay node identifier matches the current node identifier corresponding to the current node, multiple neighbor nodes corresponding to the current node are determined based on the ad hoc network, including: When the current relay node identifier is consistent with the current node identifier, check whether the cumulative hop count is less than or equal to the preset hop count limit; If the cumulative number of hops is less than or equal to the preset hop count limit, then based on the self-organizing network, obtain the list of neighboring nodes of the current node; Based on the historical relay node identifier, the nodes in the neighbor node list are filtered to obtain multiple neighbor nodes.

4. The Bluetooth headset communication method according to claim 1, characterized in that, The plurality of neighboring nodes includes the target relay node and other neighboring nodes, and broadcasting the target communication broadcast frame to the plurality of neighboring nodes includes: If a disconnection is detected between the current node and the target relay node, a backup node is determined based on the self-organizing network. The target relay node identifier in the target communication broadcast frame is replaced with the backup node identifier corresponding to the backup node to obtain a repair broadcast frame, which is then broadcast to the backup node and the other neighboring nodes.

5. The Bluetooth headset communication method according to claim 4, characterized in that, The step of determining backup nodes based on the self-organizing network includes: Based on the self-organizing network, obtain the neighbor nodes of the target relay node; According to the preset routing table, find the alternative path for the current node to broadcast to the neighboring nodes of the target relay node; The backup node is determined in the backup path.

6. The Bluetooth headset communication method according to claim 1, characterized in that, After broadcasting the target communication broadcast frame to the multiple neighboring nodes, the method further includes: When a communication termination signal is detected in the current Bluetooth headset, the transmission power of the current Bluetooth headset is adjusted to a preset base power. According to a preset time interval, the current Bluetooth beacon frame is broadcast to at least one other Bluetooth headset, so that other nodes in the ad hoc network update their respective neighbor node lists based on the beacon frame.

7. The Bluetooth headset communication method according to any one of claims 1 to 6, characterized in that, The step of pairing the current Bluetooth headset with at least one other Bluetooth headset to establish an ad hoc network includes: In response to a pairing trigger signal, a pairing request frame from at least one other Bluetooth headset is received, and a pairing confirmation frame is generated based on the pairing request frame. The establishment of a communication link between the Bluetooth headset and at least one other Bluetooth headset is completed based on the pairing confirmation frame, thus obtaining the self-organizing network.

8. A Bluetooth headset communication device, characterized in that, include: A setup module is used to pair the current Bluetooth headset with at least one other Bluetooth headset to establish a self-organizing network, wherein the self-organizing network includes multiple nodes, with one Bluetooth headset corresponding to one node; The receiving module is used to receive current communication broadcast frames sent by other nodes in the self-organizing network. The current communication broadcast frame includes voice data, source node information, and current relay node identifier. The storage module is used to store the source node information into the preset storage space when the source node information does not exist in the preset storage space of the current node corresponding to the current Bluetooth headset, and to control the current Bluetooth headset to play the voice data. The determination module is used to determine multiple neighbor nodes corresponding to the current node based on the ad hoc network when the current relay node identifier is consistent with the current node identifier corresponding to the current node. The broadcast module is used to determine the target relay node among multiple neighboring nodes, encapsulate the voice data, the source node information, and the target relay node identifier corresponding to the target relay node to obtain a target communication broadcast frame, and broadcast the target communication broadcast frame to multiple neighboring nodes.

9. A computer device, characterized in that, The device includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement the steps of the Bluetooth headset communication method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the Bluetooth headset communication method as described in any one of claims 1 to 7.