Bluetooth sound box networking system and networking method based on Internet of Things
By obtaining the spatial position and acoustic propagation characteristics of the speaker devices and constructing a hierarchical Bluetooth connection topology, the problems of poor sound quality and unstable connection caused by differences in acoustic characteristics in traditional Bluetooth speaker networking are solved, and adaptive adjustment and efficient collaboration of the smart audio network are achieved.
Patent Information
- Application Number
- CN202510935849.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2045-07-08
AI Technical Summary
In an open kitchen and living room, the traditional Bluetooth speaker networking method has poor sound quality in some areas due to differences in acoustic characteristics between different areas, insufficient connection stability, and weak collaboration between devices.
By obtaining the spatial position distribution data of speaker devices, using acoustic detection signals to evaluate the acoustic propagation characteristics of the room, identifying the room characteristic frequency distribution data, allocating device roles, building a hierarchical Bluetooth connection topology, and optimizing the data transmission path, dynamic adaptive adjustment of the network can be achieved.
It improves the stability, flexibility and spatial audio performance of the Bluetooth speaker networking system, adapts to dynamic environmental changes, avoids connection redundancy and interference, and achieves efficient spatial audio collaboration.
Smart Images

Figure CN120614561A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart speakers, and in particular to a Bluetooth speaker networking system and networking method based on the Internet of Things. Background Art
[0002] Bluetooth speaker networking involves connecting multiple Bluetooth speakers together using specific technologies and protocols to form a collaborative, collaborative network system, enabling richer audio playback features and more flexible usage. Networking allows multiple speakers to be distributed across a larger space, such as a living room, dining room, and balcony, or in different areas of an office. This creates a surround sound effect, giving the sound a richer and more layered quality. For example, when playing a movie or music, users can experience sounds coming from different directions, enhancing the sense of presence and immersion. In a networked system, users can simultaneously control multiple speakers from a single control device (such as a smartphone or tablet). For example, they can simultaneously turn all speakers on or off, adjust their volume, and switch audio sources. This makes audio playback management more efficient and convenient.
[0003] Traditional Bluetooth speaker networking mainly focuses on connection stability and audio synchronization between devices. However, in an open kitchen and living room, the acoustic characteristics of different areas vary greatly. Traditional networking methods often result in poor sound quality in certain areas. Summary of the Invention
[0004] Based on this, it is necessary for the present invention to provide a Bluetooth speaker networking system and networking method based on the Internet of Things to solve at least one of the above technical problems.
[0005] To achieve the above objectives, a method for networking Bluetooth speakers based on the Internet of Things includes the following steps:
[0006] Step S1: Acquire spatial position distribution data of the speaker devices; control each device to sequentially transmit an acoustic detection signal of a preset frequency based on the spatial position distribution data of the speaker devices, and evaluate the room acoustic propagation characteristics based on the signal response strength;
[0007] Step S2: Using the room's acoustic propagation characteristics, comparatively analyzing the signal response intensities at different frequencies to identify the room's characteristic frequency distribution data; detecting differences in the acoustic response amplitudes of each speaker device at different characteristic frequencies based on the room's characteristic frequency distribution data; determining the position type characteristics of each device in the room's sound field based on the differences in the acoustic response amplitudes, and performing device role assignment based on the response amplitudes to obtain device role assignment data;
[0008] Step S3: constructing a hierarchical Bluetooth connection topology structure based on the device role assignment data, and optimizing the data transmission paths between the devices to obtain transmission path optimization data; assigning communication frequency bands and power parameters to each device based on the transmission path optimization data to generate network configuration parameter data;
[0009] Step S4: Continuously monitor the real-time changes of the room characteristic frequency based on the network configuration parameter data, and determine the magnitude of the environmental state change based on the degree of change of the characteristic frequency; when the magnitude of the environmental state change exceeds the preset threshold, re-execute steps S1 to S3 to achieve dynamic adaptive adjustment of the network.
[0010] The present invention also provides a Bluetooth speaker networking system based on the Internet of Things, which is used to execute the above-mentioned Bluetooth speaker networking method based on the Internet of Things. The Bluetooth speaker networking system based on the Internet of Things includes:
[0011] The acoustic perception module is used to obtain the spatial position distribution data of the speaker devices; based on the spatial position distribution data of the speaker devices, it controls each device to sequentially transmit an acoustic detection signal of a preset frequency, and evaluates the acoustic propagation characteristics of the room based on the signal response strength;
[0012] The role assignment module is used to compare and analyze the signal response strengths of different frequencies using the room's acoustic propagation characteristics to identify the room's characteristic frequency distribution data; detect the differences in the acoustic response amplitudes of each speaker device at different characteristic frequencies based on the room's characteristic frequency distribution data; determine the location type characteristics of each device in the room's sound field based on the differences in the acoustic response amplitudes, and assign device roles based on the response amplitudes to obtain device role assignment data;
[0013] The network construction module is used to construct a hierarchical Bluetooth connection topology structure based on the device role allocation data, optimize the data transmission path between each device, and obtain transmission path optimization data; allocate the communication frequency band and power parameters of each device based on the transmission path optimization data, and generate network configuration parameter data;
[0014] The adaptive adjustment module is used to continuously monitor the real-time changes of the room characteristic frequency based on the network configuration parameter data, and judge the magnitude of the change in the environmental state based on the degree of change in the characteristic frequency; when the magnitude of the change in the environmental state exceeds a preset threshold, steps S1 to S3 are re-executed to achieve dynamic adaptive adjustment of the network.
[0015] This invention addresses the problems of static network topology, poor environmental adaptability, insufficient connection stability, and weak inter-device collaboration in traditional Bluetooth audio systems. By constructing an adaptive, intelligent, and hierarchical speaker network construction and management mechanism, this approach enables efficient networking, sound field analysis, and intelligent role assignment for Bluetooth speaker devices in dynamic environments, significantly improving the stability, flexibility, and spatial audio performance of the networked system. The method, based on device spatial position awareness and acoustic propagation characteristic modeling, constructs a dynamically adjustable, hierarchical Bluetooth communication network architecture through a multi-step logical progression. The system performs environmental scanning and spatial positioning of Bluetooth speaker devices to determine their relative position distribution within the actual indoor space. Combined with acoustic detection signals, it achieves a comprehensive understanding of the room's propagation characteristics. This system efficiently performs spatial mapping and sound field perception using only Bluetooth and acoustic modules, eliminating the need for additional hardware. In this process, the system accurately assesses the room's reflection, absorption, and propagation characteristics by real-time measurement of inter-device signal strength and response delay. This model, which includes loss coefficients, frequency response patterns, and reflection and absorption differences, extracts key frequency characteristics that describe the room's sound field structure. This model, serving as foundational data for the entire process, not only supports subsequent frequency analysis and device classification but also provides physical layer guidance for network construction. During the device responsiveness identification phase, the system uses the extracted characteristic frequencies to conduct multiple rounds of testing on each device, comprehensively recording differences in reception response at different frequencies and constructing acoustic characteristic metrics based on response strength and frequency gradients. By comparing the performance of each device at key frequency points, such as peak and transition frequencies, it identifies which devices are located in the primary reflection zone or energy attenuation zone of the sound field, thereby deriving the rationale for assigning different acoustic roles to the devices in the space. Based on this data-driven role division approach, the system assigns highly responsive devices to the master role, moderately responsive devices to the relay role, and weakly responsive devices to the monitor role. This ensures a close match between the network's physical and communication logic layers, avoiding connection redundancy or communication bottlenecks caused by improper role assignment. Based on these role divisions, the system further constructs a multi-tiered Bluetooth network topology. By dividing devices into a master, relay, and monitor layer, a clearly defined, load-sharing network architecture is established. The connection priority between devices is dynamically generated based on role type, location distribution, and weight coefficient. Based on this, the system calculates the load-bearing capacity of each device's connection and identifies the connection center node. It then prioritizes the primary and backup connection paths among multiple candidate paths, achieving a low-hop, highly stable multi-path communication configuration. Specifically, during primary path selection, the system uses the standard deviation of the weight coefficients between devices as a path stability assessment metric and verifies availability in conjunction with role-level connection rules, ensuring that the primary path meets network requirements in terms of both physical performance and structural rules.Furthermore, establishing a backup path enables automatic connection switching when the primary path is blocked, enhancing the system's interference resistance and self-recovery capabilities. At the network configuration level, the system precisely assigns communication frequency bands and power parameters to each speaker device based on the connection path and device role. Using a dual ranking method based on communication load index and role weight, frequency band resources are dynamically allocated, effectively avoiding co-channel interference and channel congestion. Power settings are tiered based on the device's connection path and role. For example, master devices are assigned high power to ensure coverage, relay devices are assigned medium power to maintain link continuity, and monitoring devices are assigned low power to reduce energy consumption and noise, resulting in an energy-efficient and efficient Bluetooth communication network. Furthermore, the system features a dynamically adaptive acoustic environment monitoring mechanism that continuously tracks real-time changes in the room's characteristic frequencies. If the system detects frequency shifts or response strength fluctuations caused by environmental changes exceeding a threshold, it automatically triggers a network reconfiguration process, re-positioning devices, re-acoustic modeling, and re-configuring the network to ensure optimal system operation despite environmental changes. This mechanism is highly practical and stable, adapting to real-world scenarios such as furniture movement, changes in crowd density, and changes in room usage. In summary, the method of the present invention not only solves the problems of complex connection, signal interference, and difficult device management of Bluetooth speakers in multi-device networking through the coordinated operation of six modules: spatial perception, frequency modeling, role division, topology construction, parameter optimization, and environmental adaptive reconstruction, but also establishes a tight coupling between physical space and logical communication structure by introducing acoustic response characteristics. This method has wide application value in scenarios such as home multi-room audio systems, smart conference rooms, and commercial sound field layouts. It can realize intelligent audio network systems with rapid deployment, self-adjustment, and stable connections in complex acoustic environments, and build a more intelligent, collaborative, and high-fidelity spatial audio experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Other features, objects and advantages of the present invention will become more apparent upon reading the detailed description of non-limiting embodiments thereof made with reference to the following drawings:
[0017] Figure 1 This is a schematic flow chart of the steps of a Bluetooth speaker networking method based on the Internet of Things of the present invention;
[0018] Figure 2 for Figure 1 Detailed step flow diagram of step S1;
[0019] Figure 3 for Figure 1 Detailed step flow chart of step S3 in FIG. DETAILED DESCRIPTION
[0020] The following is a clear and complete description of the technical method of the present invention in conjunction with the accompanying drawings. It is obvious that the embodiments described are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts are within the scope of protection of the present invention.
[0021] In addition, the accompanying drawings are merely schematic illustrations of the present invention and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities that do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor and / or microcontroller approaches.
[0022] It should be understood that although the terms "first," "second," and the like may be used herein to describe various elements, these elements should not be limited by these terms. These terms are used solely to distinguish one element from another. For example, a first element may be referred to as a second element, and similarly, a second element may be referred to as a first element, without departing from the scope of the exemplary embodiments. The term "and / or" as used herein includes any and all combinations of one or more of the listed associated items.
[0023] To achieve this, please refer to Figures 1 to 3 The present invention provides a method for networking a Bluetooth speaker based on the Internet of Things, the method comprising the following steps:
[0024] Step S1: Acquire spatial position distribution data of the speaker devices; control each device to sequentially transmit an acoustic detection signal of a preset frequency based on the spatial position distribution data of the speaker devices, and evaluate the room acoustic propagation characteristics based on the signal response strength;
[0025] In an embodiment of the present invention, six Bluetooth speakers supporting IoT communication are deployed in a home living room measuring approximately 40 square meters. The system automatically obtains each speaker's device identification information and MAC address from the local area network (LAN) using a preset Bluetooth scanning command. It then uses an RSSI (Reliable Signal Indicator) (RSSI) signal strength monitoring algorithm to continuously collect Bluetooth signal strength fluctuation data between devices. The system then smoothes the RSSI variation trends over different time periods to infer the relative distances between the speaker devices. The system uses a method based on an RSSI-distance approximate mapping model to convert distances into relative position coordinates in a three-dimensional coordinate system, using this information to construct a spatial distribution map of the speaker devices. The system then generates a device transmission sequence based on the spatial location data, arranging acoustic detection sequences according to the principle of prioritizing devices at the outermost edges of the space and delaying those at the center. To avoid interference, the interval between successive acoustic wave transmissions is set to 500 milliseconds. Under system control, each speaker sequentially transmits a single-frequency detection signal with a frequency between 500 Hz and 8000 Hz, with each transmission lasting 200 milliseconds. During this time, other devices switch to receive mode to collect acoustic waves. The system records the signal reception time and signal strength of each receiving device, calculates the sound wave arrival delay and attenuation amplitude, and uses this to analyze the room's sound wave reflection, absorption, and propagation non-uniformity. Ultimately, it generates room acoustic propagation characteristic data that includes multi-point path propagation loss, average delay time, and attenuation characteristics of each frequency for subsequent frequency sensitivity identification.
[0026] Step S2: Using the room's acoustic propagation characteristics, comparatively analyzing the signal response intensities at different frequencies to identify the room's characteristic frequency distribution data; detecting differences in the acoustic response amplitudes of each speaker device at different characteristic frequencies based on the room's characteristic frequency distribution data; determining the position type characteristics of each device in the room's sound field based on the differences in the acoustic response amplitudes, and performing device role assignment based on the response amplitudes to obtain device role assignment data;
[0027] The present embodiment uses the room acoustic propagation characteristic data obtained by S1 to evenly divide the frequency range from 20Hz to 20kHz into 100 frequency points. The signal response intensity value in the sound wave propagation path is extracted for each frequency point, forming a frequency-intensity response sequence. This sequence is then processed through Savitzky-Golay smoothing filtering to obtain a response curve envelope. Based on the average response intensity across the entire frequency range, frequencies with intensities greater than 1.5 times the average are selected as candidate peak frequencies. Frequency segments with an intensity variation of greater than 30% between adjacent frequency points are also identified as response transition frequency intervals. The system calculates a weighted score by statistically analyzing parameters such as signal stability and amplitude variation slope of the candidate frequencies. Frequency points with a score greater than 0.6 are marked as "room characteristic frequencies," forming room characteristic frequency distribution data. Subsequently, the system controls the speaker devices to transmit signals in turn according to the selected characteristic frequencies (e.g., 280Hz, 1.2kHz, 6.3kHz), which are then received by the remaining devices. The reception intensity and signal clarity parameters of each device at each frequency point are recorded. The system uses a standard deviation analysis algorithm to calculate the variance of the received amplitude at each frequency point, identifying the significance of the response differences between different devices at the same frequency. It then calculates the ratio of the number of devices at high and low response frequencies to form an acoustic response characteristic coefficient that reflects the sensitivity of each device to the sound field. The system sorts the acoustic response characteristic coefficients from high to low, selecting the top 30% as strongly responsive devices (such as those located in the corners of the space), the bottom 30% as weakly responsive devices (such as those near reflective walls), and the middle as moderately responsive devices. Based on the frequency response differences, device location, and spatial propagation characteristics, the system automatically assigns devices to master, relay, or monitoring roles, and forms device role assignment data for the next step in building the network topology.
[0028] Step S3: constructing a hierarchical Bluetooth connection topology structure based on the device role assignment data, and optimizing the data transmission paths between the devices to obtain transmission path optimization data; assigning communication frequency bands and power parameters to each device based on the transmission path optimization data to generate network configuration parameter data;
[0029] The embodiment of the present invention constructs a three-layer Bluetooth networking topology based on the device role allocation data generated in S2, setting the master device as the network control layer (first layer), the relay device as the intermediate communication layer (second layer), and the monitoring device as the terminal response layer (third layer). The system generates a connection priority matrix based on the spatial distribution position of the devices in the three-layer architecture, combined with the role weight and signal accessibility, and calculates the connection load carrying capacity of each device (i.e. the number of devices that can maintain a stable connection at the same time per unit time) based on this. The node with the largest carrying capacity is the central node, and a path traversal strategy based on connection weight is adopted. Starting from the central node, high-priority devices are preferentially selected to establish the shortest path connection link, and a backup path is planned in each link to avoid link interruption caused by node failure. The system traverses all main paths and counts the standard deviation of the weight of each device on the path. Those less than 0.2 are marked as stable paths. At the same time, the hierarchical structure of the connection path is checked to see whether it follows the networking rule of "upper layer connecting lower layer". If it meets the requirement, it is marked as an available path. The system selects the shortest hop path that meets both "stability" and "availability" from all candidate paths as the final main path, and establishes a backup connection path based on the final main path. Afterwards, the system calculates the communication load index based on the length of each device's path and the number of times it participates in the connection, and sets different Bluetooth power level ranges for master, relay, and monitoring devices according to the device role type (such as the master device is set to 7dBm, high power mode; the monitoring device is set to -5dBm, low power mode), and allocates the communication frequency band (using a frequency hopping mechanism to divide the 2.4GHz band into 40 sub-channels) to avoid interference. Finally, the system integrates the role, path, frequency band, and power parameters of each device into network configuration parameter data to complete the topology network configuration.
[0030] Step S4: Continuously monitor the real-time changes of the room characteristic frequency based on the network configuration parameter data, and determine the magnitude of the environmental state change based on the degree of change of the characteristic frequency; when the magnitude of the environmental state change exceeds the preset threshold, re-execute steps S1 to S3 to achieve dynamic adaptive adjustment of the network.
[0031] The embodiment of the present invention calls the frequency, power and time control parameters of each device in the network configuration parameter data to start the environmental monitoring mode. The monitoring period set in this mode is 30 seconds. The system controls each device to periodically transmit a short-time (100ms) characteristic frequency detection signal on its allocated frequency band, and collects the latest acoustic response data in real time through the receiving process between devices. The system extracts the response intensity and frequency point position of the current characteristic frequency based on the response data, and compares them one by one with the room characteristic frequency distribution data recorded in the S2 stage, calculates the offset and intensity change value of each frequency point, and then calculates the standard deviation and average change amplitude of the offset of all frequency points. When the calculated average change amplitude exceeds the environmental change threshold preset by the system (such as 2dB intensity offset or 200Hz frequency offset), it is determined that a sound field change caused by a crowd change, large object movement or furniture change has occurred in the environment. The system automatically generates network reconstruction instruction data, triggers the network reorganization process, and re-executes steps S1 to S3, namely, re-acquiring position data, updating room acoustic characteristics, reallocating device roles and rebuilding the network topology, ensuring that the speaker networking structure maintains connection stability and sound quality coordination performance in the new acoustic environment, and realizing adaptive networking adjustments to dynamic changes in the environment.
[0032] Preferably, step S1 includes the following steps:
[0033] Step S11: Scan the Bluetooth speaker device network to obtain identification information of connectable speaker devices in the current environment;
[0034] The embodiment of the present invention initializes the Bluetooth scanning module and broadcasts the service discovery signal through the IoT central control node (such as a home gateway or a master control speaker), and enables the BLE (Bluetooth Low Energy) protocol to actively detect all connectable Bluetooth speaker devices within the current network coverage. This process adopts the active device scanning mode, and the scanning time window is set to 5000 milliseconds. During this time, the system collects the device name, unique identifier (MAC address), signal strength (RSSI) and device type information broadcast by each device, and encapsulates it into a device identification information data packet. The system uses deduplication and signal strength filtering mechanisms to filter out short-time interference devices, and only retains Bluetooth speaker devices with an RSSI average value greater than -80dBm as valid nodes that can participate in the networking. In this embodiment, 6 speaker devices are finally identified, and their MAC addresses and connectable features are recorded respectively to form a speaker device identification information list for subsequent distance estimation and space modeling operations.
[0035] Step S12: Calculating the relative distance between devices based on the Bluetooth signal strength change pattern monitored by the speaker device identification information, and constructing a device space coordinate mapping table based on the relative distance between devices to obtain the spatial position distribution data of the speaker devices;
[0036] Based on the speaker device identification information obtained in step S11, this embodiment of the present invention uses a continuous listening mode to monitor the Bluetooth signal strength changes between each pair of devices in real time. This process uses a polling mechanism, with each device sampling and reporting the RSSI values of other devices at different time intervals. The sampling frequency is set to 10 times per second, with a total sampling time of 30 seconds. The system performs weighted averaging and filtering on the RSSI time series data of each pair of devices to eliminate fluctuations caused by environmental interference. It also uses an RSSI-distance mapping method based on an empirical model to estimate the relative distance between devices. Specifically, the system sets a reference RSSI of -60dBm, corresponding to a distance of approximately 1 meter. For every 6dB decrease in RSSI, the estimated distance doubles, and so on. The system projects the relative position of each speaker into a two-dimensional spatial coordinate format. Using a triangulation method and a minimum error optimization algorithm, the node coordinates are fine-tuned to construct a spatial coordinate mapping table for the speaker devices, ultimately generating spatial position distribution data representing the relative spatial layout of the speaker devices. This data serves as the basis for subsequent calculations of the acoustic signal transmission sequence and sound wave propagation path.
[0037] Step S13: Determine the transmission order and frequency range parameters of the acoustic detection signal based on the spatial position distribution data of the speaker devices, control each speaker device to sequentially output a single-frequency test audio signal within a preset frequency range based on the transmission order, and record the signal transmission timestamp and frequency parameters of each device to generate detection signal transmission record data;
[0038] The embodiment of the present invention uses the spatial position distribution data obtained in step S12 to analyze the relative distance between each speaker and the central area, and generates a signal transmission order list according to the principle of "the farther from the geometric center of the room, the higher the priority". This sorting logic is intended to give priority to transmitting device signals from the edges or corners of the room to improve the coverage and recognition effect of the sound wave propagation path. Next, the system sets the acoustic test frequency range to 500Hz to 8000Hz, and each device is assigned 5 different frequency points (such as 650Hz, 1.2kHz, 2kHz, 4kHz, and 6.5kHz) for testing. Under the control signal scheduling mechanism, the system starts the sequential transmission process, instructing each speaker to emit a single-frequency sinusoidal test audio signal with a duration of 200 milliseconds in turn, and at the same time records the MAC address, transmission timestamp and usage frequency value of the current speaker to generate detection signal transmission record data. The system also sets the transmission interval to 500 milliseconds to ensure that there is no overlapping interference between the signals transmitted by each device, providing sufficient switching and receiving time for the receiving device.
[0039] Step S14: Based on the detection signal transmission record data, control other speaker devices to enter the signal receiving mode, collect the acoustic signal from the transmitting device, and perform amplitude detection and frequency recognition processing to obtain the signal response raw data including the signal strength value and arrival time;
[0040] The embodiment of the present invention automatically controls the remaining speaker devices to switch to signal receiving mode during the signal transmission of each device based on the detection signal emission record data generated by S13. The receiving device collects sound waves in real time through a built-in microphone array, and the sampling frequency is set to 48kHz to ensure effective coverage of different frequency points. Each receiving node performs digital filtering on the captured sound wave signal, extracts the main energy component corresponding to the target frequency, and calculates the signal amplitude (in dB) and arrival time (time difference relative to the system clock) at the same time. The system uses a frequency recognition algorithm (such as FFT spectrum analysis) to confirm whether the received signal is the target frequency sent by the current transmitting device to prevent misidentification of non-target noise interference. The receiving result includes signal source device ID, receiving device ID, signal strength value, frequency identification tag, arrival timestamp and other constituent fields. The system aggregates the receiving information of all devices to form signal response raw data for subsequent acoustic propagation parameter calculations and room modeling operations.
[0041] Step S15: Calculate the acoustic propagation loss coefficient and delay characteristics using the original signal response data, and establish a room acoustic environment model based on acoustic parameter analysis to obtain room acoustic propagation characteristic data.
[0042] The embodiment of the present invention uses the signal response raw data in step S14 to analyze the acoustic propagation loss coefficient and delay characteristics. The loss coefficient calculation process adopts a relative energy attenuation model, that is, the receiving intensity values of the same signal source device at different receiving nodes are compared, and the spatial distance between the devices is combined to infer the unit distance attenuation amplitude of the sound wave on different paths. For example, when the distance between devices A and B is 2 meters, the received signal intensity is -50dB, and the distance between devices A and C is 4 meters, the receiving intensity is -60dB, then the system calculates that the signal attenuates by about 5dB for every 1 meter of propagation distance. The delay characteristic analysis is based on the difference between the signal arrival timestamp recorded by each receiving device and the corresponding transmission timestamp, combined with the speed of sound in air (about 343 meters / second) to calculate the propagation time error, and identify the propagation delay caused by the reflection path or obstacle accordingly. The system constructs an acoustic parameter matrix reflecting the differences in sound wave propagation characteristics in different areas of the room by performing multi-frequency and full-node aggregation processing on the above two types of acoustic parameters. Next, the system jointly models the acoustic parameter matrix and the spatial coordinate mapping table, and uses spatial sound field inversion technology to establish a room acoustic environment model. The model includes multiple data such as the propagation path, boundary reflection area, sound absorption area and frequency response area. It ultimately generates room acoustic propagation characteristic data including propagation loss, time delay characteristics and acoustic impedance distribution for subsequent room characteristic frequency extraction and equipment role determination.
[0043] Preferably, step S15 includes the following steps:
[0044] Step S151: Calculating the acoustic propagation loss coefficient between each device position based on the signal strength value in the signal response raw data;
[0045] This embodiment of the present invention calculates the acoustic propagation loss between different speaker devices based on the signal strength values in the raw signal response data obtained in step S14, combined with the device spatial coordinate mapping table generated in step S12. The acoustic propagation loss coefficient is a physical parameter that reflects the rate at which signal strength decays with distance during sound wave propagation in air. It is calculated by dividing the difference between the known output sound pressure level of the transmitting device and the measured received sound pressure level of the receiving device by the spatial distance between the two devices. In this embodiment, 650 Hz, 2 kHz, and 6.5 kHz are used as representative frequencies, and the propagation loss of each pair of devices at these frequencies is averaged to reduce the impact of frequency on the loss. For example, if the original sound pressure of a 2 kHz signal transmitted by device A is 90 dB, and the signal received by device B is 72 dB, and the distance between the two is 4 meters, the loss is 18 dB, corresponding to a loss coefficient of 4.5 dB per meter. The system summarizes the main path propagation loss of each pair of devices and constructs a propagation loss matrix, which serves as the basis for subsequent analysis of delay and acoustic impedance.
[0046] Step S152: Analyzing the propagation delay characteristics of the sound wave on different paths using the signal arrival time difference in the signal response original data;
[0047] The embodiment of the present invention uses the transmission and reception timestamps in the signal response raw data in step S14 to calculate the signal arrival time difference, thereby analyzing the propagation delay characteristics of sound waves on different paths. The delay characteristic is an indicator to measure whether there is an abnormal offset in the propagation time of sound waves in space, which is mainly affected by factors such as the propagation path, obstacle diffraction, and material reflection and absorption. The system first calculates the propagation delay based on the difference between the transmission timestamp and the reception timestamp, and then compares the propagation delay with the theoretical delay corresponding to the straight-line distance between the devices divided by the standard air sound speed (approximately 343 meters per second). If the actual delay is significantly higher than the theoretical delay, it indicates that there is indirect propagation, wall reflection, or sound wave detour. The system marks the path with a delay offset of more than 5 milliseconds as having a sound wave path offset, and establishes a path delay list, recording the propagation delay data for each frequency point and each pair of devices, further providing data support for identifying possible geometric obstacles and high-reflection areas in the room.
[0048] Step S153: quantitatively evaluating the acoustic impedance distribution in the room based on the acoustic propagation loss coefficient and the propagation delay characteristics to generate acoustic propagation parameter data;
[0049] In this embodiment of the present invention, the propagation loss coefficient matrix obtained in step S151 is combined with the delay characteristic list formed in step S152 for analysis to quantify the acoustic impedance distribution in the room. Acoustic impedance is a composite physical quantity that reflects the resistance of air or material to sound wave propagation. It is usually determined by the material density and the speed of sound. However, in this embodiment, propagation loss and propagation delay are used as proxy characteristic parameters for calculation. Specifically, the system defines a "propagation impedance value" for the propagation path of each pair of devices. The calculation method is to multiply the attenuation amplitude per unit propagation distance by the propagation delay factor (i.e., the ratio of the propagation delay to the theoretical value), and then combine the frequency weighting factor to perform frequency band correction. For example, if the unit loss of a path is 4dB / m and the delay factor is 1.2 times, its impedance strength will be marked as 4.8 units. The system performs grid mapping processing on the propagation impedance values of multi-frequency paths between all devices, generates an impedance distribution map in two-dimensional space, and forms acoustic propagation parameter data, which provides basic data for subsequent judgment of structural differences in the room and identification of changes in acoustic characteristics.
[0050] Step S154: analyzing differences in acoustic reflection and absorption characteristics at different locations in the room based on the acoustic propagation parameter data, and identifying geometric structural features of the room using the differences in acoustic characteristics;
[0051] Based on the acoustic propagation parameter data generated in step S153, the present embodiment analyzes regional differences in the reflection and absorption characteristics of different locations within the room and further explores room geometric features corresponding to areas with significant changes in acoustic characteristics. First, the system identifies high-impedance areas (i.e., areas with impedance values greater than 1.5 times the average) in the impedance distribution map as possible reflection zones of hard walls or large obstacles, and low-impedance areas (i.e., areas less than 0.6 times the average) as areas of soft material or sound absorbers. The system further analyzes the impedance gradient's abrupt changes—i.e., boundaries where the impedance value between different regions changes by more than 30%—and preliminarily identifies these locations as possible wall boundaries, door and window edges, or furniture boundaries. Combining the spatial coordinates with the aforementioned impedance characteristic changes, the system automatically extracts the closed contours of the room's geometric structure using a minimum boundary fitting algorithm. Based on the boundary shape, the system then fits the room's aspect ratio, symmetry, and internal partitioning structure. Finally, each acoustic characteristic region is bound to its spatial region, forming a spatial grid with geometric labels, paving the way for building a refined sound field model.
[0052] Step S155: establishing a room acoustic environment model based on the geometric structure characteristics, and obtaining room acoustic propagation characteristic data including propagation path attenuation law and frequency response characteristics.
[0053] In an embodiment of the present invention, a complete room acoustic environment model is established based on the geometric structure feature data identified in step S154, combined with the constructed acoustic propagation parameter data. This model uses the spatial grid as the basic unit and integrates the acoustic propagation loss value, propagation delay value, impedance distribution characteristics, and the geometric region label to which each unit belongs, thereby forming the propagation path attenuation law and frequency response characteristics of the entire space. The model defines a frequency response function to describe the attenuation trend and resonance characteristics of sound waves of different frequencies in different spatial regions. At the same time, a sound field path library is established to record information on the main path, secondary reflection path, and possible diffraction path. In this embodiment, the system encodes the model in JSON format for subsequent steps to identify the frequency point response intensity distribution, classify the device acoustic type, and assign networking roles. At the same time, the model has a self-learning mechanism. In the subsequent dynamic environmental change monitoring, local acoustic parameters can be continuously adjusted to adapt to environmental updates, thereby maintaining the accuracy and stability of the networking strategy.
[0054] Preferably, the comparative analysis of signal response intensities of different frequencies using room acoustic propagation characteristics in step S2 to identify room characteristic frequency distribution data includes:
[0055] Extract the signal response intensity value corresponding to each frequency point in the frequency range of 20Hz-20kHz based on the room acoustic propagation characteristic data;
[0056] Perform smoothing filtering on the signal response intensity value to obtain frequency response envelope sequence data;
[0057] Calculate the average value of the response intensity of each frequency point in the frequency response envelope sequence data, and identify the frequency point whose response intensity is more than 1.5 times higher than the average value as the response peak frequency;
[0058] Calculate the response intensity change gradient between adjacent frequency points in the frequency response envelope sequence data, and identify the frequency interval where the gradient change exceeds 30% as the response turning frequency interval;
[0059] Calculate the characteristic importance weight coefficient based on the response peak frequency and response corner frequency interval, and select the frequency point with a weight coefficient greater than 0.6 as the room characteristic frequency;
[0060] The distribution density and interval regularity of the room's characteristic frequencies are counted, and the response intensity values corresponding to each characteristic frequency are recorded to generate the room's characteristic frequency distribution data.
[0061] In the embodiment of the present invention, in the step of extracting the signal response intensity value corresponding to each frequency point in the frequency range of 20Hz-20kHz, the system performs segmented analysis on the sound wave response data in the frequency domain based on the room acoustic propagation characteristic data constructed in step S155. The propagation characteristic data contains the reception amplitude data of each receiving device at different frequency points during the process of the speaker device transmitting the test signal. The system extracts the corresponding signal response intensity value at a frequency interval of every 5Hz in the audio range of 20Hz to 20kHz, that is, a total of 4000 frequency points. The response intensity value of each frequency point is the average value of the signal power intensity received by multiple speaker devices at this frequency point, in units of dB SPL (sound pressure level). This operation realizes the construction of a basic energy distribution map of the room sound field from the frequency response dimension, providing basic input data for subsequent frequency screening. In the step of smoothing and filtering the signal response intensity value, the system uses a sliding window averaging algorithm to perform noise suppression and smoothing on the response intensity value sequence of the above 4000 frequency points. In implementation, the system sets a window size of 21 frequency points, taking 10 points before and after each, and calculating the average intensity of the current point within the window as the filtered value. This processing method effectively suppresses local outliers caused by transient response spikes at certain device locations or measurement errors, while preserving the overall shape of the frequency response curve. Ultimately, the system outputs a smooth, continuous frequency response envelope sequence representing the distribution of acoustic energy in the room across the entire audio range. To calculate the average response intensity for each frequency point in the frequency response envelope sequence and identify frequencies with an intensity exceeding 1.5 times the average as peak response frequencies, the system first performs global statistics on the smoothed frequency response envelope sequence to calculate the average response intensity for all frequency points. Assuming the full-band average is X dB SPL, the system labels all frequencies with an intensity exceeding 1.5 times the average as "peak response frequencies." These frequencies typically correspond to resonant frequencies, structural resonances, or locations of superposition and enhancement within the room. The system records the specific frequency value and corresponding response intensity of each peak response frequency for subsequent feature weight analysis and frequency screening. In the steps of calculating the response intensity change gradient between adjacent frequency points in the frequency response envelope sequence and identifying frequency intervals where the change gradient exceeds 30% as the response transition frequency interval, the system traverses the entire frequency response envelope sequence, calculates the relative amplitude of the response intensity difference between any two adjacent frequency points, and converts it into a rate of change. For example, if one frequency point is 90dB and the next frequency point is 117dB, the rate of change is 30%. The system uses 30% as the gradient mutation threshold, identifies all frequency points with a change rate greater than this threshold as "response transition points," and expands the range of five frequency points to the left and right to form the "response transition frequency interval."These intervals are often found in rooms where reflections interfere and sound energy suddenly increases or decreases, reflecting the nonlinear behavior of the sound field under certain structural interference. The system incorporates a multi-factor weighted evaluation mechanism to calculate feature importance weights based on the peak response frequency and the response transition frequency interval, and to select frequencies with weights greater than 0.6 as room characteristic frequencies. For each frequency, the system assigns different weights based on whether it is the peak response frequency, whether it falls within the response transition interval, the multiple of its intensity relative to the average, and the breadth of its distribution across multiple speaker systems. These weights are then summed and normalized to produce a "feature importance weight" between 0 and 1. For example, if the frequency of 500Hz is the peak response frequency, within the transition interval, has an intensity 1.8 times the average, and exhibits a strong response in 80% of the speakers, its weight might be 0.85. The system then selects all frequencies with weights greater than 0.6, defines them as "room characteristic frequencies," and records their positions in the frequency spectrum. In the steps of calculating the distribution density and spacing patterns of the room's characteristic frequencies, recording the response strength values corresponding to each characteristic frequency, and finally generating the room's characteristic frequency distribution data, the system performs a statistical analysis on the room's characteristic frequencies selected in the previous step. First, the density of characteristic frequency points in the entire 20Hz to 20kHz frequency range is calculated, that is, the number of characteristic frequencies per kilohertz. The average interval and the maximum and minimum intervals between adjacent characteristic frequency points are then calculated to determine whether the frequency distribution is uniform or has concentrated areas. In addition, the system records the response strength of each characteristic frequency point, the corresponding number of devices, and the spatial distribution uniformity to form a structured data recording unit. Finally, the system generates a set of "room characteristic frequency distribution data," which serves as the core input data for subsequent device acoustic response analysis and role assignment in step S2.
[0062] Preferably, detecting the difference in acoustic response amplitude of each speaker device at different characteristic frequencies according to the room characteristic frequency distribution data in step S2 includes:
[0063] Extract the main characteristic frequencies with weight coefficients higher than a preset threshold value based on the room characteristic frequency distribution data, and generate a test frequency sequence based on the frequency values sorted from low to high;
[0064] Based on the test frequency sequence, the signal transmission rounds and frequency allocation plan for each speaker device are determined, and each device is controlled to transmit a single-frequency acoustic test signal at a specified characteristic frequency in the order of the rounds. The other speaker devices are simultaneously controlled to enter the receiving mode and measure the amplitude value and signal quality parameters of the received signal, generating the reception response data of each device at different characteristic frequencies.
[0065] Calculate the numerical distribution range and standard deviation of the amplitude value of the received signal of each speaker device at the same characteristic frequency based on the received response data, and identify the frequency points with significant amplitude differences;
[0066] Sort and analyze the receiving amplitude values of each speaker device at the frequency points with significant amplitude differences, and count the number of strong response frequency points and weak response frequency points of each device;
[0067] The acoustic response characteristic coefficient of each device is calculated based on the number of strong response frequency points and weak response frequency points of each device, and the devices are classified into acoustic sensitivity categories based on the acoustic response characteristic coefficients to generate an acoustic response amplitude difference that includes the device acoustic type and response difference value.
[0068] This embodiment of the present invention uses the "room characteristic frequency distribution data" generated in the previous step to filter the characteristic importance weight coefficient corresponding to each frequency point recorded therein. The weight coefficient is a numerical value that measures the representativeness of a frequency point in the acoustic structure, integrating multiple factors such as its response amplitude, variation gradient, and spatial consistency. In this embodiment, a preset threshold of 0.65 is set, meaning that only frequency points with a weight coefficient of 0.65 or higher are retained as primary characteristic frequencies. After filtering, the system sorts the frequencies from low to high and outputs a test frequency sequence containing several representative frequency points (such as 42Hz, 375Hz, 1080Hz, 4200Hz, and 11600Hz), providing the basis for subsequent frequency-by-frequency response comparison testing. Acoustic test tasks are constructed using a round-based broadcasting method. Each frequency point in the test frequency sequence corresponds to a round. In each round, each device is sequentially scheduled to transmit the test signal at that frequency, while other devices are in a passive receiving state. To prevent signal interference, the system staggers the transmission tasks within each round to ensure that only one device is transmitting at any given time. Each device transmits a 0.5-second single-frequency sine wave with an amplitude set to 85dB SPL. The duration and interval are dynamically set by the IoT central coordination and control module. During each round, the receiving device collects the acoustic signal's amplitude (dB SPL) and signal quality parameters, such as signal-to-noise ratio (SNR) and waveform stability. These signals are organized into structured "receiver response data" by device ID, frequency, and timestamp for subsequent statistical analysis. For each frequency in the test frequency sequence, the amplitude values recorded by all receiving devices are counted, and metrics such as minimum, maximum, average, and standard deviation are calculated. If the difference between the maximum and minimum received amplitude values at a frequency exceeds 10dB, or the standard deviation exceeds 4dB, the frequency is identified as a "significant amplitude difference frequency." These frequency points typically indicate significant response unevenness between devices in the sound field, potentially caused by factors such as standing wave enhancement and structural reflection differences at the device locations. The system uses these significant amplitude difference frequencies as key frequencies for further analysis of device acoustic capability differences. The system iterates through all frequency points marked as "significant amplitude difference" and, for each frequency point, sorts the amplitude values of each receiving device. The top 20% of devices with the highest response amplitude are selected as "strong responders" at that frequency point, while the bottom 20% are recorded as "weak responders." The system then calculates the number of frequency points marked as "strong responders" and "weak responders" for each device, generating two metrics: "number of strong responding frequency points" and "number of weak responding frequency points." These metrics reflect the relative acoustic reception strengths and weaknesses of the devices in the sound field.The system also categorizes devices by acoustic sensitivity based on the acoustic response characteristic coefficient, generating an "Acoustic Response Magnitude Difference" that includes the device's acoustic type and response difference value. The system introduces the "Acoustic Response Characteristic Coefficient" as a quantitative indicator of a device's comprehensive responsiveness in the current acoustic environment. This coefficient is normalized by the ratio of the "number of strong response frequency points" to the "number of weak response frequency points" to a value between 0 and 1, and then corrected by a correction factor based on the device's spatial reflective structure location. For example, if a device exhibits strong response five times and weak response once out of ten difference frequency points, its original ratio is 5:1, and the normalized coefficient is approximately 0.83. Based on the coefficient size, the system categorizes devices into three categories: "high sensitivity" (coefficient > 0.75), "neutral" (0.45-0.75), and "low sensitivity" (< 0.45). The classification results are recorded along with each device's amplitude response difference data at all frequency points to generate "Acoustic Response Magnitude Difference Data," which will serve as an important reference for role assignment and connection optimization in subsequent Bluetooth speaker networking.
[0069] Preferably, the step S2 of determining the position type characteristics of each device in the room sound field based on the difference in acoustic response amplitude and assigning the device role based on the response amplitude includes:
[0070] Calculating the relative difference in characteristic coefficients between devices based on the acoustic response characteristic coefficients of each device in the acoustic response amplitude difference, and sorting the devices by acoustic response capability based on the difference to obtain an acoustic response capability sequence;
[0071] Based on the acoustic response capability sequence, the top 30% of the devices are marked as the strong sound field response location type, the bottom 30% of the devices are marked as the weak sound field response location type, and the middle 40% of the devices are marked as the medium sound field response location type, thereby obtaining the sound field location type classification result;
[0072] Calculate the comprehensive sound field adaptability score of each device based on the sound field location type classification results and the response difference value in the acoustic response amplitude difference data;
[0073] Perform a preliminary device role assignment based on the comprehensive sound field adaptability score. Assign the device with the highest score in the location with a strong sound field response to the master role, the device with the weak sound field response to the monitor role, and the device with the medium sound field response to the relay role.
[0074] Based on the preliminary device role allocation result, a weight coefficient is allocated to each role, and device role allocation data including device identification, location type characteristics, role type and weight coefficient is generated.
[0075] This embodiment of the present invention reads the acoustic response characteristic coefficients of each speaker device, which reflect the device's reception strength and consistency characteristics at multiple frequency points. The system then normalizes the difference between the characteristic coefficients of any two devices to form a symmetrical difference matrix. Based on this difference, it calculates the "average relative difference" for each device. A larger value indicates a device with stronger or weaker acoustic response. The system then sorts all devices in descending order of their average relative difference, forming an "acoustic response sequence" that reflects the relative response strength of the devices in the current room's sound field. Based on the acoustic response sequence, location types are categorized by percentage. For example, in a typical room containing 10 devices, the system labels the top three devices as "strong response location types," typically located in the main reflection path or standing wave enhancement areas of the sound field. The bottom three devices are labeled "weak response location types," often located in corners or in areas with inefficient propagation blocked by furniture. The middle four devices are classified as "medium response location types." The system associates the classification results with the spatial coordinates of each device to verify the physical consistency of the classification, and finally outputs the "sound field position type classification results" containing the location label of each device. The response consistency of the device at different frequency points, the maximum and minimum response difference, the average signal quality, etc. are used as the basis for scoring, and a weighted correction factor for the position type is introduced. For example, if a device in a strong response position has a small response fluctuation in the high-frequency area and a stable SNR in the low-frequency band, the score will be higher; and if a device in a weak response position has excellent mid-frequency response compensation capabilities, it can also get a medium score. The system standardizes multiple scoring factors to the range of 0 to 1, and sets weighted proportions (such as frequency band consistency 0.4, average response strength 0.3, fluctuation range 0.2, position information correction 0.1), and calculates the final "comprehensive sound field adaptability score" through weighted summation. The system sets a set of role assignment rules: The device with the highest overall score and a strong response position is assigned the "master role," responsible for network broadcasting, rhythm synchronization, and streaming audio decoding and distribution. Devices with a medium score and uniform spatial coverage in a "medium response position" are assigned the "relay role," responsible for signal forwarding and clock coordination in network communications. Devices with lower scores and weak response areas are assigned the "monitoring role," primarily for sound field edge compensation, feedback collection, or delay monitoring. The system ultimately outputs a "preliminary device role assignment result" containing the device number and role type. Devices are assigned different levels of weighting based on their role type, which is used in subsequent communication topology construction and network resource allocation.By default, the master role is assigned the highest weight coefficient (e.g., 1.0), indicating the highest scheduling priority and control rights within the Bluetooth mesh network. The relay role is assigned a medium weight coefficient (e.g., 0.60.8), allowing it to dynamically participate in path selection based on link conditions. The listener role is assigned the lowest weight coefficient (e.g., 0.30.4), reducing its network load while retaining its reception and feedback capabilities. The system also records each device's role type, spatial location classification, comprehensive score, and weight, generating structured "device role assignment data." This data is used to subsequently construct the Bluetooth self-organizing network topology, control power allocation, and control frequency band reuse.
[0076] Preferably, step S3 includes the following steps:
[0077] Step S31: According to the role type and weight coefficient in the device role allocation data, the master role device is set as the first network layer, the relay role device is set as the second network layer, and the monitoring role device is set as the third network layer, thereby establishing a hierarchical network structure framework;
[0078] The embodiment of the present invention receives the device role allocation data generated in the previous stage, which includes the device identification, location characteristics, role type (master, relay, monitor) and weight coefficient of each speaker. The system performs group processing according to the role type. The master role is the first layer, used to initiate communication and control signals; the relay role is the second layer, forming the data forwarding path in the middle of the network; the monitor role is the third layer, located at the edge of the network, used to receive and feedback audio signals. On this basis, the system forms a set of logical hierarchical structure tables, and combines the physical location coordinates of the equipment to construct a virtual three-layer network topology framework, providing a structural basis for subsequent communication path optimization and resource allocation.
[0079] Step S32: determining the connection priority relationship between devices in each layer based on the hierarchical network structure framework and the location type characteristics in the device role allocation data, and generating an inter-device connection priority matrix;
[0080] The embodiment of the present invention extracts a three-layer device group from a hierarchical network structure, and evaluates the connection weight in combination with the label of each device in the "sound field position type classification result" (such as strong response, medium response, weak response). The determination of priority takes into account the layer difference, physical distance, historical communication quality and role type of the device. For example, the connection from the first layer to the second layer takes precedence over the connection from the second layer to the third layer, and the connection priority between the same layers is lower. Between each pair of devices, the system calculates the connection priority value (between 0 and 1) based on the above factors, and constructs a symmetrical two-dimensional "connection priority matrix", which is used to guide subsequent network link selection and redundant path design.
[0081] Step S33: Calculate the connection load carrying capacity of each device based on the inter-device connection priority matrix and the weight coefficient in the device role allocation data, and set the device with the highest carrying capacity as the connection center node;
[0082] The embodiment of the present invention performs a cumulative analysis on the sum of the potential number of connections and the connection weight of each device based on the connection priority matrix, while taking into account its weight coefficient in the role allocation data. For devices with high weight coefficients, many connection relationships and higher priority values, the system assigns them a higher "connection load carrying capacity score". For example, a speaker that is in a relay role, maintains a high-quality connection relationship with multiple devices and has a stable response will be judged to have a high carrying capacity. Finally, the system ranks the carrying capacity of all devices and selects the device with the highest score as the "connection center node", which is used as the core transit node for the main path. At the same time, some suboptimal nodes are retained in the edge area to build backup connections.
[0083] Step S34: planning the shortest connection path and backup connection path between each device based on the connection center node and the connection priority matrix between devices, and generating transmission path optimization data including the main path and the backup path;
[0084] The embodiment of the present invention adopts an improved Dijkstra algorithm or a heuristic search method based on a priority weighted graph, sets edge weights according to the connection priority matrix, and performs main path planning for the entire three-layer network structure. The system first uses the master control device as the starting point to find a low-hop, high-quality main path covering all devices; then, using each key relay node as the intermediate point, it selects several suboptimal but stable paths from the main path to build backup connections. Ultimately, each device has at least one main connection and one backup connection, and outputs transmission path optimization data in a tabular form, which includes fields such as device number, upstream node, downstream node, path type (primary / backup), and path quality score.
[0085] Step S35: Allocate the communication frequency band and power parameters of each device according to the transmission path optimization data to generate network configuration parameter data.
[0086] The embodiment of the present invention identifies the upstream and downstream communication relationships of each device from the path optimization data, and allocates communication frequency bands to them according to the link density and role priority to ensure that adjacent communications do not interfere with each other. In terms of power allocation, the master role is configured with a higher transmission power (such as 8-12dBm) because it assumes the broadcast function; the relay role adapts to the medium power (such as 4-8dBm) according to the number of nodes it carries and the path quality; the monitoring role adopts the minimum power (such as 0~2dBm) to save energy and avoid interference. The system completes the frequency band division and power mapping based on the device role, path load and communication frequency reuse strategy, and finally generates a set of structured "network configuration parameter data" for the issuance of Bluetooth configuration instructions and device adaptive negotiation during the speaker networking process. This parameter data will continue to play a role in network deployment and subsequent dynamic adjustments.
[0087] It is particularly important that step S34 includes the following steps:
[0088] Step S341: Determine a path planning range starting from the connection center node based on the connection center node and the connection priority matrix between devices, and establish a node list for path search;
[0089] This embodiment of the present invention reads the multiple connection center nodes and their device identifiers identified in step S33, then extracts the connection relationships and priority values between each center node and other nodes from the connection priority matrix, sets a connection depth limit parameter (e.g., a maximum of 3 hops) to limit the search range to prevent excessive delays or severe signal attenuation caused by long paths. Within this search range, the system screens all devices that can establish a connection with the center node within the allowed number of hops, and constructs a "path planning candidate device list" with each center node as the root. This list will be used as a search space in subsequent path sorting and screening to prevent invalid connections from being included in the path optimization calculation process.
[0090] Step S342: sorting the devices in the node list based on the priority values in the inter-device connection priority matrix from high to low priority, and generating a device connection sequence table;
[0091] The embodiment of the present invention takes each connection center node as the starting point, extracts the value in the priority matrix for each pair of device combinations in the path planning candidate device list, and sorts them from high to low according to the connection priority. During the sorting process, the system gives priority to retaining high-priority connections from the master to the relay device, and limits the monitoring device to only participate in terminal connections and not as a forwarding node. For connection pairs with the same priority value, the system performs a secondary sort with reference to the weight coefficient in the previous stage. After the sorting is completed, the system generates a "device connection sequence table" for each central node, recording the sorted connection target device number, connection priority value, expected connection direction, and network layer, as the basis for subsequent calculation of hop count and screening of the main path.
[0092] Step S343: Calculate the number of jump steps and connection distances between devices based on the device connection sequence table and the hierarchical network structure framework, and identify the path with the least number of connection steps as a candidate main connection path;
[0093] The embodiment of the present invention extracts possible connection paths from the device connection sequence table in sequence, and in each path, constructs a directed graph structure based on the connection relationship between devices, and superimposes the logical level change and physical distance calculation of each hop as the jump cost for evaluation. The system adopts an improved breadth-first search (BFS) algorithm to find all feasible paths from the central node to the network edge device (monitoring device) without exceeding the maximum hop limit, and calculates the total number of hops, physical distance and hierarchical span of each path. Finally, the system selects the path with the least number of hops, complete path structure and covering the target node as the "candidate main connection path", and records the starting point, end point, relay device, total number of hops and other information of each path in the form of a list.
[0094] Step S344: Verify the stability and availability of each connection path based on the candidate primary connection paths and the inter-device connection priority matrix, and select the final primary connection path;
[0095] The embodiment of the present invention evaluates each hop connection in the candidate main connection path to determine its connection packet loss rate, response delay and power consumption in the historical communication records. If the connection stability score of a certain hop is lower than the preset threshold (for example, the packet loss rate is higher than 10%, or the delay is greater than 200ms), the system will mark the hop as an unstable connection, and the entire path will be eliminated. For the remaining paths, the system uses a scoring method to comprehensively evaluate their various indicators, such as the number of hops, average priority, maximum delay, communication success rate, etc. After scoring and ranking, the path with the highest score is selected as the "final main connection path". This path has the lowest communication interference and the best network transmission performance, and is the main channel for data transmission.
[0096] Step S345: identifying an alternative connection solution that bypasses the key nodes of the primary path based on the connection relationship of the final primary connection path, and establishing a backup connection path with the same starting point and end point;
[0097] The embodiment of the present invention analyzes the dependent nodes of all connection hops in the final main connection path, with particular attention to path bottlenecks such as central relay nodes. The key nodes are temporarily removed from the path graph, and the path search algorithm (such as A* or DFS) is rerun to find an alternative path that can avoid these bottlenecks and keep the starting point and the end point consistent. The system compares the number of hops and the average connection priority value of the backup path to ensure that it has basic availability when the main path fails, and is not random path redundancy. If a path that bypasses all key nodes cannot be found, it is allowed to include some overlapping nodes, but it must be ensured that there are independent sections to form the path. The final backup connection path will be used as a redundant connection and will be dynamically enabled after the main path is interrupted, the node is disconnected, or the environment changes.
[0098] Step S346: Based on the connection information of the final primary connection path and the backup connection path, the device node sequence, connection hop count and path identifier of each path are recorded to generate transmission path optimization data including the primary path configuration and the backup path configuration.
[0099] The embodiment of the present invention integrates two types of path information, numbers and marks the main path and the backup path respectively, and establishes a "path configuration table", which contains fields such as path number, path type (main or backup), starting device ID, ending device ID, intermediate node sequence, total number of hops, average connection priority, and path identification code (for routing). The system also records the communication frequency band and preset transmission power parameters of each hop in each path to provide support for subsequent dynamic frequency scheduling. The final generated "transmission path optimization data" will be stored in the gateway device or control center in a JSON structure, and will be used for automatic route scheduling, link maintenance, and reconstruction trigger judgment of the Bluetooth speaker network, supporting the stable operation and flexible expansion of the entire IoT speaker system.
[0100] What is particularly important is that step S344 specifically uses the standard deviation of the weight coefficient of each device in the candidate main connection path as a stability indicator, and marks the path with a standard deviation less than 0.2 as a stable path; checks whether the role type connection in the connection priority matrix between devices complies with the preset hierarchical connection rules of the hierarchical network structure framework as an availability indicator, and marks the path that complies with the hierarchical rules as an available path; and selects the path that meets both stability and availability conditions and has the least number of connection steps as the final main connection path.
[0101] This embodiment of the present invention extracts a list of all devices participating in the candidate primary connection path and then retrieves the weight coefficient values assigned to each device in step S35. These weight coefficients represent comprehensive performance indicators such as the device's data processing capability, response speed, connection strength, and load balancing capabilities within the network structure. The system uses these weight coefficients as a sample and calculates their standard deviation using statistical analysis methods. A smaller standard deviation of the device weight coefficients on a particular path indicates that the capabilities of the devices within the path are more consistent, resulting in higher overall network transmission stability and less likely to experience performance bottlenecks or link interruptions caused by weak nodes. For example, if the device weight coefficients on a 5-hop path are [0.72, 0.75, 0.77, 0.76, 0.73], with a standard deviation of only 0.018, far below the system-set stability threshold of 0.2, the path is marked as a "stable path" for subsequent availability verification and final path screening. Within the device sequence of each candidate primary path, the device role type is identified: master, relay, or listener. According to the hierarchical network structure framework constructed in step S31, the system presets that the master device should only be connected to the relay device, the relay device can be connected to other relays or monitoring devices, and the monitoring device should not participate in data forwarding as an upstream node. The system traverses all connection relationships in the candidate path and queries the role type in the device role assignment data one by one. If any hop violates the hierarchical connection rules (such as the monitoring device is connected to the master device, or the monitoring device is connected to other devices as a relay node), the path is considered to be "role mismatch" and does not meet the availability requirements; otherwise, the path is marked as "available path". For example, if a path contains a structure connecting a monitoring device → a relay device → a master device, the path is judged to violate the hierarchical rules and is unavailable. The path sets marked as "stable paths" and "available paths" in the previous step are intersection-screened to extract paths that meet both reasonable device weight distribution and balanced performance as well as network structure specifications and correct connection logic. The system sorts these qualified paths by hop count, prioritizing the path with the fewest hops as the final primary connection path to maximize network communication efficiency, minimize latency, and minimize energy consumption. For example, if three candidate paths all meet the stability and availability requirements, but have 3, 4, and 5 hops, respectively, the path with 3 hops is selected as the "final primary connection path," and its path number, starting and ending device IDs, node sequence, weight distribution, and hierarchical structure information are written into the transmission path optimization data for subsequent frequency band allocation and network configuration parameter distribution. This path will also serve as the reference path for dynamic routing switching and will be prioritized for reconstruction when environmental conditions change.
[0102] Preferably, step S35 includes the following steps:
[0103] Step S351: Counting the number of connections and path length distribution of each device based on the primary path and backup path information in the transmission path optimization data, thereby calculating the communication load index of each device;
[0104] The embodiment of the present invention reads the device node sequence of each main connection path and backup connection path recorded in the transmission path optimization data, and then counts the number of times each speaker device appears in these paths as a basic indicator of the number of connections. At the same time, the system extracts the number of hops of each path as the path length, and performs a weighted average of all path lengths in which each device participates, reflecting the complexity of the transit tasks undertaken by the device in the network. The number of device connections and the average path length are standardized and multiplied together to obtain the communication load index of each device. The higher the communication load index, the heavier the network communication relay, data forwarding and other tasks undertaken by the device. For example, if a relay device participates in 3 paths with an average number of hops of 4, its communication load index will be significantly higher than that of a monitoring device that only participates in 1 short path.
[0105] Step S352: Allocating Bluetooth communication frequency bands to the devices in descending order of communication load index based on the communication load index of each device and the weight coefficient in the device role allocation data to obtain frequency band allocation data;
[0106] The embodiment of the present invention uses the communication load index as the priority basis, and performs the frequency band allocation operation in combination with the weight coefficient recorded in the device role allocation data of each device. The specific method is: after all devices are sorted from high to low according to the communication load index, different frequency bands are allocated to them in turn from the available Bluetooth communication frequency band pool to avoid interference caused by overlapping frequency bands of high-load devices. For example, for devices that support the BLE 5.0 protocol, the optional physical channels are three advertising channels 37, 38, and 39 and several data channels. The system prioritizes allocating the main data channel with the least interference to the master or relay device with a high communication load index, and the remaining frequency bands are reserved for the monitoring device. Finally, the frequency band allocation data is generated, which contains the unique identification of each device and the working frequency band number assigned to it.
[0107] Step S353: Calculate the minimum transmission power and maximum transmission power range required by each device based on the distance parameters of each connection path in the transmission path optimization data and the inter-device connection priority matrix;
[0108] The embodiment of the present invention estimates the minimum transmission power required for each device to complete stable communication based on the path distance information contained in the transmission path optimization data and the connection strength in the connection priority matrix between devices. In order to prevent connection failure due to signal attenuation, the system will also evaluate the longest communication distance and noise interference in the path to determine the maximum transmission power upper limit of each device. The minimum and maximum values together constitute the power range. For example, if the distance between a relay device and its downstream device is 12 meters, according to the Bluetooth power attenuation model, the minimum transmission power of the device at a communication rate of 2Mbps is 1.2mW. In order to maintain connection in scenarios with high network load or channel interference, its maximum transmission power can be increased to 6.3mW, forming an adjustable power range of 1.2-6.3mW.
[0109] Step S354: Power level setting is performed based on the frequency band allocation data, the minimum transmit power range, and the maximum transmit power range in combination with the role type in the device role allocation data to obtain power level setting data, wherein the power level setting specifically sets a high power level for the master role device, a low power level for the monitoring role device, and a medium power level for the relay role device;
[0110] The embodiment of the present invention combines frequency band allocation data, power range and device role to set the power level. Among them, the main control device needs to continuously send control data to the network, so it is set to a high power level (the transmission power is close to the maximum value), such as 5.5-6.3mW; the relay device needs to undertake the receiving and forwarding tasks at the same time, and the power level is set to medium (such as 3.2-5.0mW); the monitoring device is mainly responsible for local data collection and downlink reception, and a low power level is set (such as 1.2-2.8mW) to reduce interference and save energy. This setting process is automatically completed by the control system and does not rely on manual intervention. The final output power level setting data records the role of each device, its allowed power adjustment range and target setting value.
[0111] Step S355: Generate network configuration parameter data including device identification, allocated frequency band, power parameters and connection configuration according to the frequency band allocation data and power level setting data.
[0112] The embodiment of the present invention fuses the frequency band allocation data with the power level setting data, integrates the device identification, physical layer configuration (communication frequency band), link layer parameters (power level), and logical connection information (connection relationship with upstream and downstream nodes), and generates complete network configuration parameter data. This data will be sent to each Bluetooth speaker device in a standard JSON structure or a binary format that can be recognized by the device, and will serve as the parameter basis for initializing the network and dynamically adjusting the parameters during operation, thereby completing the low-level communication configuration of the Bluetooth speaker Internet of Things system and ensuring the stability and scalability of the network in different environments. This step is the final link of the entire networking process and is also the configuration basis for subsequent environmental monitoring and adaptive reconstruction.
[0113] Preferably, step S4 includes the following steps:
[0114] Step S41: starting the environmental monitoring mode of each speaker device according to the network configuration parameter data, setting the monitoring period to a preset time interval, and establishing a real-time monitoring task schedule;
[0115] The embodiment of the present invention sends a startup instruction to each Bluetooth speaker device in turn based on the generated network configuration parameter data, controls it to enter the environmental monitoring mode, and sets a unified acoustic sampling period on the device side, for example, monitoring every 10 minutes. The system registers the monitoring task information of each device in a scheduling table. The scheduling table content includes the device identification, sampling frequency, next monitoring timestamp and task status mark, which is used to coordinate the monitoring actions of all devices to avoid conflicts. For example, in a medium-sized room with 8 devices, the system adopts a hierarchical scheduling mechanism. Each layer of devices takes turns to perform detection tasks every 15 seconds to ensure that the acoustic signals do not interfere with each other, while reducing the impact on the normal playback task of the audio.
[0116] Step S42: Based on the real-time monitoring task schedule and the preset time interval, each speaker device is controlled to periodically transmit an acoustic detection signal, collect current room acoustic response data, and generate real-time room acoustic data;
[0117] The embodiment of the present invention controls each device to periodically perform acoustic detection operations at preset time intervals according to the above-mentioned task scheduling table. The detection signal adopts a unified standard single-frequency or swept-frequency signal with a frequency range of 20Hz to 20kHz. Different signal intensities are selected for transmission according to the role type. For example, the relay device transmits a medium intensity (80dB SPL) and the main control device transmits a high intensity (95dB SPL). During each round of detection, the remaining devices enter the monitoring mode and collect sound wave signals in real time. The signal strength, delay and frequency response are measured through the microphone array. The system summarizes the data collected by each device and generates a real-time room acoustic data file containing device identification, timestamp, collection frequency point and response intensity.
[0118] Step S43: extracting the current room characteristic frequency distribution according to the real-time room acoustic data, comparing it with the room characteristic frequency distribution data, and calculating the frequency offset and response intensity change of each characteristic frequency point;
[0119] The embodiment of the present invention compares the frequency point response data collected in the real-time room acoustic data with the previously recorded room characteristic frequency distribution data item by item to identify whether the current frequency point deviates from the initial characteristic frequency. First, the current response data is mapped to the original frequency index through the frequency point alignment algorithm, and then the frequency offset (current value minus initial value) and response intensity change (in dB) of each characteristic frequency point are calculated. For example, if a characteristic frequency was originally 2.4kHz and is currently measured to be 2.6kHz, the offset is +200Hz; if the response intensity changes from -45dB to -35dB, the change is +10dB. The system records the changes of all frequency points to form a room characteristic response difference matrix.
[0120] Step S44: Calculate the standard deviation and average deviation of the characteristic frequency change based on the frequency offset and response intensity change of each characteristic frequency point to generate the environmental state change amplitude;
[0121] The embodiment of the present invention uses the characteristic frequency difference matrix obtained in the previous step to perform statistical analysis. First, the square difference of the offset of all frequency points is averaged and squared to obtain the standard deviation of the frequency offset; secondly, the absolute value of all response intensity changes is averaged to obtain the average deviation value. The two indicators together constitute a measure of the magnitude of the change in environmental state, and the system uses it as a monitoring result of the dynamic change trend of the environment. For example, after placing new furniture in a place, the intensity of the low-frequency response increased significantly, the average deviation value reached 12dB, and the standard deviation was 0.32, indicating that the acoustic propagation characteristics of the environment have changed significantly.
[0122] Step S45: comparing the average deviation of the environmental state change amplitude with a preset change threshold, triggering a network reconstruction signal when the average deviation exceeds the preset threshold, and generating network adjustment instruction data;
[0123] In this embodiment of the present invention, the average deviation value obtained in step S44 is compared with a preset change threshold. For example, if the system preset threshold is 8dB and the current average deviation value is 12dB, the threshold is exceeded, and the system immediately generates network adjustment instruction data. This instruction data includes the trigger time, triggering device, change type (offset / intensity / combined), and the adjustment level to be performed. The adjustment instruction is broadcast by the master control device to the entire network, notifying each device to prepare to perform network reconfiguration operations to adapt to the changed acoustic distribution of the new environment.
[0124] Step S46: Execute the network reconstruction process based on the network adjustment instruction data, use the current network configuration parameter data as a historical configuration backup, and re-execute steps S1 to S3 to achieve dynamic adaptive adjustment of the network based on environmental changes.
[0125] The embodiment of the present invention responds to the network adjustment instruction and starts to execute the network reconstruction process. First, the currently used network configuration parameter data is packaged as a whole and saved as a historical backup, and the triggering reason and timestamp of the change are recorded to form a network reconstruction record log. Subsequently, the system re-enters the device scanning, spatial positioning, acoustic detection and other processes, that is, re-executes steps S1 to S3, updates the device spatial distribution, sound field characteristics and role allocation, and finally generates a new network structure and connection configuration parameters, so that the entire Bluetooth speaker Internet of Things networking system has dynamic self-adaptation capabilities, adapts to the ever-changing indoor layout or environmental noise conditions, and maintains stable and efficient communication and audio synchronization capabilities.
[0126] The present invention also provides a Bluetooth speaker networking system based on the Internet of Things, which is used to execute the above-mentioned Bluetooth speaker networking method based on the Internet of Things. The Bluetooth speaker networking system based on the Internet of Things includes:
[0127] The acoustic perception module is used to obtain the spatial position distribution data of the speaker devices; based on the spatial position distribution data of the speaker devices, it controls each device to sequentially transmit an acoustic detection signal of a preset frequency, and evaluates the acoustic propagation characteristics of the room based on the signal response strength;
[0128] The role assignment module is used to compare and analyze the signal response strengths of different frequencies using the room's acoustic propagation characteristics to identify the room's characteristic frequency distribution data; detect the differences in the acoustic response amplitudes of each speaker device at different characteristic frequencies based on the room's characteristic frequency distribution data; determine the location type characteristics of each device in the room's sound field based on the differences in the acoustic response amplitudes, and assign device roles based on the response amplitudes to obtain device role assignment data;
[0129] The network construction module is used to construct a hierarchical Bluetooth connection topology structure based on the device role allocation data, optimize the data transmission path between each device, and obtain transmission path optimization data; allocate the communication frequency band and power parameters of each device based on the transmission path optimization data, and generate network configuration parameter data;
[0130] The adaptive adjustment module is used to continuously monitor the real-time changes of the room characteristic frequency based on the network configuration parameter data, and judge the magnitude of the change in the environmental state based on the degree of change in the characteristic frequency; when the magnitude of the change in the environmental state exceeds a preset threshold, steps S1 to S3 are re-executed to achieve dynamic adaptive adjustment of the network.
[0131] The present invention is therefore intended to be illustrative and non-restrictive in all respects, with the scope of the invention being defined by the appended claims rather than the foregoing description, and all changes that come within the meaning and range of equivalents of the application documents are intended to be embraced therein.
[0132] The foregoing description is intended only to provide specific embodiments of the present invention, which will enable those skilled in the art to understand and implement the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not intended to be limited to the embodiments shown herein, but is to be construed in the widest possible manner consistent with the principles and novel features disclosed herein.
Claims
1. A Bluetooth speaker networking method based on the Internet of Things, characterized in that: The following steps are involved: Step S1: Acquire spatial position distribution data of the speaker devices; control each device to sequentially transmit an acoustic detection signal of a preset frequency based on the spatial position distribution data of the speaker devices, and evaluate the room acoustic propagation characteristics based on the signal response strength; Step S2: Using the room's acoustic propagation characteristics, comparatively analyzing the signal response intensities at different frequencies to identify the room's characteristic frequency distribution data; detecting differences in the acoustic response amplitudes of each speaker device at different characteristic frequencies based on the room's characteristic frequency distribution data; determining the position type characteristics of each device in the room's sound field based on the differences in the acoustic response amplitudes, and performing device role assignment based on the response amplitudes to obtain device role assignment data; Step S3: constructing a hierarchical Bluetooth connection topology structure based on the device role assignment data, and optimizing the data transmission paths between the devices to obtain transmission path optimization data; assigning communication frequency bands and power parameters to each device based on the transmission path optimization data to generate network configuration parameter data; Step S4: Continuously monitor the real-time changes of the room characteristic frequency based on the network configuration parameter data, and determine the magnitude of the environmental state change based on the degree of change of the characteristic frequency; when the magnitude of the environmental state change exceeds the preset threshold, re-execute steps S1 to S3 to achieve dynamic adaptive adjustment of the network.
2. The method for networking Bluetooth speakers based on the Internet of Things according to claim 1, characterized in that: Step S1 includes the following steps: Step S11: Scan the Bluetooth speaker device network to obtain identification information of connectable speaker devices in the current environment; Step S12: Calculating the relative distance between devices based on the Bluetooth signal strength change pattern monitored by the speaker device identification information, and constructing a device space coordinate mapping table based on the relative distance between devices to obtain the spatial position distribution data of the speaker devices; Step S13: Determine the transmission order and frequency range parameters of the acoustic detection signal based on the spatial position distribution data of the speaker devices, control each speaker device to sequentially output a single-frequency test audio signal within a preset frequency range based on the transmission order, and record the signal transmission timestamp and frequency parameters of each device to generate detection signal transmission record data; Step S14: Based on the detection signal transmission record data, control other speaker devices to enter the signal receiving mode, collect the acoustic signal from the transmitting device, and perform amplitude detection and frequency recognition processing to obtain the signal response raw data including the signal strength value and arrival time; Step S15: Calculate the acoustic propagation loss coefficient and delay characteristics using the original signal response data, and establish a room acoustic environment model based on acoustic parameter analysis to obtain room acoustic propagation characteristic data.
3. The method for networking Bluetooth speakers based on the Internet of Things according to claim 2, characterized in that: Step S15 includes the following steps: Step S151: Calculating the acoustic propagation loss coefficient between each device position based on the signal strength value in the signal response raw data; Step S152: Analyzing the propagation delay characteristics of the sound wave on different paths using the signal arrival time difference in the signal response original data; Step S153: quantitatively evaluating the acoustic impedance distribution in the room based on the acoustic propagation loss coefficient and the propagation delay characteristics to generate acoustic propagation parameter data; Step S154: analyzing differences in acoustic reflection and absorption characteristics at different locations in the room based on the acoustic propagation parameter data, and identifying geometric structural features of the room using the differences in acoustic characteristics; Step S155: establishing a room acoustic environment model based on the geometric structure characteristics, and obtaining room acoustic propagation characteristic data including propagation path attenuation law and frequency response characteristics.
4. The method for networking Bluetooth speakers based on the Internet of Things according to claim 3, characterized in that: In step S2, the signal response strengths of different frequencies are compared and analyzed using the room acoustic propagation characteristics to identify the room characteristic frequency distribution data, including: Extract the signal response intensity value corresponding to each frequency point in the frequency range of 20Hz-20kHz based on the room acoustic propagation characteristic data; Perform smoothing filtering on the signal response intensity value to obtain frequency response envelope sequence data; Calculate the average value of the response intensity of each frequency point in the frequency response envelope sequence data, and identify the frequency point whose response intensity is more than 1.5 times higher than the average value as the response peak frequency; Calculate the response intensity change gradient between adjacent frequency points in the frequency response envelope sequence data, and identify the frequency interval where the gradient change exceeds 30% as the response turning frequency interval; Calculate the characteristic importance weight coefficient based on the response peak frequency and response corner frequency interval, and select the frequency point with a weight coefficient greater than 0.6 as the room characteristic frequency; The distribution density and interval regularity of the room's characteristic frequencies are counted, and the response intensity values corresponding to each characteristic frequency are recorded to generate the room's characteristic frequency distribution data.
5. The method for networking Bluetooth speakers based on the Internet of Things according to claim 4, characterized in that: In step S2, detecting the difference in acoustic response amplitude of each speaker device at different characteristic frequencies based on the room characteristic frequency distribution data includes: Extract the main characteristic frequencies with weight coefficients higher than a preset threshold value based on the room characteristic frequency distribution data, and generate a test frequency sequence based on the frequency values sorted from low to high; Based on the test frequency sequence, the signal transmission rounds and frequency allocation plan for each speaker device are determined, and each device is controlled to transmit a single-frequency acoustic test signal at a specified characteristic frequency in the order of the rounds. The other speaker devices are simultaneously controlled to enter the receiving mode and measure the amplitude value and signal quality parameters of the received signal, generating the reception response data of each device at different characteristic frequencies. Calculate the numerical distribution range and standard deviation of the amplitude value of the received signal of each speaker device at the same characteristic frequency based on the received response data, and identify the frequency points with significant amplitude differences; Sort and analyze the receiving amplitude values of each speaker device at the frequency points with significant amplitude differences, and count the number of strong response frequency points and weak response frequency points of each device; The acoustic response characteristic coefficient of each device is calculated based on the number of strong response frequency points and weak response frequency points of each device, and the devices are classified into acoustic sensitivity categories based on the acoustic response characteristic coefficients to generate an acoustic response amplitude difference that includes the device acoustic type and response difference value.
6. The method for networking Bluetooth speakers based on the Internet of Things according to claim 5, characterized in that: In step S2, the position type characteristics of each device in the room sound field are determined based on the difference in acoustic response amplitude, and the device role assignment based on the response amplitude is performed, including: Calculating the relative difference in characteristic coefficients between devices based on the acoustic response characteristic coefficients of each device in the acoustic response amplitude difference, and sorting the devices by acoustic response capability based on the difference to obtain an acoustic response capability sequence; Based on the acoustic response capability sequence, the top 30% of the devices are marked as the strong sound field response location type, the bottom 30% of the devices are marked as the weak sound field response location type, and the middle 40% of the devices are marked as the medium sound field response location type, thereby obtaining the sound field location type classification result; Calculate the comprehensive sound field adaptability score of each device based on the sound field location type classification results and the response difference value in the acoustic response amplitude difference data; Perform a preliminary device role assignment based on the comprehensive sound field adaptability score. Assign the device with the highest score in the location with a strong sound field response to the master role, the device with the weak sound field response to the monitor role, and the device with the medium sound field response to the relay role. Based on the preliminary device role allocation result, a weight coefficient is allocated to each role, and device role allocation data including device identification, location type characteristics, role type and weight coefficient is generated.
7. The method for networking Bluetooth speakers based on the Internet of Things according to claim 6, characterized in that: Step S3 includes the following steps: Step S31: According to the role type and weight coefficient in the device role allocation data, the master role device is set as the first network layer, the relay role device is set as the second network layer, and the monitoring role device is set as the third network layer, thereby establishing a hierarchical network structure framework; Step S32: determining the connection priority relationship between devices in each layer based on the hierarchical network structure framework and the location type characteristics in the device role allocation data, and generating an inter-device connection priority matrix; Step S33: Calculate the connection load carrying capacity of each device based on the inter-device connection priority matrix and the weight coefficient in the device role allocation data, and set the device with the highest carrying capacity as the connection center node; Step S34: planning the shortest connection path and backup connection path between each device based on the connection center node and the connection priority matrix between devices, and generating transmission path optimization data including the main path and the backup path; Step S35: Allocate the communication frequency band and power parameters of each device according to the transmission path optimization data to generate network configuration parameter data.
8. The method for networking Bluetooth speakers based on the Internet of Things according to claim 7, characterized in that: Step S35 includes the following steps: Step S351: Counting the number of connections and path length distribution of each device based on the primary path and backup path information in the transmission path optimization data, thereby calculating the communication load index of each device; Step S352: Allocating Bluetooth communication frequency bands to the devices in descending order of communication load index based on the communication load index of each device and the weight coefficient in the device role allocation data to obtain frequency band allocation data; Step S353: Calculate the minimum transmission power and maximum transmission power range required by each device based on the distance parameters of each connection path in the transmission path optimization data and the inter-device connection priority matrix; Step S354: Power level setting is performed based on the frequency band allocation data, the minimum transmit power range, and the maximum transmit power range in combination with the role type in the device role allocation data to obtain power level setting data, wherein the power level setting specifically sets a high power level for the master role device, a low power level for the monitoring role device, and a medium power level for the relay role device; Step S355: Generate network configuration parameter data including device identification, allocated frequency band, power parameters and connection configuration according to the frequency band allocation data and power level setting data.
9. The method for networking Bluetooth speakers based on the Internet of Things according to claim 8, characterized in that: Step S4 includes the following steps: Step S41: starting the environmental monitoring mode of each speaker device according to the network configuration parameter data, setting the monitoring period to a preset time interval, and establishing a real-time monitoring task schedule; Step S42: Based on the real-time monitoring task schedule and the preset time interval, each speaker device is controlled to periodically transmit an acoustic detection signal, collect current room acoustic response data, and generate real-time room acoustic data; Step S43: extracting the current room characteristic frequency distribution according to the real-time room acoustic data, comparing it with the room characteristic frequency distribution data, and calculating the frequency offset and response intensity change of each characteristic frequency point; Step S44: Calculate the standard deviation and average deviation of the characteristic frequency change based on the frequency offset and response intensity change of each characteristic frequency point to generate the environmental state change amplitude; Step S45: comparing the average deviation of the environmental state change amplitude with a preset change threshold, triggering a network reconstruction signal when the average deviation exceeds the preset threshold, and generating network adjustment instruction data; Step S46: Execute the network reconstruction process based on the network adjustment instruction data, use the current network configuration parameter data as a historical configuration backup, and re-execute steps S1 to S3 to achieve dynamic adaptive adjustment of the network based on environmental changes.
10. A Bluetooth speaker networking system based on the Internet of Things, characterized in that: Used to execute the method for networking Bluetooth speakers based on the Internet of Things according to claim 1, the Bluetooth speaker networking system based on the Internet of Things comprises: The acoustic perception module is used to obtain the spatial position distribution data of the speaker devices; based on the spatial position distribution data of the speaker devices, it controls each device to sequentially transmit an acoustic detection signal of a preset frequency, and evaluates the acoustic propagation characteristics of the room based on the signal response strength; The role assignment module is used to compare and analyze the signal response strengths of different frequencies using the room's acoustic propagation characteristics to identify the room's characteristic frequency distribution data; detect the differences in the acoustic response amplitudes of each speaker device at different characteristic frequencies based on the room's characteristic frequency distribution data; determine the location type characteristics of each device in the room's sound field based on the differences in the acoustic response amplitudes, and assign device roles based on the response amplitudes to obtain device role assignment data; The network construction module is used to construct a hierarchical Bluetooth connection topology structure based on the device role allocation data, optimize the data transmission path between each device, and obtain transmission path optimization data; allocate the communication frequency band and power parameters of each device based on the transmission path optimization data, and generate network configuration parameter data; The adaptive adjustment module is used to continuously monitor the real-time changes of the room characteristic frequency based on the network configuration parameter data, and judge the magnitude of the change in the environmental state based on the degree of change in the characteristic frequency; when the magnitude of the change in the environmental state exceeds a preset threshold, steps S1 to S3 are re-executed to achieve dynamic adaptive adjustment of the network.
Citation Information
Patent Citations
Bluetooth device ad hoc network method and system
CN108834121A
BLE-based Bluetooth networking method, system, device and medium
CN115175158A
Method for dynamically optimizing communication path of multistage wireless ad hoc network
CN117915422A
Acoustic signal processing system based on data acquisition card
CN119517048A
Sound equipment networking configuration method and device, electronic equipment and storage medium
CN119922521A
Cited By
Bluetooth device remote positioning method and system based on Internet of Things
CN121194299A
Multi-Bluetooth device interconnection and intercommunication method based on transmission state feedback mechanism
CN121262556A
