Implementation method of multi-user ad hoc network talkback based on Bluetooth
By introducing a multi-person self-organized network intercom method into Bluetooth intercom technology, the existing Bluetooth intercom technology has solved the problems of cumbersome pairing, fixed device location, limited networking capabilities, and poor voice transmission quality in existing Bluetooth intercom technology, and achieved convenient, efficient and high-quality multi-person real-time intercom communication, supported multiple topological structures, and ensured low-latency and high-definition voice communication through special voice transmission channels and processing technologies.
Patent Information
- Application Number
- CN202510419748.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2045-04-03
AI Technical Summary
The existing Bluetooth intercom technology has problems such as cumbersome pairing process, fixed equipment location, limited networking capabilities, and poor voice transmission quality, which is difficult to meet the convenience, efficiency and high-quality needs of multi-person real-time intercom communication.
The multi-person self-organizing network intercom method is adopted based on Bluetooth. The network request is initiated through the devices to be organized, and the surrounding equipment is discovered by broadcast or scanning, the devices that meet the preset connection conditions are selected, the data transmission channel and voice transmission channel are established, and the network connection is dynamically adjusted through the connection quality evaluation mechanism.
It realizes the convenience, efficiency and high quality of multi-person real-time intercom communication, simplifies user operations, improves network efficiency and reliability, supports multiple topological structures, meets the needs of different scenarios, and ensures low latency and high definition voice communication through special voice transmission channels and processing technologies.
Smart Images

Figure CN120224121A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of communication technologies, and particularly relates to a method for implementing multi-person ad-hoc network intercom based on Bluetooth. Background Art
[0002] With the development of society and the progress of technologies, people's demand for instant communication is increasing day by day. Especially in outdoor activities, group outings and other situations where real-time communication is required, it becomes particularly important to quickly establish a temporary communication network. Traditional voice communication means such as relying on cellular networks or WiFi often cannot meet the requirements in remote areas, where network coverage is insufficient or there are additional costs involved. Although walkie-talkies are widely used in various occasions due to their portability, they also have disadvantages such as high power consumption, poor sound quality, and only supporting half-duplex intercom, which affect the user experience.
[0003] Bluetooth technology has been widely used in short-distance communication due to its advantages such as low power consumption and low cost. However, existing Bluetooth intercom solutions still have obvious deficiencies in group intercom applications:
[0004] In actual use, traditional Bluetooth intercom solutions have a series of technical problems that restrict their wide and efficient application. The device pairing process is cumbersome and complex, completely relying on manual operation by users, and the pairing action has to be repeated before each use; in traditional Bluetooth intercom solutions, the device positions are fixed after pairing. When the device or the device position changes, the routing switch is not timely, and it cannot adapt to dynamically changing scenarios; the networking ability of traditional Bluetooth intercom solutions is usually limited to two people, with limited networking ability and it is difficult to meet the needs of multi-person networking; the voice transmission quality of traditional Bluetooth intercom solutions is not high, with problems such as unclear voice and high latency, and the poor voice transmission quality affects the user experience.
[0005] In summary, there are problems in existing Bluetooth intercom technologies such as a cumbersome pairing process, fixed device positions, limited networking ability, and poor voice transmission quality. These problems limit the application of Bluetooth technology in multi-person real-time intercom scenarios. Existing Bluetooth voice intercom technologies cannot well meet the needs of users for convenient, efficient, and high-quality multi-person real-time intercom communication in various scenarios. Therefore, there is an urgent need to provide a method for implementing multi-person ad-hoc network intercom based on Bluetooth, which can meet the needs of convenient, efficient, and high-quality multi-person real-time intercom communication. Summary of the Invention
[0006] In order to solve the above technical problems, the present invention provides a method for implementing multi-person ad-hoc network intercom based on Bluetooth, which can meet the needs of convenient, efficient, and high-quality multi-person real-time intercom communication.
[0007] The technical solution adopted by the present invention is as follows: A method for implementing multi-person ad-hoc network intercom based on Bluetooth, comprising the following steps:
[0008] The device to be networked initiates a network formation request;
[0009] In a broadcast or scanning manner, the device to be networked sends broadcast data packets to surrounding devices and continuously scans for surrounding devices;
[0010] Devices whose various parameters meet the preset connection conditions among the surrounding devices are selected as target network formation devices;
[0011] A communication channel connection is established between the device to be networked and the target network formation device, and the communication channel includes a data transmission channel and a voice transmission channel;
[0012] A connection quality assessment mechanism is used to assess the connection quality of the communication channel, generate an assessment result, and adjust the network formation connection according to the assessment result.
[0013] Furthermore, the connection process of the communication channel includes the following steps:
[0014] A data transmission channel connection request is initiated to establish multiple data transmission channel connections between the device to be networked and the target network formation device;
[0015] Network formation information exchange is completed;
[0016] A voice transmission channel connection is initiated to establish multiple voice transmission channel connections between the device to be networked and the target network formation device.
[0017] Furthermore, the network formation method includes serial network formation. The network formation information of the serial network formation includes a head device, intermediate devices, a tail device, the positions of each device in the network, the number of devices in the network, and the device address list in the network. There are several intermediate devices located between the head device and the tail device;
[0018] The information synchronization of the serial network formation includes the following steps:
[0019] The target network formation device successfully connected to the device to be networked is a new device, and the new device is connected to the serial network group. The new device simultaneously sends link update requests to the previous device and the next device until the head device receives the link update request;
[0020] The head device initiates a network formation information synchronization instruction, starting from the head device, and the network formation information synchronization instruction is transmitted step by step to the tail device;
[0021] After the tail device receives the network formation information synchronization instruction, starting from the tail device, each intermediate device in front of the tail device replies to the previous intermediate device and sends a response data packet;
[0022] The head device receives the response data packets from the middle device and the tail device, integrates them, generates summary information, and transmits the integrated summary information to the entire serial networking network;
[0023] After the networking information is transmitted, the head device and the tail device obtain identifiers respectively.
[0024] Furthermore, the networking mode of the network also includes tree networking, and the networking information of the tree networking includes a root node device, a stem node device, a leaf node device, the number of devices in the network, and a list of device addresses in the network;
[0025] The information synchronization of the tree-shaped network includes the following steps:
[0026] After a node device scans the target networking device, it connects the target networking device as a new device to the tree network group and sends a link change notification to the root node device;
[0027] The root node device receives the link change notification and initiates a network information synchronization request, which is then passed from the root node to each node device step by step.
[0028] Each node device receives the networking information synchronization request and replies to the root node device for confirmation.
[0029] Furthermore, a retransmission mechanism is provided in both the serial network group and the tree network group, and the retransmission mechanism is as follows:
[0030] It is determined whether the data packet sending device receives a response from the data packet receiving device within a preset response time after sending the data packet. If not, the data packet sending device retransmits.
[0031] Further, the connection quality assessment mechanism comprises the following steps:
[0032] Obtain the signal strength between the networking devices in real time, and determine whether the signal strength between the networking devices in the network is lower than the preset signal strength threshold. If so, trigger the reconnection mechanism and reselect the connection path;
[0033] Obtain the packet loss rate between the upstream networking device and the corresponding networking device of each networking device in the network in real time;
[0034] Determine whether the packet loss rate between the upstream networking device of each networking device in the network and the corresponding networking device is greater than a preset disconnection threshold. If so, disconnect the networking device from the corresponding upstream networking device and trigger reconnection;
[0035] Respectively determine whether the packet loss rate between the upstream networking device of each networking device in the network and the corresponding networking device is greater than a preset mute threshold and less than or equal to a preset disconnection threshold. If so, control the corresponding networking device to perform mute processing;
[0036] Determine whether the packet loss rate between the upstream networking device of each networking device in the network and the corresponding networking device is greater than a preset relay threshold and less than or equal to a preset mute threshold. If so, control the networking device to stop forwarding the data received from the corresponding upstream networking device.
[0037] Furthermore, the broadcasting or scanning adopts the broadcasting or scanning mechanism of Bluetooth Low Energy to realize the discovery of each device. The data transmission channel uses an asynchronous connectionless link to transmit networking information, and the voice transmission channel uses a synchronous connection-oriented link, an enhanced synchronous connection-oriented link, or an isochronous channel to transmit voice data in real time.
[0038] Furthermore, it also includes processing the voice data of the voice transmission channel. The process of processing the voice data includes:
[0039] The networking device to be networked collects the voice data from the target networking device successfully connected to the networking device to be networked through the voice transmission channel, and simultaneously collects the voice data of the local MIC of each device.
[0040] Use the VAD algorithm and volume detection to detect the voice data of the target networking device successfully connected to the networking device to be networked and the corresponding local MIC voice data, and screen out the valid voice data.
[0041] Mix the valid voice data and generate the mixed valid voice data.
[0042] Encode the mixed valid voice data and send it to the target networking device already connected to the networking device to be networked.
[0043] Advantages of the present invention:
[0044] 1. The networking device to be networked actively initiates a networking request, which simplifies the user operation and eliminates the need for manual settings. By adopting an automated broadcasting and scanning method, the device can quickly discover the available devices around, reducing the time cost of manual search and pairing. According to the preset connection conditions, the target networking device whose parameters of the devices around meet the preset connection conditions is selected, ensuring the selection of the most suitable networking device, improving the networking efficiency and reliability; establishing dedicated data transmission channels and voice transmission channels can process different types of information respectively, optimize the information transmission efficiency, reduce latency and interference, and ensure the best communication quality even in a complex and changeable environment by real-time monitoring the networking status and dynamically adjusting the networking connection.
[0045] 2. By using the broadcast or scanning mechanism of Bluetooth Low Energy, devices can automatically discover and connect to other devices without the need for a complex pre-pairing process. When the device's location changes, it can dynamically adjust the connection path to ensure a stable connection after the device's location changes. Compared with the traditional Bluetooth pairing method, this method is not strictly restricted by the device's location, improving flexibility and convenience of use.
[0046] 3. The present invention not only supports serial networking (head device, intermediate device, tail device), but also supports tree networking (root node device, stem node device, leaf node device). It can flexibly select the most suitable network structure according to the actual application scenario, with strong networking flexibility, supporting multiple topological structures to meet the needs of different scenarios. The device positions can be swapped arbitrarily to meet the requirements of different application scenarios.
[0047] 4. It realizes full-duplex real-time intercom, with communication efficiency and user experience superior to the half-duplex mode of walkie-talkies. By establishing multiple data transmission channels and voice transmission channels, it supports full-duplex real-time intercom. Each device can send and receive voice simultaneously to ensure efficient real-time communication.
[0048] 5. The dedicated voice transmission channel, combined with noise reduction, echo cancellation, VAD (Voice Activity Detection) and volume detection technologies, ensures low-latency and high-clarity voice communication. Through effective screening and mixing processing of voice data, the voice quality is further improved. The voice data from each device is effectively mixed to generate clear and coherent mixed voice data, ensuring that the voices of all participants can be clearly heard.
[0049] 6. By real-time monitoring parameters such as signal strength and packet loss rate between devices, it dynamically adjusts the connection path to ensure the stability and efficient operation of the network. When the device's location changes or a device joins / leaves the network, the system can automatically adjust the connection to ensure the stability and scalability of the network; the retransmission mechanism is used to ensure reliability. If the networking device does not receive a response within the preset response time, it will retransmit the data packet to ensure the reliability of data transmission and reduce data loss caused by network instability. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a flowchart of the implementation method of Bluetooth-based multi-person self-organizing network intercom provided by the embodiment of the present application;
[0051] Figure 2 It is a schematic diagram of the network topology of serial networking in the implementation method of Bluetooth-based multi-person self-organizing network intercom provided by the embodiment of the present application;
[0052] Figure 3 It is a schematic diagram of the network topology of tree networking in the implementation method of Bluetooth-based multi-person self-organizing network intercom provided by the embodiment of the present application;
[0053] Figure 4 It is a logic block diagram of the mixing logic in the implementation method of multi-person ad-hoc network intercom based on Bluetooth provided by the embodiments of this application. Detailed implementation manners
[0054] The following further describes in detail the implementation manners of the present invention in conjunction with the accompanying drawings and embodiments. The following embodiments are used to illustrate the present invention, but cannot be used to limit the scope of the present invention.
[0055] As Figures 1 to 4 shown, a method for implementing multi-person ad-hoc network intercom based on Bluetooth, as Figure 1 shown, includes the following steps:
[0056] The devices to be networked initiate a network formation request;
[0057] In a broadcast or scanning manner, the devices to be networked send broadcast data packets to surrounding devices and continuously scan the surrounding devices;
[0058] In this embodiment, device discovery is implemented by using the broadcast or scanning mechanism of Bluetooth Low Energy (BLE). After the device starts network formation, it starts continuous external broadcasting at a fixed interval of 32 milliseconds to inform surrounding devices of its own information and status. The data in the broadcast data packet includes the following content:
[0059] Device address: Assigned by the Bluetooth Special Interest Group (SIG) and used as a unique identifier for the device;
[0060] Signal strength: The strength of the communication signal between two networked devices, used to judge the distance between devices;
[0061] Manufacturer identifier: The manufacturer identifier of the device, used to distinguish manufacturers;
[0062] Manufacturer ID: Identifies the manufacturer;
[0063] Product ID: Defined according to the product model;
[0064] Network formation ID: Randomly assigned during network formation. Only devices with the same ID can be interconnected;
[0065] Peer device address: The peer device address in one network formation mode;
[0066] Busy flag: Indicates whether the device is busy;
[0067] Number of networked people: Represents the current number of networked people;
[0068] Connected device status: Stores the connection status of the data channel and the voice channel.
[0069] Select devices whose parameters of surrounding devices meet the preset connection conditions as target networking devices;
[0070] In this embodiment, while broadcasting, the device continuously scans the broadcast signals of surrounding devices, continuously scans the surrounding devices, and performs screening and processing based on factors such as signal strength. It preferentially processes devices with strong signals that meet the rules, and then filters according to the scanned broadcast packets to improve the discovery efficiency.
[0071] The parameters include: signal strength, broadcast packet length, manufacturer identifier, manufacturer ID, networking ID, Busy flag, number of devices in the group, and number of empty positions in the connected device list.
[0072] The preset connection conditions include:
[0073] The signal strength of the target networking device is greater than the connection signal strength threshold of -75 dBm;
[0074] The broadcast packet lengths, manufacturer identifiers, manufacturer IDs, and networking IDs of the target networking device and the device to be networked are equal;
[0075] The target networking device has no Busy flag, indicating that the target networking device is not busy, avoiding the connection failure and time waste caused by two or more devices connecting to each other;
[0076] The number of devices in the group is less than or equal to 8, flexibly controlling the number of connected devices to improve the experience;
[0077] The number of empty positions in the connected device list is greater than 0, and each device can directly connect to 3 devices.
[0078] In addition, if the address of the peer device is greater than its own device address, wait for the peer device to initiate a connection and do not initiate a connection actively.
[0079] Establish a communication channel connection between the device to be networked and the target networking device, and the communication channel includes a data transmission channel and a voice transmission channel;
[0080] Specifically, the connection process of the communication channel includes the following steps:
[0081] Initiate a data transmission channel connection request, establish multiple data transmission channel connections between the device to be networked and the target networking device, and complete the exchange of networking information;
[0082] Initiate the connection of the voice transmission channel to establish multiple voice transmission channel connections between the device to be networked and the target networked device. In this embodiment, the data transmission channel and the voice transmission channel are completely independent. First, establish the data transmission channel for network information transmission. After completion, establish the voice transmission channel. Send a data transmission channel connection request to the target networked device to establish multiple data transmission channel connections between the device to be networked and the target networked device for network exchange. After the network information exchange is completed, send a voice transmission channel connection request to the target networked device to establish the voice transmission channel between the device to be networked and the target networked device. By first establishing the data transmission channel and ensuring its stability and reliability, and then establishing the voice transmission channel, the success of each stage can be gradually verified, reducing the problems that may occur when establishing complex connections at one time. By first establishing the data transmission channel, the exchange and synchronization of network information can be quickly completed, accelerating the construction speed of the entire network and shortening the user waiting time. Based on the feedback information provided by the data transmission channel (such as signal strength, packet loss rate, etc.), the system can dynamically adjust the relevant parameters of the voice transmission channel to adapt to the current network condition and further improve the communication efficiency.
[0083] In this embodiment, each device can establish multiple data transmission channels and voice transmission channels, and also includes connection list management: after meeting the scanning conditions, add the searched device information to the connectable list and call the data channel connection function to initiate the connection. The device information list includes: the peer address, signal strength, device data channel, voice channel status, total number of devices in the group, and position in the group.
[0084] If the current device is not in the connected state, the disconnected state, or the state of not updating the network information list, and the target device is not connected, initiate the data transmission channel connection.
[0085] During the connection initiation process, the device will stop broadcasting and scanning to ensure the connection speed and success rate.
[0086] After receiving the connection request, the device responds to the request and establishes a data channel connection.
[0087] The device will update its broadcast information in real time according to the current connection state and the number of connections, and restart the broadcast after the connection is completed.
[0088] After the data transmission channel connection is completed and the network information is transmitted, the initiating device of the data channel connection will initiate the connection of the voice transmission channel again.
[0089] Adopt a connection quality evaluation mechanism to evaluate the connection quality of the communication channel, generate an evaluation result, and adjust the network connection according to the evaluation result.
[0090] In this embodiment, as Figure 2As shown in the figure, the networking method of the network includes serial networking. The networking information of the serial networking includes the head device, intermediate devices, tail device, the positions of each device in the network, the number of devices in the network, and the device address list in the network. There are several intermediate devices located between the head device and the tail device;
[0091] The information synchronization of the serial networking includes the following steps:
[0092] The target networking device successfully connected to the device to be networked is a new device. The new device is connected to the serial network group, and the new device sends link update requests to the previous device and the next device simultaneously until the head device receives the link update request;
[0093] The head device initiates a networking information synchronization instruction. Starting from the head device, the networking information synchronization instruction is transmitted step by step to the tail device;
[0094] After the tail device receives the networking information synchronization instruction, starting from the tail device, each intermediate device in front of the tail device replies to the previous intermediate device and sends a response data packet;
[0095] In this embodiment, the response data packet contains information such as the address of the corresponding device and its position in the network.
[0096] The head device receives the response data packets from the intermediate devices and the tail device, integrates them to generate summary information, and transmits the integrated summary information to the entire serial networking network;
[0097] Through the above steps, the information of each device can be transmitted and synchronized to the intermediate devices and the head device. Finally, after the head device receives all the information, it will perform a data distribution again to transmit the entire summarized information to the entire network.
[0098] After the networking information transmission is completed, the head device and the tail device respectively obtain identifiers.
[0099] In this embodiment, the head device and the tail device respectively obtain the identifiers of Token_Head and Token_tail to identify the head device and the tail device. The head device and the tail device will synchronously start broadcasting and scanning to connect new devices.
[0100] After the networking information transmission is completed, the devices in the network will perform voice announcements according to their positions and connection numbers in the devices, and also start broadcasting and scanning.
[0101] In this embodiment, the networking protocol adopts a custom lightweight protocol to reduce communication overhead and complexity. The lightweight protocol includes operations such as device joining, exiting, and status updating to ensure dynamic adjustment of the network structure.
[0102] As a preferred solution, as Figure 3 shown, the networking method of the network also includes tree networking, and the information transmission of the tree networking: using a data transmission channel to transmit networking information.
[0103] In the tree network, there are three role definitions: root node, stem node, and leaf node; among them, the root node is the starting node of the tree network and is responsible for initiating a networking information synchronization request during networking; the stem node is the intermediate node connecting the root node and the leaf node and is responsible for forwarding networking information and voice data; the leaf node is the terminal node of the tree network and usually does not directly connect to other leaf nodes, but only connects to the stem node or the root node.
[0104] The networking information content of the tree networking includes the following:
[0105] Node role: identifying whether the node is a root node, a stem node, or a leaf node;
[0106] Number of devices with networking completed: the number of devices that have successfully joined the current network.
[0107] Device addresses within the network: a list of Bluetooth addresses of all devices in the network.
[0108] In the tree network, the initiator of the last link is the root node. The root node is responsible for initiating a networking information synchronization request to ensure the information consistency and update of the entire network. The root node sends a networking information synchronization request to the next-level node through a data transmission channel (such as an ACL link).
[0109] The transmission path is passed level by level, specifically from the root node to the stem node, and then to the leaf node. The specific path is: root node -> stem node -> leaf node. After each node receives the networking information, it will pass the information to its next-level node until it reaches the outermost leaf node.
[0110] After each node receives the information synchronization request from the root node, it needs to reply to the root node to confirm that it has received and processed the networking information. If a certain node fails to reply in time or the reply information is lost due to other reasons, the root node will re-initiate the request to ensure that all nodes receive the latest networking information.
[0111] For each node, if the device it is connected to is disconnected, it will actively initiate a link change notification to the root node. After receiving the link change notification, the root node will re-initiate a networking information synchronization request to synchronize the latest networking information to each node to ensure the real-time update and consistency of the network structure.
[0112] Specifically, the information synchronization of the tree networking includes the following steps:
[0113] After a certain node device scans a target network device, it connects the target network device as a new device to the tree network group and sends a link change notification to the root node device;
[0114] After receiving the link change notification, the root node device initiates a network information synchronization request, and the network information synchronization request is passed from the root node to the stem node device and the leaf node device step by step;
[0115] Each node device receives the network information synchronization request and replies with a confirmation message to the root node device, and the root node device ensures the successful transmission of the information;
[0116] If the connection status of a certain node device changes (new connection or disconnection), the node will actively send a link change notification to the root node;
[0117] After receiving the link change notification, the root node initiates a network information synchronization request again and synchronizes the latest network information to each node.
[0118] As an optimal solution, a retransmission mechanism is set in both the serial network group and the tree network, and the retransmission mechanism is as follows:
[0119] After the data packet sending device sends a data packet, it is judged whether a response from the data packet receiving device is received within a preset response time. If not, the data packet sending device will retransmit. In this embodiment, the data packet sending device sends the data packet to the data packet receiving device. Each data packet usually has a unique serial number or ID so that the receiving party can identify and confirm a specific data packet. After receiving the data packet, the data packet receiving device checks it. If the data packet is correct, the data packet receiving device will generate an ACK message and send it back to the data packet sending device to confirm that the data packet has been successfully received. The ACK message usually contains the serial number or ID of the confirmed data packet, so that the sender can clearly know which data packet has been successfully received. The data packet sending device starts a timer after sending the data packet and waits for the ACK response of the data packet receiving device. The retransmission times of the data packet sending device are 2 times. Specifically, if the data packet sending device does not receive within the preset response time (135ms), it is considered that the data packet is lost or the reception fails, triggering the first retransmission, retransmitting and restarting the timer. If it times out again, the second retransmission is performed. If no ACK response is received after the second retransmission, the data packet may be marked as unreachable or other error handling logics may be executed. If the set retransmission times (2 times) are exceeded, no further retransmission attempts will be made because excessive attempts will cause link congestion and it will be difficult for the data packet receiving device to receive again. If the data transmission is not completed after the retransmission times of the device are exhausted, the device will be actively disconnected. In addition, when the data packet receiving device receives the data packet but the replied information is incorrect, it will be processed according to the corresponding error code, such as resending or other operations.
[0120] As an optimal solution, the connection quality assessment mechanism includes the following steps:
[0121] Obtain the signal strength between each networking device in the network in real time, and determine whether the signal strength between each networking device in the network is lower than the preset signal strength threshold. If so, trigger the reconnection mechanism and reselect the connection path;
[0122] In this embodiment, the signal strength between each networking device in the network is obtained in real time, and a filtering algorithm is used for linear operation to ensure the accuracy of the signal strength. The preset signal strength threshold is -75dBm. When the signal strength between devices is lower than -75dBm, disconnect the device with poor link quality and connect to a new device to optimize the communication performance.
[0123] Obtain the packet loss rate between the upstream networking device of each networking device in the network and the corresponding networking device in real time;
[0124] Respectively determine whether the packet loss rate between the upstream networking device of each networking device in the network and the corresponding networking device is greater than the preset disconnection threshold. If so, disconnect the connection between the networking device and the corresponding upstream networking device and trigger reconnection;
[0125] Respectively determine whether the packet loss rate between the upstream networking device of each networking device in the network and the corresponding networking device is greater than the preset mute threshold and less than or equal to the preset disconnection threshold. If so, control the corresponding networking device to perform mute processing;
[0126] Respectively determine whether the packet loss rate between the upstream networking device of each networking device in the network and the corresponding networking device is greater than the preset relay threshold and less than or equal to the preset mute threshold. If so, control the networking device to stop forwarding the data received from the corresponding upstream networking device.
[0127] The packet loss rate processing rules for networking devices are specifically as follows: (as Figure 2 shown, taking a serial network example: Device A -> Device B -> Device C -> Device D)
[0128] The processing logic of the disconnection threshold (70%) is as follows: When the networking device detects that the packet loss rate between it and the directly connected upstream networking device is greater than 70%:
[0129] This networking device directly disconnects the connection with the upstream networking device, triggers the reconnection mechanism, broadcasts its own information externally, and also scans for surrounding devices for reconnection.
[0130] The processing logic of the mute threshold (50%) is as follows: When the networking device detects that the packet loss rate between it and the directly connected upstream networking device is greater than 50% and less than or equal to 70% (as Figure 2As shown in the figure, Device B detects the packet loss rate between Device A and Device B, and Device C detects the packet loss rate between Device B and Device C. The specific process of controlling the corresponding networking devices for mute processing is as follows:
[0131] (1) Immediate Mute: Stop playing the audio data from this upstream device.
[0132] (2) Block Forwarding: No longer transfer the data from this upstream device to the downstream device (as shown in the figure, when Device B determines that the packet loss rate of the data from Device A is greater than 50% and less than or equal to 70%, after Device B discards the data transmitted by Device A, it will not forward the data transmitted by Device A to Device C to Device C). Figure 2 As shown in the figure, when Device B determines that the packet loss rate of the data from Device A is greater than 50% and less than or equal to 70%, after Device B discards the data transmitted by Device A, it will not forward the data transmitted by Device A to Device C to Device C).
[0133] (3) Local Data Independence: The audio data collected by this networking device itself (such as MIC input) can still be normally forwarded to the downstream device (for example, the MIC data of Device B can still be transmitted to Device C).
[0134] Relay Threshold (40%) Processing Logic is as follows: When the networking device detects that the packet loss rate between it and the directly connected upstream networking device is greater than 40% and less than or equal to 50%:
[0135] (1) Keep Playing: Normally play the audio from this upstream networking device.
[0136] (2) Stop Relay: Only block the forwarding of the data from the upstream networking device of this networking device (as shown in the figure, Device B can still play the audio transmitted by Device A to Device B, but stops forwarding the data transmitted by Device A to Device B to Device C); Figure 2 As shown in the figure, Device B can still play the audio transmitted by Device A to Device B, but stops forwarding the data transmitted by Device A to Device B to Device C);
[0137] (3) Mixed Forwarding: The audio collected by this networking device itself (such as MIC input) can be mixed with other normal link data and continue to be sent downstream.
[0138] Normal Transmission Logic: When the networking device detects that the packet loss rate between it and the directly connected upstream networking device is less than or equal to 40%:
[0139] (1) Continuously play the audio data from the upstream networking device.
[0140] (2) Completely forward the data from the upstream networking device and this networking device to the downstream networking device.
[0141] In this embodiment, a total of the above three different thresholds are set to reduce noise interference and improve call clarity.
[0142] In this embodiment, the reconnection mechanism is as follows: The networking device to be connected analyzes the positions of each target networking device around according to the signal strength and adjusts the networking connection path.
[0143] In this embodiment, when the device's position changes or a device joins / leaves the network, the device detects the position change based on the signal strength change and dynamically adjusts the networking connection path. Specifically, it disconnects the device with a signal strength less than -75 dBm and connects to the device with a signal strength greater than or equal to -75 dBm.
[0144] After the device connection is completed, it continues to broadcast or scan. If its own voice quality is poor (judged according to the signal strength and packet loss rate) and there are closer devices around, it actively disconnects the poor-quality link and connects to the new device.
[0145] Introduce a connection quality evaluation mechanism to dynamically adjust the network and ensure the user experience. Theoretically, there is no upper limit to the number of devices. However, considering voice real-time performance and user experience, generally the maximum limit is within 16. When the number of device connections reaches the upper limit, it can still broadcast or scan to find new connection opportunities. Specifically, after the link quality evaluation, there are two cases for connection adjustment: the link quality is too poor (signal strength less than -75 dBm), disconnect the connection and trigger reconnection; the current link quality is not good enough (signal strength less than -75 dBm), and there are connectable devices around, disconnect the current connection and connect to the connectable device found.
[0146] In this embodiment, the connection quality evaluation mechanism further includes a packet loss prediction mechanism for continuously observing the transmitted and received data and predicting packet loss. The packet loss prediction mechanism includes the following steps:
[0147] Obtain the reception interval of data packets in the network.
[0148] Judge whether the reception interval of the data packet is greater than the preset normal reception interval threshold. If so, determine it as a delayed data packet.
[0149] Take 10 consecutive data packets as an observation window, analyze the number of its delayed data packets and the trend of the reception interval, and generate a packet loss prediction result.
[0150] Specifically, the prediction process of the packet loss prediction mechanism is as follows:
[0151] At the device receiving end, record the reception timestamp of each voice data packet and calculate the transmission delay of the data packet.
[0152] Specifically, the system presets the normal reception timestamp for receiving data packets to be 7.5 ms (normal reception interval threshold), and a data packet is received regularly. If the packet reception interval is greater than 7.5 ms, it means that the data packet is delayed.
[0153] Observe the change in the transmission delay of the data packet and predict the possible packet loss situation. If the transmission delay of multiple consecutive data packets increases significantly, predict that packet loss may occur and the link quality may deteriorate. Specifically, when any of the following judgment conditions is met, the system predicts that the link quality deteriorates:
[0154] Within an observation window composed of 10 consecutive data packets, the number N of data packets with a reception interval ΔT > 7.5 ms satisfies N ≥ 7;
[0155] Within an observation window composed of 10 consecutive data packets, there is a monotonically increasing trend in the data packet reception interval sequence (for example, the reception delay of the first packet is 1 ms, and the reception delay of the 7th packet is 3 ms).
[0156] If the transmission delay of the data packet is relatively stable, the predicted link quality is better. Specifically, when and only when the following two core conditions are simultaneously satisfied, the system predicts that the link quality is in an excellent state:
[0157] Within an observation window composed of 10 consecutive data packets, the number n of all data packets with a reception interval ΔT > 7.5 ms satisfies n ≤ 6;
[0158] Within an observation window composed of 10 consecutive data packets, there is no monotonically increasing trend in the data packet reception interval sequence.
[0159] If it is predicted that there may be packet loss, the mechanism of triggering the search for connectable devices and disconnecting the current link in advance can be activated to enable the user to hear as little noise as possible and ensure the user experience.
[0160] As a preferred solution, the data transmission channel connection uses an asynchronous connection-oriented link to transmit networking information, and the voice transmission channel connection uses a synchronous connection-oriented link or an enhanced synchronous connection-oriented link to transmit voice data in real time.
[0161] As a preferred solution, it also includes processing the voice data of the voice transmission channel. The process of processing the voice data includes:
[0162] Each device collects voice data from other devices through the voice transmission channel and simultaneously acquires the voice data of the local MIC of each device;
[0163] Specifically, the voice transmission channel uses SCO (Synchronous Connection-Oriented Link), eSCO (Enhanced Synchronous Connection-Oriented Link) or ISOC (Isochronous Channel) to transmit voice data in real time. These links provide synchronous connection-oriented services to achieve high-quality real-time voice transmission; among them, the SCO link provides basic real-time voice transmission, the eSCO link supports higher data rates and more reliable transmission with error correction functions, and ISO is introduced in Bluetooth 5.2 and later versions, designed specifically for low-latency, high-throughput audio streams, and is very suitable for real-time voice communication between multiple devices.
[0164] In this embodiment, the voice quality is improved through the following steps:
[0165] 1. Local buffering eliminates network transmission jitter and delay to ensure voice quality:
[0166] (1) The sender and receiver set up voice buffers to temporarily store a certain number of frames of voice data (e.g., 5 frames). Jitter in network transmission can cause uneven arrival times of voice data packets. Local buffering can smooth out this jitter, ensuring that voice data is sent and played at uniform intervals. By pre-storing a certain amount of voice data, local buffering can reduce voice playback interruptions caused by network latency.
[0167] (2) Sender buffering: Divide the voice data into data packets of a fixed size. Each data packet contains voice data of a certain time length (7.5 ms). Set up a buffer at the sender and store the data packets in the buffer in sequence. Control the sending rate of the data packets according to the network conditions and the feedback from the receiver to ensure that the data packets can be smoothly sent to the receiver.
[0168] (3) Receiver buffering: The receiver receives data packets from the network and stores them in the buffer. Since network transmission may cause the data packets to arrive in an inconsistent order, the receiver needs to sort them according to the sequence numbers of the data packets to ensure the correct playback of the voice data. Control the playback rate of the voice data according to the amount of data in the buffer and the network conditions to ensure the smoothness of voice playback.
[0169] 2. The receiver effectively improves the voice quality during packet loss through packet loss compensation:
[0170] (1) At the receiver, when a data packet loss is detected, certain algorithms and technical means are used to compensate for the lost data packet to reduce the impact of packet loss on voice quality. By compensating for the lost data packets, reduce interruptions and stuttering in voice playback. Through the compensation algorithm, restore the lost voice data and improve the clarity and intelligibility of the voice.
[0171] (2) Based on the same principle as packet loss detection, each data packet is attached with a sequence number when sent. The receiver determines whether a data packet is lost by detecting the continuity of the sequence numbers. When a data packet loss is detected, the voice data in the lost data packet can be obtained by linear interpolation using the voice data in the two previously received data packets.
[0172] (3) Adjust the parameters of the compensation algorithm according to the level of packet loss rate to achieve the best compensation effect.
[0173] (4) In some cases, if the voice data in the lost data packet is noise, audio data similar to the background noise can be generated to replace the voice data in the lost data packet. This method can reduce the sense of suddenness in the sound caused by packet loss.
[0174] After collecting audio through the MIC (microphone), first, the noise reduction module is used to remove wind noise and environmental noise interference and retain human voices. At the same time, echo cancellation technology is also applied to avoid generating echoes and ensure good voice effects in complex environments.
[0175] The VAD algorithm and volume detection are used to detect the voice data collected from other devices and the voice data of the local MIC through the voice transmission channel, and filter out the valid voice data; it is judged whether each data source contains valid voice, and the detection result is represented by a boolean value (True / False) and stored in the corresponding data structure.
[0176] Specifically, the VAD algorithm (voice activity detection algorithm) and volume detection are used to detect in real time whether each data source contains valid voice. First, the VAD algorithm is used to detect whether there is human speech in the voice data, and then the volume detection is used to judge whether the volume of the voice data reaches the preset volume threshold. If so, it is determined as valid voice data. When there is no valid voice, no mixing is performed or empty data is transmitted to the next device.
[0177] The valid voice data is mixed and processed to generate the mixed valid voice data; specifically, the mixing process is as follows:
[0178] The devices to be networked collect the voice data from the target networked devices successfully connected to the devices to be networked through the voice transmission channel, and at the same time collect the voice data of the local MIC of each device;
[0179] The VAD algorithm and volume detection are used to detect the voice data of the target networked devices successfully connected to the devices to be networked and the corresponding local MIC voice data, and filter out the valid voice data;
[0180] The valid voice data is mixed and processed to generate the mixed valid voice data;
[0181] The mixed valid voice data is encoded and sent to the target networked devices already connected to the devices to be networked.
[0182] Such as Figure 4As shown, in this embodiment, the mixing coefficient depends on how many devices the device to be networked is connected to itself and whether the voice data is valid. For example, Device D (the device to be networked) is connected to three devices. Adding the MIC data of its own device, there are actually 4 voice data in total. Then, it is determined whether these 4 voices are valid respectively, and the mixed voice data is sent to Devices A, B, and C respectively. The data sent to Device A definitely cannot be mixed with the data from Device A. When all the voice data is valid, the mixed voice data sent to Device A is: the voice data of Device B, the voice data of Device C, and the MIC data of Device D; the mixed voice data sent to Devices B and C is the same as above. Specifically, the mixing coefficient is determined according to the valid audio sources after VAD detection. For one valid audio source, the mixing coefficient is 1; for two valid voice sources, the mixing coefficient is 1 / 2; for three valid voice sources, the mixing coefficient is 1 / 3. For example, assume there is a device D (the device to be networked), which receives the voice data from the other three devices A, B, and C, and at the same time collects the voice data of the local microphone (MIC); the specific mixing logic is as follows: Device D collects the voice data from Devices A, B, and C through the voice transmission channel, and at the same time collects the voice data of the local MIC. When it is necessary to send voice data to Device A, if the voice data of Devices B and C and the MIC data are all detected as valid, then these three voice data are respectively attenuated by 1 / 3 in volume (to prevent data overflow), the processed voice data are superimposed to generate the mixed voice data, and the mixed voice data is sent to Device A through the Bluetooth voice transmission channel. If the voice data of Devices B and C and the MIC data are all detected as invalid, 0 data is sent to other devices; the mixed voice data sent to Devices B and C is the same as above. In addition, Device D also plays the voice data of Devices A, B, and C through the speaker for its own listening.
[0183] If only Devices A and B are determined to be valid voices (the voice data of the MIC is an invalid voice), then the audio signals of the two data sources A and B and the voice signal of the MIC are respectively attenuated by 1 / 2 in volume, the processed voice data are superimposed to generate the mixed voice data, and the mixed voice data is sent to Device C through the Bluetooth data channel.
[0184] If only one of Devices A, B, and the MIC is determined to be a valid voice, then the audio signal of this data source is directly sent to C without volume adjustment.
[0185] If all data sources are determined to be invalid voices (i.e., no one is speaking), then an empty data packet or a mute signal is sent to C to indicate that there is no valid voice content during the current time period.
[0186] The same mixing logic as above is adopted for the mixing logic sent to Device A and Device B. The voice data of A, C, and the local MIC are sent to Device B, and the voice data of B, C, and the local MIC are sent to Device A.
[0187] The present invention has been described in detail above. The description of specific embodiments is only used to help understand the method and its core idea of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
Claims
1. A method for implementing multi-person ad hoc network intercom based on Bluetooth, characterized by: The following steps are involved: The networking device to be networked initiates a networking request; Using broadcast or scanning, the device to be networked sends broadcast data packets to surrounding devices and continuously scans surrounding devices; Filter the devices whose parameters meet the preset connection conditions as the target networking devices; Establishing a communication channel connection between the device to be networked and the target networking device, wherein the communication channel includes a data transmission channel and a voice transmission channel; A connection quality assessment mechanism is used to assess the connection quality of the communication channel, generate an assessment result, and adjust the connection of the network according to the assessment result.
2. The method for implementing Bluetooth-based multi-person ad hoc network intercom according to claim 1, characterized in that: The connection process of the communication channel includes the following steps: Initiate a data transmission channel connection request to establish multiple data transmission channel connections between the device to be networked and the target networking device; Complete networking information exchange; Initiate a voice transmission channel connection and establish multiple voice transmission channel connections between the device to be networked and the target networking device.
3. The method for implementing Bluetooth-based multi-person ad hoc network intercom according to claim 1, characterized in that: The networking mode of the network includes serial networking, and the networking information of the serial networking includes a head device, an intermediate device, a tail device, a position of each device in the network, the number of devices in the network, and a list of device addresses in the network, and the number of intermediate devices is several and is located between the head device and the tail device; The serial networking information synchronization comprises the following steps: The target networking device that is successfully connected to the device to be networked is a newly added device, and the newly added device is connected to the serial network group, and the newly added device sends a link update request to the previous device and the next device at the same time until the head device receives the link update request; The head device initiates a networking information synchronization command, which is then transmitted back to the tail device level by level. After the tail device receives the networking information synchronization instruction, each intermediate device before the tail device replies to the previous intermediate device and sends a response data packet. The head device receives the response data packets from the middle device and the tail device, integrates them, generates summary information, and transmits the integrated summary information to the entire serial networking network; After the networking information is transmitted, the head device and the tail device obtain identifiers respectively.
4. The method for implementing Bluetooth-based multi-person ad hoc network intercom according to claim 3, characterized in that: The networking mode of the network also includes tree networking, and the networking information of the tree networking includes a root node device, a stem node device, a leaf node device, the number of devices in the network, and a list of device addresses in the network; The information synchronization of the tree-shaped network includes the following steps: After a node device scans the target networking device, it connects the target networking device as a new device to the tree network group and sends a link change notification to the root node device; The root node device receives the link change notification and initiates a network information synchronization request, which is then passed from the root node to each node device step by step. Each node device receives the networking information synchronization request and replies to the root node device for confirmation.
5. The method for implementing Bluetooth-based multi-person ad hoc network intercom according to claim 4, characterized in that: The serial network group and the tree network group are both provided with a retransmission mechanism, and the retransmission mechanism is as follows: It is determined whether the data packet sending device receives a response from the data packet receiving device within a preset response time after sending the data packet. If not, the data packet sending device retransmits.
6. The method for implementing Bluetooth-based multi-person ad hoc network intercom according to claim 1, characterized in that: The connection quality assessment mechanism comprises the following steps: Obtain the signal strength between the networking devices in real time, and determine whether the signal strength between the networking devices in the network is lower than the preset signal strength threshold. If so, trigger the reconnection mechanism and reselect the connection path; Obtain the packet loss rate between the upstream networking device and the corresponding networking device of each networking device in the network in real time; Determine whether the packet loss rate between the upstream networking device of each networking device in the network and the corresponding networking device is greater than a preset disconnection threshold. If so, disconnect the networking device from the corresponding upstream networking device and trigger reconnection; Respectively determine whether the packet loss rate between the upstream networking device of each networking device in the network and the corresponding networking device is greater than a preset mute threshold and less than or equal to a preset disconnection threshold. If so, control the corresponding networking device to perform mute processing; Determine whether the packet loss rate between the upstream networking device of each networking device in the network and the corresponding networking device is greater than a preset relay threshold and less than or equal to a preset mute threshold. If so, control the networking device to stop forwarding data received from the corresponding upstream networking device.
7. The method for implementing Bluetooth-based multi-person ad hoc network intercom according to claim 1, characterized in that: The broadcast or scan adopts the broadcast or scan mechanism of low-power Bluetooth to realize the discovery of each device, the data transmission channel adopts an asynchronous connectionless link to transmit networking information, and the voice transmission channel adopts a synchronous connection-oriented link, an enhanced synchronous connection-oriented link or an isochronous channel to transmit voice data in real time.
8. The method for implementing Bluetooth-based multi-person ad hoc network intercom according to claim 1, characterized in that: It also includes processing the voice data of the voice transmission channel. The process of processing the voice data includes: The device to be networked collects voice data from the target networking device that is successfully connected to the device to be networked through the voice transmission channel, and simultaneously collects voice data from the local MIC of each device; The VAD algorithm and volume detection are used to detect the voice data of the target networking device that is successfully connected to the networking device and the voice data of the corresponding local MIC to filter out valid voice data; Performing mixing processing on the valid voice data and generating mixed valid voice data; The mixed valid voice data is encoded and sent to the target networking device that is connected to the to-be-networked device.
Citation Information
Patent Citations
Communication method, device and system
CN104158985A
Intelligent voice mixing method and device for multi-party voice communication
CN104539816A
Chained networking transmission method based on LoRa technology
CN110753328A
Bluetooth group intercom communication system and implementation method thereof
CN112333645A
Bluetooth network and communication method and device thereof, and storage medium
CN112584364A
Cited By
Communication method, communication device, Bluetooth device, communication system, medium and product
CN121357516A