A bluetooth sound box networking system and method based on internet of things
By acquiring the spatial location and acoustic propagation characteristics of speaker devices, a hierarchical Bluetooth connection topology is constructed, which solves the problem of poor sound quality caused by differences in acoustic characteristics in traditional Bluetooth speaker networking, and improves stability and flexibility. It is suitable for scenarios such as multi-room home audio systems and smart conference rooms.
Patent Information
- Application Number
- CN202510935849.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2045-07-08
AI Technical Summary
Traditional Bluetooth speaker networking suffers from poor sound quality in some areas of an open-plan kitchen and living room due to differences in acoustic characteristics, as well as insufficient connection stability and inter-device collaboration.
By acquiring spatial distribution data of speaker devices, evaluating room acoustic propagation characteristics using acoustic detection signals, identifying the location type characteristics of devices in the sound field, assigning device roles, constructing a hierarchical Bluetooth connection topology, optimizing data transmission paths, and achieving dynamic adaptive adjustment of the network.
It improves the stability, flexibility, and spatial audio performance of Bluetooth speaker networking systems, enabling efficient networking and sound field analysis in dynamic environments, avoiding connection redundancy and communication bottlenecks, and enhancing the system's anti-interference and self-recovery capabilities.
Smart Images

Figure CN120614561B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent sound boxes, and particularly relates to a Bluetooth sound box networking system and method based on the Internet of Things. BACKGROUND
[0002] Bluetooth sound box networking refers to connecting multiple Bluetooth sound boxes together through specific technologies and protocols to form a network system that collaborates and works together, thereby realizing more diverse audio playback functions and more flexible usage. Through networking, multiple sound boxes can be distributed in different locations, such as in a larger space, such as a living room, dining room, and balcony, or different areas of an office. This can create a surround sound effect, making the sound fuller and more layered. For example, when playing movies or music, users can experience sound from different directions, enhancing the sense of presence and immersion. In a networked system, users can control multiple sound boxes simultaneously through a control device (such as a smartphone, tablet, etc.). For example, all sound boxes can be turned on or off, their volume can be adjusted, and the audio source can be switched. This makes audio playback management more efficient and convenient.
[0003] Traditional Bluetooth sound box networking mainly focuses on connection stability and audio synchronization between devices, but in an open kitchen and living room integrated space, the acoustic characteristics of different areas differ greatly, and traditional networking methods often result in poor sound quality in some areas. SUMMARY
[0004] Therefore, it is necessary to provide a Bluetooth sound box networking system and method based on the Internet of Things to solve at least one of the above technical problems.
[0005] To achieve the above purpose, a Bluetooth sound box networking method based on the Internet of Things includes the following steps:
[0006] Step S1: Obtain sound box device spatial position distribution data; control each device to emit a preset frequency acoustic detection signal in turn according to the sound box device spatial position distribution data, and evaluate the room acoustic propagation characteristics based on the signal response strength;
[0007] Step S2: Compare and analyze the signal response strength of different frequencies using the room acoustic propagation characteristics to identify the room characteristic frequency distribution data; detect the acoustic response amplitude difference of each sound box device at different characteristic frequencies according to the room characteristic frequency distribution data; determine the position type characteristics of each device in the room sound field based on the acoustic response amplitude difference, and perform device role assignment based on the response amplitude to obtain device role assignment data;
[0008] Step S3: constructing a hierarchical Bluetooth connection topology according to the device role allocation data, optimizing the data transmission path between devices, obtaining transmission path optimization data; allocating the communication frequency band and power parameters of each device according to the transmission path optimization data, and generating network configuration parameter data;
[0009] Step S4: continuously monitoring the real-time change of the room characteristic frequency based on the network configuration parameter data, and judging the environmental state change amplitude based on the characteristic frequency change degree; when the environmental state change amplitude exceeds the preset threshold, re-executing steps S1 to S3 to realize dynamic self-adaptive adjustment of the network.
[0010] The application also provides a Bluetooth sound box networking system based on the Internet of Things, which is used to execute the Bluetooth sound box networking method based on the Internet of Things.
[0011] The acoustic perception module is used to obtain sound box device spatial position distribution data; control each device to emit acoustic detection signals of a preset frequency in turn according to the sound box device spatial position distribution data, and evaluate the room acoustic propagation characteristics based on the signal response strength;
[0012] The role allocation module is used to compare and analyze the signal response strength of different frequencies by using the room acoustic propagation characteristics, identify room characteristic frequency distribution data, detect the acoustic response amplitude difference of each sound box device under different characteristic frequencies according to the room characteristic frequency distribution data, judge the position type characteristics of each device in the room sound field based on the acoustic response amplitude difference, and perform device role allocation based on the response amplitude, to obtain device role allocation data.
[0013] The network construction module is used to construct a hierarchical Bluetooth connection topology according to the device role allocation data, optimize the data transmission path between devices, obtain transmission path optimization data, allocate the communication frequency band and power parameters of each device according to the transmission path optimization data, and generate network configuration parameter data.
[0014] The adaptive adjustment module is used to continuously monitor the real-time change of the room characteristic frequency based on the network configuration parameter data, and judge the environmental state change amplitude based on the characteristic frequency change degree; when the environmental state change amplitude exceeds the preset threshold, re-executing steps S1 to S3 to realize dynamic self-adaptive adjustment of the network.
[0015] The application aims at the problems of static network topology, poor environmental adaptability, insufficient connection stability and weak cooperation ability among devices in traditional Bluetooth sound system, and builds a set of adaptive, intelligent and hierarchical sound box network construction and management mechanism, which realizes efficient networking, sound field analysis and intelligent role allocation of Bluetooth sound box devices in dynamic environment, and significantly improves the stability, flexibility and spatial audio performance of the networking system. The whole method takes device spatial position perception and acoustic propagation characteristic modeling as the core basis, and builds a dynamic adjustable hierarchical Bluetooth communication network architecture through multi-step logical progression. The system obtains the relative position distribution of Bluetooth sound box devices in the actual indoor space through environment scanning and spatial positioning, and completes the overall perception of room propagation characteristics combined with acoustic detection signals, without relying on additional hardware, but only with Bluetooth and acoustic modules to efficiently complete spatial mapping and sound field perception. In this process, by real-time calculation of signal strength and response delay between devices, the reflection, absorption and propagation characteristics of the room are accurately evaluated, forming an acoustic propagation model including loss coefficient, frequency response law, reflection and absorption difference and other elements, and then the key frequency characteristic information describing the room sound field structure is extracted. This model as the basic data of the whole process not only supports the subsequent frequency analysis and device classification, but also provides physical layer guidance for network construction. In the device response capability identification stage, the system uses the extracted characteristic frequency to test each device for multiple rounds, records the receiving response difference of each device at different frequencies, and builds an acoustic characteristic index based on response strength and frequency gradient. By comparing the performance of each device at key frequency points such as response peak frequency and turning frequency, it is identified which devices are in the main reflection area or energy attenuation area of the sound field, so as to deduce the rationality of devices assuming different acoustic roles in space. Based on this data-driven role allocation method, the system can classify devices with strong response capability as master roles, medium response devices as relay roles, and weak response devices as listening roles, realizing the high matching of network in physical layer and communication logic layer, and avoiding connection redundancy or communication bottleneck problem caused by improper role allocation. Based on the above role allocation results, the system further builds a multi-level Bluetooth networking topology. By dividing devices into master layer, relay layer and listening layer, a hierarchical and load-sharing network architecture is established. The connection priority among devices is dynamically generated according to the role type, position distribution and weight coefficient, on which basis the system calculates the connection load bearing capacity of each device and identifies the connection center node, and then optimally plans the main connection path and backup connection path in multiple candidate paths, realizing low-hop and high-stability multi-path communication configuration. Especially in the main path selection process, the system uses the standard deviation of the weight coefficient between devices as the path stability evaluation index, and combines the role level connection rule for availability verification, so as to ensure that the main path meets the network requirements in physical performance and structure rules.Meanwhile, the construction of a backup path can realize automatic switching of connection when the main path is blocked, enhancing the anti-interference and self-recovery capabilities of the system. At the network configuration level, the system formulates precise communication frequency bands and power parameters for each sound box device based on the connection path and device role. Using a dual ordering method of communication load index and role weight, the frequency band resources are dynamically allocated, effectively avoiding the problems of co-channel interference and channel congestion. The power setting is graded according to the connection path and role of the device, such as configuring high power for the master device to ensure coverage, configuring medium power for the relay device to maintain link continuity, and setting low power for the listening device to reduce energy consumption and noise, forming an energy-efficient Bluetooth communication network. In addition, the system also designs a dynamically adaptive acoustic environment monitoring mechanism to continuously track the real-time changes of the room characteristic frequency. When the system identifies that the frequency offset or response intensity fluctuation caused by environmental changes exceeds the threshold, it can automatically trigger the network reconstruction process to reposition the devices, acoustic modeling and network configuration, ensuring that the system continuously maintains the best operating state as the environment changes. This mechanism is applicable to practical scenarios such as furniture movement, crowd density changes, room use changes, etc., and has high practicality and stability. In summary, the method of the present application works collaboratively through six modules of spatial perception, frequency modeling, role division, topology construction, parameter optimization, and environment adaptive reconstruction, not only solving the problems of connection complexity, signal interference, and device management difficulty in Bluetooth sound box networking, but also establishing a close 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 sound system, smart conference room, commercial sound field arrangement, etc., and can realize a smart sound system network that is quickly deployed, self-adjusted, and stably connected in a complex acoustic environment, building a more intelligent, collaborative, and high-fidelity spatial audio experience. BRIEF DESCRIPTION OF DRAWINGS
[0016] Other features, objects, and advantages of the present application will become more apparent from the following detailed description of non-limiting embodiments made with reference to the accompanying drawings:
[0017] Figure 1 Figure 1 is a schematic diagram of the step flow of a Bluetooth sound box networking method based on the Internet of Things according to the present application;
[0018] Figure 2 Figure 2 is a detailed step flow diagram of step S1 in Figure 1; Figure 1
[0019] Figure 3 Figure 3 is a detailed step flow diagram of step S3 in Figure 1. Figure 1 DETAILED DESCRIPTION
[0020] The technical method of the present application will be described clearly and completely in combination with the drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0021] In addition, the drawings are only schematic illustrations of the present application, and are not necessarily drawn to scale. The same reference numerals in the drawings represent the same or similar parts, and thus repeated description thereof will be omitted. Some block diagrams shown in the drawings are functional entities, and do not necessarily have to correspond to physically or logically independent entities. The functional entities can be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different network and / or processor methods and / or microcontroller methods.
[0022] It should be understood that although the terms "first", "second" and the like can be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of the exemplary embodiments, a first element can be called a second element, and similarly a second element can be called a first element. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0023] To achieve the above-mentioned purpose, please refer to Figures 1 to 3 The present application provides a Bluetooth speaker networking method based on Internet of Things, which comprises the following steps:
[0024] Step S1: Obtain the spatial position distribution data of the speaker device; control each device to emit acoustic detection signals of a predetermined frequency in turn according to the spatial position distribution data of the speaker device, and evaluate the room acoustic propagation characteristics based on the signal response strength;
[0025] The embodiment of the application deploys 6 Bluetooth sound box devices supporting Internet of Things communication in a family living room environment with an area of about 40 square meters. The system automatically obtains the device identification information and MAC address of each sound box in the local area network through a preset Bluetooth scanning instruction, continuously collects the Bluetooth signal strength fluctuation data between devices by using an RSSI signal strength monitoring algorithm, and calculates the relative distance between the sound box devices after smoothing the RSSI change trend in different time periods. The system uses a method based on the RSSI-distance approximate mapping model to convert the distance into relative position coordinates in a three-dimensional coordinate system, and constructs a sound box device spatial position distribution map based on this. Then, the system generates a device transmission sequence table according to the spatial position data, arranges the acoustic detection sequence according to the principle of "devices at the outermost edge of the space first, and devices at the center last", and sets the interval between two adjacent sound wave transmissions to 500 milliseconds to avoid interference. Each sound box transmits a single-frequency detection signal with a frequency of 500Hz to 8000Hz under the control of the system, and each transmission signal lasts for 200 milliseconds. Other devices switch to the receiving mode to collect sound waves during this period. The system records the signal receiving time point and signal strength of each receiving device, calculates the sound wave arrival delay and attenuation amplitude, analyzes the sound wave reflection, absorption and non-uniformity of the room, and finally generates room acoustic propagation characteristic data containing multi-point path propagation loss, average delay time and frequency attenuation characteristics, which is used for subsequent frequency sensitivity identification.
[0026] Step S2: comparing and analyzing the signal response strength of different frequencies using the room acoustic propagation characteristics, identifying the room characteristic frequency distribution data; detecting the acoustic response amplitude difference of each sound box device at different characteristic frequencies according to the room characteristic frequency distribution data; judging the position type characteristics of each device in the room sound field based on the acoustic response amplitude difference, and performing device role allocation based on the response amplitude to obtain device role allocation data;
[0027] The embodiment of the application utilizes the room acoustic propagation characteristic data obtained by S1 to uniformly divide 100 frequency points in the frequency range of 20Hz to 20kHz, extracts the signal response intensity value in the sound wave propagation path for each frequency point respectively, and forms a frequency-intensity response sequence. After the sequence is subjected to Savitzky-Golay smoothing filter processing, the response curve envelope is obtained, and according to the average value of the response intensity of the full frequency band, the frequency with an intensity higher than 1.5 times the average value is selected as the candidate peak frequency, and the frequency range with an intensity change amplitude greater than 30% between adjacent frequency points is identified as the response turning frequency interval. The system calculates the weight score by statistically analyzing the signal stability, amplitude change slope and other parameters of the candidate frequency, marks the frequency points with a score greater than 0.6 as "room characteristic frequency", and forms room characteristic frequency distribution data. Subsequently, the system controls the sound box device to emit signals according to the selected characteristic frequencies (such as 280Hz, 1.2kHz, 6.3kHz) and receives them by the remaining devices, and records the receiving intensity and signal intelligibility parameters of each device at each frequency point. The system uses a standard deviation analysis algorithm to calculate the variance of the receiving amplitude at each frequency point, identifies the significance of the response difference between different devices at the same frequency, and then calculates the number ratio of high response frequency and low response frequency of each device, to form the acoustic response characteristic coefficient reflecting the response sensitivity of each device to the sound field. The system sorts the acoustic response characteristic coefficients from high to low, selects the top 30% as strong response devices (such as devices located in the corners of the space), the last 30% as weak response devices (such as devices close to the reflecting wall), and the middle as medium response devices, and automatically allocates the devices as master roles, relay roles or listening roles according to the frequency response difference, device position and space propagation characteristics, and forms device role allocation data for the next step of building network topology.
[0028] Step S3: constructing a hierarchical Bluetooth connection topology structure according to the device role allocation data, optimizing the data transmission path between devices, obtaining transmission path optimization data, assigning communication frequency bands and power parameters to each device according to the transmission path optimization data, and generating network configuration parameter data;
[0029] The embodiment of the application constructs a three-layer Bluetooth networking topology according to the device role distribution data generated in S2, sets the master device as the network control layer (first layer), the relay device as the intermediate communication layer (second layer), and the listening device as the terminal response layer (third layer). The system generates a connection priority matrix according to the spatial distribution position of the devices in the three-layer architecture, combines the role weight and signal reachability, and calculates the connection load bearing capacity (i.e. the number of devices that can maintain stable connection at the same time per unit time) of each device. The device with the maximum bearing capacity is taken as the center node, a path traversal strategy based on connection weight is adopted, a high-priority device is selected to establish a shortest path connection link starting from the center node, and a standby path is planned in each link to avoid link interruption caused by node failure. The system traverses all main paths and calculates the weight standard deviation of each device on the path, and marks the devices with a standard deviation less than 0.2 as stable paths, and checks whether the hierarchical structure of the connection path follows the networking rule of "upper layer connection lower layer". If it meets the requirement, it is marked as an available path. The system selects the shortest hop path that meets the "stability" and "availability" from all candidate paths as the final main path, and establishes a standby connection path based on the final main path. Then, the system calculates the communication load index according to the length of the path where each device is located and the number of times of participating in connection, and sets different Bluetooth power level ranges (such as 7dBm for the master device in high power mode and -5dBm for the listening device in low power mode) for master, relay and listening devices according to the device role type, and allocates communication frequency bands (the 2.4GHz frequency band is divided into 40 sub-channels using the frequency hopping mechanism) to avoid interference. Finally, the system integrates the role, path, frequency band and power parameters of each device to form network configuration parameter data, and completes the topology networking configuration.
[0030] Step S4: continuously monitor the real-time changes of the room characteristic frequency based on the network configuration parameter data, and judge the change amplitude of the environment state based on the characteristic frequency change degree; when the change amplitude of the environment state exceeds a preset threshold, re-execute steps S1 to S3 to realize dynamic self-adaptive adjustment of the network.
[0031] The embodiment of the present application calls the frequency, power and time control parameters of each device in the network configuration parameter data to start the environment monitoring mode. The monitoring period set by the mode is 30 seconds, the system controls each device to periodically transmit a short time (100 ms) characteristic frequency probe 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 strength and frequency point position of the current characteristic frequency according to the response data, and compares them one by one with the room characteristic frequency distribution data recorded in 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 preset environmental change threshold of the system (such as 2dB intensity offset or 200Hz frequency offset), it is determined that the sound field changes caused by changes in the environment such as changes in the crowd, movement of large objects or furniture changes. The system automatically generates network reconstruction instruction data to trigger the network reconstruction process to re-execute steps S1 to S3, that is, to reacquire position data, update room acoustic characteristics, reassign device roles and rebuild network topology, to ensure that the sound bar networking structure still maintains connection stability and sound quality coordination performance in the new acoustic environment, and realizes adaptive networking adjustment to dynamic changes in the environment.
[0032] Preferably, step S1 comprises the following steps:
[0033] Step S11: Scan the Bluetooth sound bar device network to obtain the identification information of the connectable sound bar devices in the current environment;
[0034] The embodiment of the present application initializes the Bluetooth scanning module and broadcasts a service discovery signal through the Internet of Things control node (such as a home gateway or a master sound bar), enabling the BLE (Bluetooth Low Energy) protocol to actively detect all connectable Bluetooth sound bar devices within the current network coverage. This process uses an active device scanning mode, and the scanning time window is set to 5000 milliseconds. Within 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 them into a device identification information data packet. The system uses a deduplication and signal strength filtering mechanism to filter out short-time interference devices, and only keeps Bluetooth sound bar devices with an average RSSI greater than -80dBm as valid nodes that can participate in networking. In this embodiment, a total of 6 sound bar devices are identified, and their MAC addresses and connectable characteristics are recorded to form a sound bar device identification information list, which is used for subsequent distance estimation and space modeling operations.
[0035] Step S12: Calculate the relative distance relationship between devices according to the change law of the Bluetooth signal strength of the sound bar device identification information, and construct a device space coordinate mapping table based on the relative distance relationship between devices to obtain sound bar device space position distribution data;
[0036] The embodiment of the application obtains the sound box device identification information based on the S11 step, and monitors the Bluetooth signal strength change rule between each pair of devices in real time through a continuous listening mode. The process adopts a polling mechanism, each device samples and reports the RSSI value of other devices in different time periods, the sampling frequency is set to 10 times per second, and the total sampling time is 30 seconds. The system eliminates the fluctuations caused by environmental interference by weighted average and filtering processing on the RSSI time sequence data of each pair of devices, and estimates the relative distance relationship between the devices by using an RSSI-distance mapping method based on an empirical model. Specifically, the system sets the reference RSSI to-60dBm, which corresponds to a distance of about 1 meter, and estimates that the distance increases by one time for every 6dB decrease in RSSI, and so on. The system projects the relative position of each sound box in the form of two-dimensional coordinates in space, and fine-tunes the node coordinates by combining the triangular positioning method and the minimum error optimization algorithm, thereby constructing a spatial coordinate mapping table of the sound box devices, and finally generating sound box device spatial position distribution data representing the relative spatial layout. The data will serve as the basis for subsequent acoustic signal transmission sequence and sound wave propagation path calculation.
[0037] Step S13: determining the transmission sequence and frequency range parameters of the acoustic detection signal according to the sound box device spatial position distribution data, controlling each sound box device to output a single-frequency test audio signal in a preset frequency range in sequence based on the transmission sequence, and recording the signal transmission timestamp and frequency parameter of each device to generate detection signal transmission record data;
[0038] The embodiment of the application analyzes the relative distance between each sound box and the center area by using the spatial position distribution data obtained in step S12, and generates a signal transmission sequence list according to the principle of "the farther from the room geometric center, the higher the priority". This sorting logic aims to preferentially transmit signals from devices at the edges or corners of the room to improve the coverage range and recognition effect of the sound wave propagation path. Next, the system sets the acoustic test frequency range to 500Hz to 8000Hz, and assigns 5 different frequency points (such as 650Hz, 1.2kHz, 2kHz, 4kHz, 6.5kHz) to each device for testing. Under the control of the signal scheduling mechanism, the system starts the sequential transmission process, and sequentially instructs each sound box to emit a single-frequency sinusoidal test audio signal with a duration of 200 milliseconds, while recording the MAC address, transmission timestamp and frequency value of the current sound box 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, and provides sufficient switching and receiving time for the receiving devices.
[0039] Step S14: controlling other sound box devices to enter a signal receiving mode based on the detection signal transmission record data, collecting acoustic signals from the transmitting devices, and performing amplitude detection and frequency identification processing to obtain signal response raw data containing signal strength values and arrival times;
[0040] The embodiment of the present application generates a probe signal emission record data according to S13, and automatically controls the remaining sound box devices to switch to a signal receiving mode during the emission of signals of each device. The receiving device collects sound waves in real time through a built-in microphone array, and the sampling frequency is set to 48 kHz to ensure effective coverage of different frequency points. Each receiving node performs digital filtering processing on the captured sound wave signals, extracts the main energy component corresponding to the target frequency, and calculates the signal amplitude (in dB) and the arrival time (time difference relative to the system clock). 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 emitting device, preventing misrecognition of non-target noise interference. The receiving result includes fields such as signal source device ID, receiving device ID, signal strength value, frequency recognition label, and arrival time stamp, and the system aggregates the receiving information of all devices to form signal response raw data, which is used for subsequent acoustic propagation parameter calculation and room modeling operations.
[0041] Step S15: Calculate the acoustic propagation loss coefficient and delay characteristics using the signal response raw 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 application uses the signal response raw data in step S14 to analyze the acoustic propagation loss coefficient and delay characteristics. The loss coefficient calculation process uses a relative energy attenuation model, that is, the received intensities of the same signal source device at different receiving nodes are compared, and the spatial distance between the devices is combined to inversely deduce 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 and the received signal intensity is -50 dB, and the distance between devices A and C is 4 meters and the received intensity is -60 dB, the system calculates that the signal attenuation is about 5 dB per additional 1 meter of propagation distance. The delay characteristic analysis is based on the difference between the signal arrival time stamp recorded by each receiving device and the corresponding emission time stamp, combined with the propagation speed of sound in air (about 343 meters / second) to calculate the propagation time error, and identify the propagation delay caused by reflection paths or obstacles. The system aggregates the above two types of acoustic parameters at multiple frequencies and all nodes to construct an acoustic parameter matrix reflecting the differences in sound wave propagation characteristics in different regions of the room. Then, the system jointly models based on the acoustic parameter matrix and the spatial coordinate mapping table, and uses spatial sound field inversion technology to establish a room acoustic environment model, which includes multiple data such as propagation path, boundary reflection area, sound absorption area, and frequency response area. Finally, the room acoustic propagation characteristic data including propagation loss, time delay characteristics, and acoustic impedance distribution are generated for subsequent room characteristic frequency extraction and device role determination.
[0043] Preferably, step S15 comprises the following steps:
[0044] Step S151: Calculate the acoustic propagation loss coefficient between each device position according to the signal intensity value in the signal response raw data;
[0045] The embodiment of the present application calculates the acoustic propagation loss between different sound box devices based on the signal intensity value in the signal response raw data obtained in step S14 and in combination with the device space coordinate mapping table generated in step S12. The acoustic propagation loss coefficient is a physical parameter reflecting the signal intensity decay rate with distance in the process of sound wave propagation in the air, and is specifically obtained 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 the present embodiment, 650Hz, 2kHz and 6.5kHz are taken as representative frequencies, and the propagation loss of each pair of devices at these frequencies is averaged to reduce the influence of frequency fluctuations on the loss. For example, if the original sound pressure of the 2kHz signal transmitted by device A is 90dB, the signal received by device B is 72dB, and the distance between them is 4 meters, the loss is 18dB, and the corresponding loss coefficient is 4.5dB 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: Analyze the propagation delay characteristics of sound waves on different paths using the signal arrival time difference in the signal response raw data;
[0047] The embodiment of the present application calculates the signal arrival time difference using the transmission and reception time stamps in the signal response raw data in step S14, thereby analyzing the propagation delay characteristics of sound waves on different paths. Delay characteristics are an index for measuring whether there is an abnormal shift in the propagation time of sound waves in space, mainly affected by factors such as propagation path, obstacle diffraction and material reflection and absorption. The system first calculates the propagation delay according to the difference between the transmission time stamp and the reception time stamp, and then compares the propagation delay with the theoretical delay corresponding to the spatial straight-line distance between the devices divided by the standard air sound speed (about 343 meters / 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 paths with a delay shift of more than 5 milliseconds as having a sound wave path shift, and establishes a path delay list to record the propagation delay data between each pair of devices at each frequency point, further providing data support for identifying possible geometric obstacles and high reflection areas in the room.
[0048] Step S153: Quantitatively evaluate the acoustic impedance distribution in the room based on the acoustic propagation loss coefficient and the propagation delay characteristics, and generate acoustic propagation parameter data;
[0049] The embodiment of the present application fuses and analyzes the propagation loss coefficient matrix obtained in step S151 and the delay characteristic list formed in step S152 to quantify the acoustic impedance distribution in the room. The acoustic impedance is a complex physical quantity reflecting the resistance of air or material to sound wave propagation, and is usually determined by the material density and sound speed, but in the embodiment, the propagation loss and the propagation delay are used as proxy characteristic parameters for calculation. Specifically, the system defines a "propagation impedance value" for each pair of devices on the propagation path, which is calculated by multiplying the attenuation amplitude per unit propagation distance by the propagation delay factor (i.e., the ratio of the propagation time delay to the theoretical value), and then combining the frequency weighting factor for frequency band correction. For example, if the unit loss of a certain path is 4 dB / m and the delay factor is 1.2 times, the impedance intensity will be marked as 4.8 units. The system performs grid mapping processing on the propagation impedance values of the multi-frequency paths between all devices to generate an impedance distribution map in two-dimensional space, forming acoustic propagation parameter data, which provides basic data for subsequent judgment of structural differences in the room and identification of acoustic characteristic changes.
[0050] Step S154: Analyzing the acoustic reflection and absorption characteristic differences of different positions in the room according to the acoustic propagation parameter data, and identifying the geometric structural features of the room using the acoustic characteristic differences;
[0051] The embodiment of the present application performs regional difference analysis on the reflection and absorption characteristics of different positions in the room based on the acoustic propagation parameter data generated in step S153, and further mines the room geometric structural features corresponding to the regions with significant changes in acoustic characteristics. First, the system regards the high impedance region (i.e., the region with impedance value higher than 1.5 times the average value) in the impedance distribution map as a reflection region where hard walls or large obstacles may exist, and regards the low impedance region (i.e., the region with impedance value lower than 0.6 times the average value) as a soft material region or a sound absorption body region. The system further analyzes the mutation points of the impedance gradient, i.e., the boundary positions where the impedance values of different regions mutate by more than 30%, to preliminarily judge that these positions may be wall boundaries, door and window edges, or furniture boundaries. Combined with the spatial position coordinates and the above impedance characteristic changes, the system automatically extracts the closed contour of the room geometric structure using the minimum boundary fitting algorithm, and fits the length-width ratio, symmetry, and internal partition structure of the room according to the boundary shape. Finally, each acoustic characteristic region is bound with the spatial region where it is located to form a spatial grid with geometric labels, preparing for establishing a refined sound field model.
[0052] Step S155: Establishing a room acoustic environment model based on the geometric structural features to obtain room acoustic propagation characteristic data containing propagation path attenuation rules and frequency response characteristics.
[0053] Based on the geometric feature data identified in step S154, the embodiment of the present application establishes a complete room acoustic environment model in combination with the acoustic propagation parameter data that has been constructed. The model takes a spatial grid as a basic unit, fuses the acoustic propagation loss value, propagation delay value, impedance distribution characteristics of each unit, and the geometric region label to which it belongs, thereby forming the propagation path attenuation law and frequency response characteristics of the whole space. The model internally defines a frequency response function for describing the attenuation trend and resonance characteristics of sound waves of different frequencies in different spatial regions, and establishes a sound field path library to record the main path, secondary reflection path, and possible diffraction path information. In the present embodiment, the system encodes the model in JSON format for subsequent identification of frequency point response intensity distribution, device acoustic type classification, and network role allocation. At the same time, the model has a self-learning mechanism, which can continuously adjust local acoustic parameters to adapt to environmental updates in subsequent dynamic environment change monitoring, thereby maintaining the accuracy and stability of the networking strategy.
[0054] Preferably, the comparison and analysis of the signal response intensity of different frequencies using the room acoustic propagation characteristics in step S2 includes:
[0055] According to the room acoustic propagation characteristic data, the signal response intensity value corresponding to each frequency point in the frequency range of 20Hz-20kHz is extracted;
[0056] The signal response intensity value is subjected to smoothing filter processing to obtain frequency response envelope sequence data;
[0057] The average value of the response intensity of each frequency point in the frequency response envelope sequence data is calculated, and the frequency point with a response intensity higher than 1.5 times the average value is identified as a response peak frequency;
[0058] The response intensity change gradient between adjacent frequency points in the frequency response envelope sequence data is calculated, and the frequency interval with a gradient change exceeding 30% is identified as a response turning frequency interval;
[0059] Based on the response peak frequency and the response turning frequency interval, a feature importance weight coefficient is calculated, and the frequency point with a weight coefficient greater than 0.6 is selected as a room characteristic frequency;
[0060] The distribution density and interval law of the room characteristic frequencies are counted, and the response intensity values corresponding to each characteristic frequency are recorded to generate room characteristic frequency distribution data.
[0061] 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 includes the receiving amplitude data of each receiving device at different frequency points during the process of transmitting the test signal by the sound box device. The system extracts the corresponding signal response intensity value in the audio range of 20Hz to 20kHz at a frequency interval of every 5Hz, 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 sound box devices at the frequency point, and the unit is dB SPL (sound pressure level). This operation realizes the construction of the basic energy distribution map of the room sound field from the frequency response dimension, and provides basic input data for subsequent frequency screening. In the step of smoothing filtering the signal response intensity value, the system uses the sliding window average algorithm to perform noise suppression and smoothing processing on the response intensity value sequence of the above 4000 frequency points. In specific implementation, the system sets the window size to 21 frequency points, that is, taking 10 points before and after, and calculates the average intensity of the current point in the window as its filtered value. This processing method can effectively suppress local outliers caused by instantaneous response peaks or test errors of some device positions, and retain the shape change trend of the overall frequency response curve. Finally, the system outputs a smooth and continuous frequency response envelope sequence data representing the acoustic energy distribution trend of the room in the entire audio range. In the step of calculating the average value of the response intensity of each frequency point in the frequency response envelope sequence data and identifying the frequency points with response intensity higher than 1.5 times the average value as the response peak frequency, the system first performs global statistics on the smoothed frequency response envelope sequence to calculate the average response intensity value of all frequency points. Assuming that the average value of the full frequency band is X dB SPL, the system marks all frequency points with intensity higher than 1.5X as “response peak frequency”. These frequency points usually correspond to the resonance frequency, structural resonance point or sound wave superposition enhancement position in the room. The system records the specific frequency value and the corresponding response intensity of each response peak frequency point for subsequent feature weight analysis and frequency screening. In the step of calculating the response intensity change gradient between adjacent frequency points in the frequency response envelope sequence and identifying the frequency interval with a change gradient exceeding 30% as the response turning frequency interval, the system traverses the entire frequency response envelope sequence to calculate the response intensity difference between any two adjacent frequency points and convert it into a change rate. For example, when a frequency point is 90dB and the next frequency point is 117dB, the change rate is 30%. The system takes 30% as the gradient mutation threshold, and takes all frequency points with a change rate greater than the threshold as “response turning points”, and extends 5 frequency points to the left and right to form a “response turning frequency interval”.These intervals are often found in the positions where there are reflected interference, sudden enhancement or weakening of sound energy in the room, reflecting the nonlinear change behavior of the sound field under the intervention of certain structures. In the step of calculating the feature importance weight coefficient based on the response peak frequency and the response turning interval and screening the frequency points with weight coefficient greater than 0.6 as the room feature frequency, the system introduces a multi-factor weighted evaluation mechanism. For a certain frequency point, the system gives different scoring weights according to whether it is a response peak frequency, whether it falls into the response turning interval, the multiple of its intensity value and the average value, and the distribution width of its response in multiple sound box devices. Then the weights are added and standardized to get the "feature importance weight coefficient" between 0 and 1. For example, if the frequency point 500Hz is the response peak frequency, in the turning interval, the intensity is 1.8 times the average value, and it appears in 80% of the sound box devices, its weight coefficient may reach 0.85. The system screens out the points with weight coefficient greater than 0.6 from all frequency points and defines them as "room feature frequencies" and records their positions in the frequency spectrum. In the step of statistically analyzing the distribution density and interval law of the room feature frequencies and recording the response intensity values corresponding to each feature frequency, the system statistically analyzes the room feature frequencies screened out in the previous step. First, the density of the feature frequency points in the entire 20Hz to 20kHz frequency range is calculated, that is, the number of feature frequencies per kilohertz range; then the average interval and the maximum and minimum interval between adjacent feature frequency points are calculated to determine whether the frequency distribution is uniform or there is a concentration area; in addition, the system records the response intensity, the number of corresponding devices and the spatial distribution uniformity of each feature frequency point to form a structured data record unit. Finally, the system generates a "room feature frequency distribution data", which is used as the core input data for subsequent device acoustic response analysis and role assignment in step S2.
[0062] Preferably, the step S2 of detecting the acoustic response amplitude difference of each sound box device at different feature frequencies according to the room feature frequency distribution data comprises:
[0063] extracting the main feature frequencies with weight coefficient higher than a preset threshold value from the room feature frequency distribution data, and generating a test frequency sequence based on the frequency values from low to high;
[0064] determining the signal emission turn and frequency allocation scheme of each sound box device based on the test frequency sequence, controlling each device to emit a single-frequency acoustic test signal at the specified feature frequency in turn; synchronously controlling other sound box devices to enter the receiving mode and measuring the amplitude value and signal quality parameter of the received signal to generate the receiving response data of each device at different feature frequencies;
[0065] According to the received response data, the numerical distribution range and standard deviation of the received signal amplitude values of each sound box device at the same characteristic frequency are calculated, and a significant amplitude difference frequency point is identified;
[0066] The received amplitude values of each sound box device at the significant amplitude difference frequency point are sorted and analyzed, and the number of strong response frequency points and the number of weak response frequency points of each device are counted;
[0067] Based on the number of strong response frequency points and the number of weak response frequency points of each device, the acoustic response characteristic coefficient of each device is calculated, and the devices are classified according to the acoustic sensitivity based on the acoustic response characteristic coefficient, and the acoustic response amplitude difference containing the acoustic type and response difference value of the device is generated.
[0068] The embodiment of the application calls the "room feature frequency distribution data" generated in the previous step, and filters the feature importance weight coefficient corresponding to each frequency point recorded therein. The weight coefficient is a numerical value that measures the representativeness of the frequency point in the acoustic structure, which comprehensively considers its response amplitude, change gradient, spatial consistency and other factors. The preset threshold set in this embodiment is 0.65, that is, only the frequency points with a weight coefficient not lower than 0.65 are retained as the main feature frequencies. After screening, the system sorts the frequency values from low to high and outputs a test frequency sequence containing several representative frequency points (such as 42Hz, 375Hz, 1080Hz, 4200Hz, 11600Hz, etc.), providing a basis for subsequent frequency-by-frequency response comparison tests. The acoustic test task is constructed in a round broadcast mode. Each frequency point in the test frequency sequence corresponds to a round, and in each round, each device is arranged to emit a test signal at the frequency, and other devices are in a passive receiving state. To avoid signal interference, the system controls the timing of the emission task within each round to be offset, ensuring that only one device is in the emission state at the same time. The test signal emitted by each device is a 0.5-second sine single-frequency sound with an amplitude of 85dB SPL, and the duration and interval are dynamically set by the Internet of Things central coordination control module. The receiving device collects the amplitude value (dB SPL) and signal quality parameters such as signal-to-noise ratio (SNR) and waveform stability index of the acoustic signal in each round, and arranges them into structured "receiving response data" according to the device identifier, frequency point and timestamp for subsequent statistical analysis. For each frequency point in the test frequency sequence, the amplitude values recorded by all receiving devices are counted, and the minimum value, maximum value, average value and standard deviation are calculated. If the difference between the maximum and minimum values of the receiving amplitude of a certain frequency point exceeds 10dB, or the standard deviation exceeds 4dB, then that frequency point is identified as a "significant amplitude difference frequency point". These frequency points usually reflect the existence of significant response unevenness among devices in the sound field, which may be caused by factors such as standing wave enhancement and device position structure reflection difference. The system uses these amplitude difference significant frequency points as the key frequency basis for further analyzing the acoustic capability difference of the devices. For each frequency point marked as "amplitude difference significant", the amplitude values of each receiving device are sorted, and the top 20% of the devices recording the response amplitude are selected as the "strong response devices" for that frequency point, and the bottom 20% are selected as the "weak response devices". Then, the system counts each device and accumulates the number of frequency points marked as "strong response devices" and "weak response devices", obtaining two indicators: "strong response frequency point number" and "weak response frequency point number". These indicators reflect the relative acoustic receiving advantages and disadvantages of the devices in the sound field.In the process of classifying the acoustic sensitivity of the device according to the acoustic response characteristic coefficient and generating the acoustic response amplitude difference data containing the acoustic type of the device and the response difference value, the system introduces the acoustic response characteristic coefficient as a quantitative index of the comprehensive response capability of the device in the current acoustic environment. The coefficient is standardized to 0-1 by taking the ratio of the number of strong response frequency points to the number of weak response frequency points, and is modified by combining the correction factor of the position of the reflection structure in the space where the device is located. For example, a certain device shows strong response 5 times and weak response 1 time in 10 difference frequency points, and the original ratio is 5:1, and the standardized coefficient is about 0.83. The system classifies the device into three categories of "high sensitivity type" (coefficient > 0.75), "neutral type" (0.45-0.75) and "low sensitivity type" (<0.45) according to the coefficient size, and records the classification results together with the amplitude response difference data of each device at all frequency points to generate the acoustic response amplitude difference data, which will be an important reference basis for subsequent role allocation and connection optimization of Bluetooth speakers in the network.
[0069] Preferably, the step S2 of judging the position type characteristics of each device in the room sound field based on the acoustic response amplitude difference and performing the device role allocation based on the response amplitude includes:
[0070] According to the acoustic response characteristic coefficient of each device in the acoustic response amplitude difference, the relative difference value of the characteristic coefficient between devices is calculated, and the acoustic response capability of the devices is sorted based on the difference value to obtain an acoustic response capability sequence;
[0071] Based on the acoustic response capability sequence, the top 30% of the devices are marked as strong response position types in the sound field, the bottom 30% of the devices are marked as weak response position types in the sound field, and the middle 40% of the devices are marked as medium response position types in the sound field to obtain a sound field position type classification result;
[0072] According to the sound field position type classification result and the response difference value in the acoustic response amplitude difference data, a comprehensive sound field adaptability score of each device is calculated;
[0073] According to the comprehensive sound field adaptability score, a preliminary allocation of the device roles is performed, the device with the highest score in the strong response position type of the sound field is allocated as the master role, the device in the weak response position type of the sound field is allocated as the listener role, and the device in the medium response position type of the sound field is allocated as the relay role to obtain a preliminary allocation result of the device roles;
[0074] Based on the preliminary allocation result of the device roles, a weight coefficient of each role is allocated to generate device role allocation data containing the device identifier, the position type characteristics, the role type and the weight coefficient.
[0075] The embodiment of the application reads the acoustic response characteristic coefficient of each sound box device, which reflects the receiving intensity and consistency characteristics of the device at multiple frequency points. Then, the system forms a symmetric difference matrix by normalizing the difference between the characteristic coefficients of any two devices, and calculates the "average relative difference" of each device based on this, which represents that the larger the value, the more prominent or weaker the device is in acoustic response ability. Subsequently, the system arranges all devices in descending order of average relative difference to form an "acoustic response ability sequence", which reflects the relative response advantage level of the device in the current room sound field. Based on the acoustic response ability sequence, the position type is divided according to the percentage segmentation method. Taking a typical room containing 10 devices as an example, the top 3 devices are marked as "strong response position type", which are usually located in the main reflection path or the standing wave enhanced area of the sound field; the last 3 devices are marked as "weak response position type", which are usually located in the corner or the low-efficiency propagation area blocked by furniture; the middle 4 devices are classified as "medium response position type". The system associates the classification result with the spatial coordinates of each device to verify the physical consistency of the classification, and finally outputs the "sound field position type classification result" containing the position label of each device. The response consistency, maximum and minimum response difference, average signal quality of the device at different frequency points are used as the basis for scoring, and a weighted correction factor of the position type is introduced. For example, if the device in the strong response position has smaller response fluctuation in the high frequency area and stable SNR in the low frequency band, the score will be higher; while the device in the weak response position has excellent mid-frequency response compensation ability, it can also get a medium score. The system standardizes multiple scoring factors to the range of 0-1, and sets the weighted proportion (such as frequency band consistency 0.4, average response intensity 0.3, fluctuation range 0.2, and position information correction 0.1), and calculates the final "comprehensive sound field adaptability score" by weighted summation. The system sets a set of role allocation rules: the device with the highest comprehensive score among all devices and belonging to the strong response position type is set as the "main control role", which is responsible for network broadcasting, rhythm synchronization and streaming audio decoding distribution; the "medium response position" device with medium score but uniform spatial coverage is allocated as the "relay role", which undertakes signal forwarding and clock synchronization tasks in network communication; and the device with lower score and in the weak response area is set as the "listening role", which is mainly used for sound field edge compensation, feedback collection or delay listening. The system finally outputs the "device role preliminary allocation result" containing the device number and role type. According to the role type, different levels of weight coefficients are allocated to the devices, which are used for subsequent communication topology construction and network resource allocation.The master role is assigned a highest weight coefficient (e.g., 1.0) by default, representing the highest scheduling priority and control right in the Bluetooth mesh network; the relay role is assigned a medium weight coefficient (e.g., 0.6-0.8), allowing it to dynamically participate in path selection according to the link condition; the listening role is assigned the lowest weight coefficient (e.g., 0.3-0.4), reducing its network load but retaining the receiving and feedback capability. At the same time, the system records the role type, spatial position classification, comprehensive score and weight of each device, generates structured "device role allocation data", which will be used for subsequent construction of Bluetooth self-organizing network topology, control of power allocation and frequency band reuse, etc.
[0076] Preferably, step S3 comprises 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 layer of the network, the relay role device is set as the second layer of the network, and the listening role device is set as the third layer of the network, to establish a hierarchical network structure framework;
[0078] The embodiment of the application receives the device role allocation data generated in the previous stage, which contains the device identification, position characteristics, role type (master, relay, and listening) and weight coefficient of each sound box. The system groups according to the role type, the master role as the first layer, used for initiating communication and control signal; the relay role as the second layer, constituting the data forwarding path in the middle of the network; the listening role as the third layer, at the edge of the network, used for receiving and feeding back the audio signal. The system forms a set of logical hierarchical structure table on this basis, and constructs a virtual three-layer network topology framework in combination with the physical position coordinates of the devices, to provide a structural basis for subsequent communication path optimization and resource allocation.
[0079] Step S32: Determine the connection priority relationship between devices in each layer based on the hierarchical network structure framework and the position type characteristics in the device role allocation data, to generate a connection priority matrix between devices;
[0080] The embodiment of the application extracts three-layer device groups from the hierarchical network structure, and evaluates the connection weight in combination with the labels (e.g., strong response, medium response, and weak response) of the devices in the "sound field position type classification result". The determination of priority considers the level difference, physical distance, historical communication quality and role type of the device, for example, the connection from the first layer to the second layer is prior to the connection from the second layer to the third layer, and the connection priority between devices in the same layer is lower. In each pair of devices, the system calculates the connection priority value (between 0 and 1) according to the above factors, and constructs a symmetric two-dimensional "connection priority matrix", which is used to guide the subsequent network link selection and redundant path design.
[0081] Step S33: Calculate the connection load bearing capacity of each device according to the inter-device connection priority matrix and the weight coefficient in the device role assignment data, and set the device with high bearing capacity as the connection center node;
[0082] In the embodiment of the application, the potential connection number and the sum of connection weights of each device are accumulated and analyzed based on the connection priority matrix, and the weight coefficient in the role assignment data is also considered. For a device with a high weight coefficient, many connection relationships and a high priority value, the system gives it a higher "connection load bearing capacity score". For example, a sound box in a relay role, which maintains a high-priority connection relationship with many devices and responds stably, will be determined to have high bearing capacity. Finally, the system sorts the bearing capacity of all devices and selects the devices with high scores as "connection center nodes" for the core relay nodes of the main path, and also retains some sub-optimal nodes in the edge area to build backup connections.
[0083] Step S34: Plan the shortest connection path and backup connection path between each device based on the connection center node and the inter-device connection priority matrix, and generate transmission path optimization data including the main path and backup path;
[0084] In the embodiment of the application, the improved Dijkstra algorithm or the heuristic search method based on priority weighted graph is used to plan the main path for the entire three-layer network structure according to the edge weight set by the connection priority matrix. The system first takes the master device as the starting point to find a low-hop, high-quality main path covering all devices, and then selects several sub-optimal but stable paths from the main path to build backup connections for each key relay node. Finally, each device has at least one main connection and one backup connection, and the transmission path optimization data is output in table form, including device number, upstream node, downstream node, path type (main / backup) and path quality score.
[0085] Step S35: Distribute the communication frequency band and power parameters of each device according to the transmission path optimization data, and generate network configuration parameter data.
[0086] The embodiment of the application identifies the upstream and downstream communication relationship of each device from the path optimization data, and allocates a communication frequency band to each device according to the link density and role priority, to ensure that adjacent communication does not interfere. In terms of power allocation, the master role is configured with higher transmission power (such as 8-12 dBm) because it undertakes the broadcast function; the relay role is adapted to medium power (such as 4-8 dBm) according to the number of nodes it carries and the path quality; and the listening role adopts minimum power (such as 0-2 dBm) to save energy and avoid interference. The system completes frequency band division and power mapping according to 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 in the sound box networking process. The parameter data will continue to play a role in network deployment and later dynamic adjustment.
[0087] Especially important is that step S34 comprises the following steps:
[0088] Step S341: determining the path planning range with the connection center node as the starting point based on the connection priority matrix between the connection center node and the device, and establishing a node list for path search;
[0089] The embodiment of the application reads the plurality of connection center nodes and their device identifiers identified in step S33, and then extracts the connection relationship and priority value between each center node and other nodes from the connection priority matrix. A connection depth limit parameter (for example, a maximum of 3 hops) is set to limit the search range, to prevent excessive length of the path from causing excessive delay or serious signal attenuation. Within the 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. The list will be used as a search space in the subsequent path sorting and screening to avoid invalid connections being included in the path optimization calculation process.
[0090] Step S342: performing connection sorting on the devices in the node list based on the priority from high to low on the priority value in the connection priority matrix, to generate a device connection sequence list;
[0091] The embodiment of the application takes each connection center node as a starting point, extracts the value of each pair of device combination in the path planning candidate device list in the priority matrix, and sorts them from high to low according to the connection priority. During the sorting process, the system preferentially retains the high-optim connection from the master to the relay device, and limits the listening device to only participate in the terminal connection, and does not serve as a forwarding node. For the connection pairs with the same priority value, the system performs secondary sorting by referring to the weight coefficient in the last stage. After the sorting is completed, the system generates a "device connection sequence list" for each center node, records the connection target device number, connection priority value, expected connection direction and network level, which serves as the basis for subsequent calculation of hop count and screening of the main path.
[0092] Step S343: Calculate the hop count and connection distance between devices according to the device connection sequence list and the hierarchical network structure framework, and identify the path with the least connection count as the candidate main connection path;
[0093] The embodiment of the application extracts the possible connection paths from the device connection sequence list one by one, constructs a directed graph structure in each path according to 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 uses an improved breadth-first search (BFS) algorithm to find all feasible paths from the center node to the network edge device (listening device) without exceeding the maximum hop limit, and calculates the total hop count, physical distance and level span of each path. Finally, the system selects the path with the least hop count, complete path structure and covering the target node as the "candidate main connection path", and records the start point, end point, relay device, total hop count 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 main connection path and the connection priority matrix between devices, and select the final main connection path;
[0095] The embodiment of the application evaluates each hop connection in the candidate main connection path, judges the connection packet loss rate, response delay and power consumption in the historical communication record. 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 unstable connection, and the whole path will be eliminated. For the remaining paths, the system uses a scoring method to comprehensively evaluate each index, such as hop count, average value of priority, maximum delay, communication success rate, etc. After 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: According to the connection relationship of the final main connection path, an alternative connection scheme bypassing the key nodes of the main path is identified, and a backup connection path with the same starting point and endpoint is established;
[0097] The embodiment of the application analyzes the dependent nodes of all connection hops in the final main connection path, and pays special attention to path bottleneck points such as central relay nodes. The key nodes are temporarily removed in the path graph, and the path search algorithm (such as A* or DFS) is re-run to find an alternative path that can avoid these bottlenecks while keeping the starting point and endpoint consistent. The system compares the hop count and average connection priority value of the backup path to ensure its basic availability when the main path fails, and is not a random path redundancy. If no path can bypass all key nodes, it is allowed to contain some overlapping nodes, but it must be ensured that there are independent segments 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 offline, or the environment changes.
[0098] Step S346: Based on the connection information of the final main connection path and the backup connection path, the device node sequence, the connection hop count and the path identifier of each path are recorded, and the transmission path optimization data containing the main path configuration and the backup path configuration is generated.
[0099] The embodiment of the application integrates two kinds of path information, numbers and labels the main path and the backup path respectively, and establishes a "path configuration table". The table contains path number, path type (main or backup), starting device ID, ending device ID, intermediate node sequence, total hop count, average connection priority, path identifier code (used for routing), etc. The system also records the communication frequency band and the preset transmission power parameters of each hop in each path to provide support for subsequent dynamic frequency scheduling. The finally generated "transmission path optimization data" will be stored in the gateway device or the control center in the JSON structure, which is used for automatic routing scheduling, link maintenance and reconstruction trigger judgment of the Bluetooth speaker network, and supports stable operation and flexible expansion of the entire Internet of Things speaker system.
[0100] Especially important is that step S344 specifically takes the standard deviation of the weight coefficients of each device in the candidate main connection path as a stability indicator, and marks the path as a stable path if the standard deviation is less than 0.2. Check whether the role type connection in the connection priority matrix meets the preset hierarchical connection rule of the hierarchical network structure framework as an availability indicator, and mark the path as an available path if it meets the hierarchical rule. The path that meets both stability and availability conditions and has the least connection steps is selected as the final main connection path.
[0101] The embodiment of the present application extracts the list of devices participating in the connection of the candidate main connection path, and then calls the weight coefficient value assigned to each device in step S35, which represents the comprehensive performance indicators of the device in the network structure, such as data processing capability, response speed, connection strength, and load balancing capability. The system uses statistical analysis method to calculate the standard deviation value of these weight coefficients as a set of samples. The smaller the standard deviation of the weight coefficients of the devices on a path, the more consistent the device capabilities in the path, and the higher the overall network transmission stability, which is less likely to cause performance bottlenecks or link interruption problems due to a weak node. For example, if the weight coefficients of the devices on a 5-hop path are [0.72, 0.75, 0.77, 0.76, 0.73], the standard deviation is only 0.018, which is much smaller than the stability threshold of 0.2 set by the system, and the path is marked as a “stable path” for subsequent availability verification and final path screening. In the device sequence of each candidate main path, the role type of the device is identified, i.e., the master role, the relay role, and the listening role. According to the hierarchical network structure framework constructed in step S31, the system presets that the master device should only connect to the relay device, the relay device can connect to other relay or listening devices, and the listening device should not participate in data forwarding as an upstream node. The system traverses all the connection relationships in the candidate path and queries the role type in the device role allocation data one by one. If any hop violates the hierarchical connection rule (such as a listening device connecting to a master device, or a listening device being connected by other devices as a relay node), the path is considered as “role mismatch” and does not meet the availability requirement; otherwise, the path is marked as “available path”. For example, if a path contains a structure of connecting listening device → relay device → master device, the path is determined to violate the hierarchical rule and is not available. The intersection of the paths marked as “stable path” and “available path” in the previous step is screened to extract the path that meets the reasonable distribution of device weight, balanced performance, and correct network structure specification and connection logic. The system sorts these paths that meet the conditions according to the number of hops from small to large, and selects the path with the least number of hops as the final main connection path to maximize network communication efficiency, minimize time delay, and minimize energy consumption. For example, if three candidate paths all meet the stability and availability conditions, but the number of hops is 3, 4, and 5 respectively, the path with 3 hops is selected as the “final main connection path”, and its path number, start and end device ID, 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. The path will also be used as the reference path for dynamic route switching, and will be reconstructed preferentially when the environmental state changes.
[0102] Preferably, step S35 comprises the following steps:
[0103] Step S351: According to the master path and standby path information in the transmission path optimization data, the connection quantity and path length distribution of each device are counted, so as to calculate the communication load index of each device;
[0104] The embodiment of the present application reads the device node sequence of each master connection path and standby connection path recorded in the transmission path optimization data, and then counts the number of times each sound box device appears in these paths as the basic index of the connection quantity. At the same time, the system extracts the hop count of each path as the path length, and performs weighted average on all path lengths participated by each device to reflect the complexity of the relay task undertaken by the device in the network. After standardizing the device connection quantity and the average path length, the communication load index of each device is obtained by multiplication. The higher the communication load index, the heavier the task of network communication relay, data forwarding and the like undertaken by the device. For example, if a relay device participates in 3 paths and the average hop count is 4, the communication load index of the relay device will be significantly higher than that of a listening device participating in only one short path.
[0105] Step S352: Based on the communication load index of each device and the weight coefficient in the device role allocation data, the Bluetooth communication frequency band is allocated to the device in the order from high to low according to the communication load index, and the frequency band allocation data is obtained;
[0106] The embodiment of the present application takes the communication load index as the priority basis, and combines the weight coefficient of each device recorded in the device role allocation data to perform the frequency band allocation operation. The specific method is: after sorting all devices in the order 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, so as to avoid interference caused by overlapping of frequency bands of high-load devices. For example, for a device supporting BLE 5.0 protocol, the selected physical channels are three advertising channels 37, 38 and 39 and a plurality of data channels. The system preferentially allocates the main data channel with the smallest interference to the master control or relay device with high communication load index, and leaves the remaining frequency bands to the listening device. Finally, the frequency band allocation data is generated, which contains the unique identifier of each device and the working frequency band number allocated to it.
[0107] Step S353: According to the distance parameters of each connection path in the transmission path optimization data and the connection priority matrix between devices, the minimum transmission power and the maximum transmission power range required by each device are calculated;
[0108] The embodiment of the present application estimates the minimum transmission power required for each device to complete stable communication according to the path distance information contained in the transmission path and the connection strength in the connection priority matrix between devices. In order to prevent connection failure caused by signal attenuation, the system also evaluates the longest communication distance in the path and the noise interference condition to determine the maximum transmission power upper limit of each device. The minimum and maximum values together form 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 2 Mbps is 1.2 mW, and in order to maintain the connection in the network high load or channel interference scenario, the maximum transmission power can be increased to 6.3 mW, forming a adjustable power range of 1.2-6.3 mW.
[0109] Step S354: Power level setting based on frequency band allocation data, minimum transmission power and maximum transmission power range combined with role type in device role allocation data, to obtain power level setting data, wherein the power level setting is specifically setting a high power level for the master role device, setting a low power level for the listening role device, and setting a medium power level for the relay role device;
[0110] The embodiment of the present application combines frequency band allocation data, power range and device role to set power level. Among them, the master device needs to continuously issue control data to the network, so it is set to a high power level (transmission power close to the maximum value), such as 5.5-6.3 mW; the relay device needs to undertake the tasks of receiving and forwarding at the same time, and the power level is set to medium (such as 3.2-5.0 mW); the listening device is mainly responsible for local data acquisition and downlink reception, and is set to a low power level (such as 1.2-2.8 mW) to reduce interference and save energy. The setting process is automatically completed by the control system and does not depend on manual intervention. In the finally output power level setting data, the role of each device, its allowed power adjustment range and target setting value are recorded.
[0111] Step S355: generating network configuration parameter data containing device identification, allocated frequency band, power parameter and connection configuration according to frequency band allocation data and power level setting data.
[0112] The embodiment of the present application fuses frequency band allocation data and power level setting data, integrates device identification, physical layer configuration (communication frequency band), link layer parameter (power level), logical connection information (connection relationship with upstream and downstream nodes), and generates complete network configuration parameter data. The data is issued to each Bluetooth speaker device in a standard JSON structure or a binary format recognizable by the device, as a parameter basis for initialization networking and dynamic adjustment during operation, so as to complete the low-layer communication configuration of the Bluetooth speaker Internet of Things system and ensure the stability and expansibility 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 environment monitoring and adaptive reconstruction.
[0113] Preferably, step S4 comprises the following steps:
[0114] Step S41: starting the environment monitoring mode of each speaker device according to the network configuration parameter data, setting the monitoring period as a preset time interval, and establishing a real-time monitoring task scheduling table;
[0115] The embodiment of the present application sends a start instruction to each Bluetooth speaker device according to the generated network configuration parameter data, controls it to enter the environment monitoring mode, and sets a unified acoustic sampling period at the device end, for example, monitoring once every 10 minutes. The system registers the monitoring task information of each device into the scheduling table, and the content of the scheduling table includes device identification, sampling frequency, next monitoring time stamp and task state marker, which is used to coordinate the monitoring actions of all devices to avoid conflicts. For example, in a medium-sized room containing 8 devices, the system adopts a hierarchical scheduling mechanism, and each layer of devices executes the detection task in turn with a time interval of 15 seconds, so as to ensure that the acoustic signals do not interfere with each other, and at the same time, reduce the influence on the normal playing task of the sound.
[0116] Step S42: controlling each speaker device to periodically emit an acoustic detection signal based on the real-time monitoring task scheduling table and the preset time interval, collecting current room acoustic response data, and generating real-time room acoustic data;
[0117] The embodiment of the present application controls each device to periodically execute the acoustic detection operation at a preset time interval according to the above-mentioned task scheduling table, and the detection signal adopts a unified standard single frequency or sweep frequency signal, the frequency range is 20Hz to 20kHz, and different signal intensities are selected according to the role type for emission. For example, the relay device emits a medium intensity (80dB SPL), and the master device emits a high intensity (95dB SPL). In each round of detection process, the remaining devices enter the listening mode and collect acoustic signals in real time, measure the signal intensity, delay and frequency response through the microphone array, the system summarizes the collection data of each device, and generates a real-time room acoustic data file containing device identification, time stamp, collection frequency point and response intensity.
[0118] Step S43: Extract the current room characteristic frequency distribution according to the real-time room acoustic data, and compare it with the room characteristic frequency distribution data to calculate the frequency offset and response intensity change of each characteristic frequency point;
[0119] The embodiment of the present application 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 is originally 2.4 kHz and is currently measured as 2.6 kHz, the offset is +200 Hz; if the response intensity changes from -45 dB to -35 dB, the change is +10 dB. 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 value of the characteristic frequency change based on the frequency offset and response intensity change of each characteristic frequency point to generate an environmental state change amplitude;
[0121] The embodiment of the present application uses the characteristic frequency difference matrix obtained in the previous step for statistical analysis. First, the square difference mean of the offset of all frequency points is calculated and the square root is taken to obtain the standard deviation of the frequency offset; second, the absolute value of all response intensity changes is calculated and the average is taken to obtain the average deviation value. The two indicators together constitute the basis for measuring the environmental state change amplitude, which is used by the system as the monitoring result of the environmental dynamic change trend. For example, after a new furniture is placed in a place, the intensity of the low-frequency response increases significantly, the average deviation value reaches 12 dB, and the standard deviation is 0.32, indicating that the environmental acoustic propagation characteristics have changed significantly.
[0122] Step S45: Numerically compare the average deviation value of the environmental state change amplitude with the preset change threshold value, and trigger a network reconstruction signal when the average deviation value exceeds the preset threshold value to generate a network adjustment instruction data;
[0123] The embodiment of the present application compares the average deviation value obtained in step S44 with the preset change threshold value. For example, if the system preset threshold value is 8 dB and the current average deviation value is 12 dB, the threshold value is exceeded, and the system immediately generates network adjustment instruction data. The instruction data includes the trigger time, the trigger device, the change type (offset / intensity / joint) and the adjustment level to be executed. The adjustment instruction will be broadcast by the master control device to the entire network to inform each device to prepare to execute the network reconstruction operation to adapt to the acoustic distribution changes of the new environment.
[0124] Step S46: based on the network adjustment instruction data, a network reconstruction process is performed, the current network configuration parameter data is saved as a historical configuration backup, and steps S1 to S3 are re-executed to realize dynamic adaptive adjustment of the network based on environmental changes.
[0125] In response to the network adjustment instruction, the embodiment of the application starts to execute the network reconstruction process. First, the network configuration parameter data currently in use is packaged and saved as a historical backup as a whole, and the trigger cause and timestamp of this change are recorded to form a network reconstruction log. Subsequently, the system re-enters the processes of device scanning, spatial positioning, acoustic detection, etc., that is, steps S1 to S3 are re-executed to update the spatial distribution of devices, the characteristics of the sound field, and the role allocation, and finally new network structure and connection configuration parameters are generated, so that the entire Bluetooth speaker Internet of Things networking system has dynamic adaptive capability, adapts to the changing indoor layout or environmental noise conditions, and maintains stable and efficient communication and audio synchronization capability.
[0126] The application further provides a Bluetooth speaker networking system based on Internet of Things, which is used to execute the Bluetooth speaker networking method based on Internet of Things described above, and comprises:
[0127] An acoustic perception module is configured to acquire speaker device spatial position distribution data, control each device to emit acoustic detection signals of a preset frequency in turn according to the speaker device spatial position distribution data, and evaluate room acoustic propagation characteristics based on signal response strength;
[0128] A role allocation module is configured to compare and analyze signal response strengths of different frequencies by using the room acoustic propagation characteristics, identify room characteristic frequency distribution data, detect acoustic response amplitude differences of each speaker device at different characteristic frequencies according to the room characteristic frequency distribution data, judge the position type characteristics of each device in the room sound field based on the acoustic response amplitude differences, and perform device role allocation based on the response amplitude to obtain device role allocation data.
[0129] A network construction module is configured to construct a hierarchical Bluetooth connection topology according to the device role allocation data, optimize data transmission paths among the devices to obtain transmission path optimization data, allocate communication frequency bands and power parameters of each device according to the transmission path optimization data, and generate network configuration parameter data.
[0130] An adaptive adjustment module is configured to continuously monitor real-time changes of the room characteristic frequencies based on the network configuration parameter data, judge the environmental state change amplitude based on the characteristic frequency change degree, and re-execute steps S1 to S3 to realize dynamic adaptive adjustment of the network when the environmental state change amplitude exceeds a preset threshold.
[0131] Therefore, the embodiments should be regarded, at any point, as being exemplary and not limiting, the scope of the application being defined by the appended claims and not by the above description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.
[0132] The foregoing is considered as illustrative only of the principles of the application. Numerous modifications and changes will readily occur to those skilled in the art, and the generic principles defined herein can be applied to other embodiments without departing from the spirit or scope of the application. Therefore, the application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A Bluetooth speaker networking method based on Internet of Things, characterized in that, Comprise the following steps: Step S1: Obtain the sound box device space position distribution data; control each device to emit acoustic detection signals of a predetermined frequency in turn according to the sound box device space position distribution data, and evaluate the room acoustic propagation characteristics based on the signal response strength, including calculating the acoustic propagation loss coefficient and delay characteristics using the signal response raw data, and establishing a room acoustic environment model based on acoustic parameter analysis to obtain room acoustic propagation characteristic data; Step S2: Compare and analyze the signal response strength of different frequencies using the room acoustic propagation characteristic data, identify the room characteristic frequency distribution data, including calculating the average value of the response strength of each frequency point in the frequency response envelope sequence data, identifying the frequency points with response strength more than 1.5 times the average value as response peak frequencies; calculate the response strength change gradient between adjacent frequency points in the frequency response envelope sequence data, and identify the frequency interval with gradient change exceeding 30% as the response turning frequency interval; calculate the feature importance weight coefficient based on the response peak frequency and the response turning frequency interval, and select the frequency points with feature importance weight coefficient greater than 0.6 as the room characteristic frequencies; statistic the distribution density and interval law of the room characteristic frequencies, and record the response strength values corresponding to each characteristic frequency, to generate the room characteristic frequency distribution data; detect the acoustic response amplitude difference of each sound box device at different characteristic frequencies according to the room characteristic frequency distribution data; determine the position type characteristics of each device in the room sound field based on the acoustic response amplitude difference, and perform device role assignment based on the response amplitude to obtain device role assignment data, including calculating the comprehensive sound field adaptability score of each device according to the sound field position type classification result and the response difference value in the acoustic response amplitude difference data; According to the comprehensive sound field adaptability score, the device role is preliminarily assigned, the device with the strongest response position type in the sound field and the highest score is assigned as the main control role, the device with the weakest response position type in the sound field is assigned as the monitoring role, and the device with the medium response position type in the sound field is assigned as the relay role, to obtain the device role preliminary assignment result; assign the weight coefficient of each role based on the device role preliminary assignment result, to generate the device role assignment data containing device identifier, position type characteristics, role type and weight coefficient; Step S3: According to the role type and weight coefficient in the device role assignment data, set the main control role device as the first layer of the network, the relay role device as the second layer of the network, and the monitoring role device as the third layer of the network, establish a hierarchical network structure framework, and optimize the data transmission path between devices to obtain transmission path optimization data; assign the communication frequency band and power parameters of each device according to the transmission path optimization data, to generate network configuration parameter data; Step S4: Continuously monitor the real-time change of the room characteristic frequency based on the network configuration parameter data, and judge the environmental state change amplitude based on the characteristic frequency change degree; when the environmental state change amplitude exceeds the preset threshold, re-execute steps S1 to S3 to realize dynamic self-adaptive adjustment of the network. 2.The Internet of Things based Bluetooth speaker networking method according to claim 1, characterized in that, Step S1 further comprises the following steps: Step S11: Scan the Bluetooth speaker device network to obtain the speaker device identification information connectable in the current environment; Step S12: Calculate the relative distance relationship between devices according to the change law of the Bluetooth signal strength monitored by the speaker device identification information, and construct a device space coordinate mapping table based on the relative distance relationship between devices to obtain the speaker device space position distribution data; Step S13: Determine the transmission order and frequency range parameters of the acoustic detection signal according to the speaker device space position distribution data, control each speaker device to output a single-frequency test audio signal in a preset frequency range in turn 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 a signal receiving mode, collect acoustic signals from the transmitting devices, and perform amplitude detection and frequency identification processing to obtain signal response raw data containing signal strength values and arrival times. 3.The Internet-of-Things based Bluetooth speaker networking method according to claim 2, characterized in that, In step S1, the acoustic propagation loss coefficient and delay characteristics are calculated using the signal response raw data, and a room acoustic environment model is established based on acoustic parameter analysis, including: Calculate the acoustic propagation loss coefficient between each device position according to the signal strength values in the signal response raw data; Analyze the propagation delay characteristics of sound waves on different paths using the signal arrival time difference values in the signal response raw data; Quantitatively evaluate 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; Analyze the differences in acoustic reflection and absorption characteristics at different positions in the room based on the acoustic propagation parameter data, and identify the geometric structure features of the room using the acoustic characteristic differences; Based on the geometric structure features, a room acoustic environment model is established to obtain room acoustic propagation feature data containing propagation path attenuation rules and frequency response characteristics.
4. The Internet of Things based Bluetooth speaker networking method according to claim 3, characterized in that, In step S2, the signal response strength at different frequencies is compared and analyzed using the room acoustic propagation features to identify room characteristic frequency distribution data, which also includes: Extract the signal response strength values corresponding to each frequency point in the 20Hz-20kHz frequency range from the room acoustic propagation feature data; Smooth the signal response strength values to obtain frequency response envelope sequence data. 5.The Internet-of-Things based Bluetooth speaker networking method according to claim 4, characterized in that, In step S2, the acoustic response amplitude difference of each speaker device at different characteristic frequencies is detected based on the room characteristic frequency distribution data, which includes: Extract the main characteristic frequencies with importance weight coefficients higher than the preset threshold from the room characteristic frequency distribution data, and generate a test frequency sequence based on the frequency values from low to high; Determine the signal transmission round and frequency allocation scheme of each speaker device based on the test frequency sequence, control each device to transmit a single-frequency acoustic test signal at the specified characteristic frequency in turn, and generate receiving response data of each device at different characteristic frequencies by synchronously controlling other speaker devices to enter receiving mode and measuring the amplitude values and signal quality parameters of the received signals; Calculate the numerical distribution range and standard deviation of the received signal amplitude values of each speaker device at the same characteristic frequency based on the receiving response data, and identify the amplitude difference significant frequency points. Sort and analyze the receiving amplitude values of each sound box device at the amplitude difference significant frequency points, and count the number of strong response frequency points and weak response frequency points of each device; Calculate the acoustic response characteristic coefficients of each device based on the number of strong response frequency points and weak response frequency points of each device, and classify the devices according to the acoustic response characteristic coefficients to generate acoustic response amplitude difference data containing the acoustic type and response difference value of the device. 6.The Internet-of-Things based Bluetooth speaker networking method according to claim 5, characterized in that, The step S2 of determining the position type characteristics of each device in the room sound field based on the acoustic response amplitude difference and performing device role allocation based on the response amplitude further includes: Calculate the relative difference value of the characteristic coefficients between devices based on the acoustic response characteristic coefficients of each device in the acoustic response amplitude difference, and sort the acoustic response capabilities of the devices based on the difference value to obtain an acoustic response capability sequence; Based on the acoustic response capability sequence, mark the top 30% of the devices as strong response position types in the sound field, mark the bottom 30% of the devices as weak response position types in the sound field, and mark the middle 40% of the devices as medium response position types in the sound field to obtain a sound field position type classification result. 7.The Internet-of-Things based Bluetooth speaker networking method according to claim 6, characterized in that, Step S3 further includes the following steps: Step S31: Determine the connection priority relationship between devices in each layer based on the hierarchical network structure framework and the position type characteristics in the device role allocation data, and generate a device interconnection priority matrix; Step S32: Calculate the connection load bearing capacity of each device based on the device interconnection priority matrix and the weight coefficient in the device role allocation data, and set the devices with high bearing capacity as connection center nodes; Step S33: Plan the shortest connection path and backup connection path between devices based on the connection center nodes and the device interconnection priority matrix, and generate transmission path optimization data containing the main path and backup path; Step S34: Distribute the communication frequency band and power parameters of each device according to the transmission path optimization data, and generate network configuration parameter data. 8.The Internet-of-Things based Bluetooth speaker networking method according to claim 7, characterized in that, Step S35 includes the following steps: Step S351: According to the main path and backup path information in the transmission path optimization data, count the number of connections of each device, and weight average the path lengths of all connection paths participated by each device. Multiply the device connection number and the average path length after standardization processing to obtain a communication load index; Step S352: Based on the communication load index of each device and the weight coefficient in the device role allocation data, assign Bluetooth communication frequency bands to the devices in order of communication load index from high to low to obtain frequency band allocation data; Step S353: According to the distance parameters of each connection path in the transmission path optimization data and the device interconnection priority matrix, calculate the minimum transmission power and maximum transmission power range required by each device; Step S354: Based on the frequency band allocation data, the minimum transmission power and the maximum transmission power range, and combined with the role type in the device role allocation data, set the power level to obtain power level setting data, wherein the power level setting is specifically setting a high power level for the master role device, a low power level for the listening role device, and a medium power level for the relay role device; Step S355: generating network configuration parameter data containing device identification, allocated frequency band, power parameter and connection configuration according to frequency band allocation data and power level setting data. 9.The Internet-of-Things based Bluetooth speaker networking method according to claim 8, characterized in that, Step S4 includes the following steps: Step S41: starting the environment monitoring mode of each sound box device according to the network configuration parameter data, setting the monitoring period as a preset time interval, and establishing a real-time monitoring task scheduling table; Step S42: based on the real-time monitoring task scheduling table and the preset time interval, controlling each sound box device to periodically emit acoustic probe signals, collecting current room acoustic response data, and generating real-time room acoustic data; Step S43: extracting the current room characteristic frequency distribution according to the real-time room acoustic data, and comparing with the room characteristic frequency distribution data, calculating the frequency offset and response intensity change of each characteristic frequency point; Step S44: calculating the standard deviation and average deviation value of the characteristic frequency change based on the frequency offset and response intensity change of each characteristic frequency point, and generating the environment state change amplitude; Step S45: comparing the average deviation value of the environment state change amplitude with the preset change threshold value, and triggering a network reconstruction signal when the average deviation value exceeds the preset threshold value, and generating network adjustment instruction data; Step S46: based on the network adjustment instruction data, executing the network reconstruction process, taking the current network configuration parameter data as a historical configuration backup, and re-executing steps S1 to S3, to realize dynamic adaptive adjustment of the network based on environmental changes.
10. A Bluetooth sound box networking system based on Internet of Things, characterized in that, The Bluetooth sound box networking system based on Internet of Things comprises: An acoustic perception module is configured to obtain sound box device spatial position distribution data; control each device to emit acoustic probe signals of a preset frequency in turn according to the sound box device spatial position distribution data; evaluate room acoustic propagation characteristics based on signal response intensity; calculate acoustic propagation loss coefficient and delay characteristics using signal response raw data; and establish a room acoustic environment model based on acoustic parameter analysis to obtain room acoustic propagation characteristic data. The role assignment module is configured to compare and analyze signal response intensities at different frequencies using room acoustic propagation characteristic data, identify room characteristic frequency distribution data, including calculating average values of response intensities of frequency points in the frequency response envelope sequence data, identifying frequency points with response intensities higher than 1.5 times the average values as response peak frequencies; calculating response intensity change gradients between adjacent frequency points in the frequency response envelope sequence data, identifying frequency intervals with gradient changes exceeding 30% as response turning frequency intervals; calculating characteristic importance weight coefficients based on the response peak frequencies and the response turning frequency intervals, screening frequency points with characteristic importance weight coefficients greater than 0.6 as room characteristic frequencies; statistically analyzing distribution density and interval rules of the room characteristic frequencies, recording response intensity values corresponding to each characteristic frequency, and generating room characteristic frequency distribution data; detecting acoustic response amplitude differences of each sound box device at different characteristic frequencies according to the room characteristic frequency distribution data; determining position type characteristics of each device in the room sound field based on the acoustic response amplitude differences, and performing device role assignment based on the response amplitudes to obtain device role assignment data, including calculating comprehensive sound field adaptability scores of each device according to sound field position type classification results and response difference values in the acoustic response amplitude difference data; performing preliminary assignment of devices according to the comprehensive sound field adaptability scores, assigning devices with sound field strong response position types and highest scores as master control roles, assigning devices with sound field weak response position types as monitoring roles, and assigning devices with sound field medium response position types as relay roles to obtain preliminary assignment results of device roles; assigning weight coefficients of each role based on the preliminary assignment results of device roles, and generating device role assignment data containing device identifiers, position type characteristics, role types, and weight coefficients; The network construction module is configured to set master control role devices as a first layer of the network, set relay role devices as a second layer of the network, and set monitoring role devices as a third layer of the network according to role types and weight coefficients in the device role assignment data, establish a hierarchical network structure framework, and optimize data transmission paths between devices to obtain transmission path optimization data; assign communication frequency bands and power parameters of each device according to the transmission path optimization data, and generate network configuration parameter data; The adaptive adjustment module is configured to continuously monitor real-time changes of room characteristic frequencies based on the network configuration parameter data, and determine environmental state change amplitudes based on characteristic frequency change degrees; when the environmental state change amplitudes exceed a preset threshold, steps S1 to S3 are re-executed to realize dynamic adaptive adjustment of the network.
Citation Information
Patent Citations
Bluetooth device ad hoc network method and system
CN108834121A
Mobile device assignment within wireless sound system based on device specifications
US9763280B1