An audio processing method and related device based on Bluetooth speaker interconnection

By obtaining the performance data and environmental coordination scores of Bluetooth speakers, a safe and stable Bluetooth speaker interconnection teaming system is established, which solves the problem of Bluetooth speaker connection stability and sound quality, and achieves audio playback effects with high sound quality and accurate volume adjustment.

CN119071694BActive Publication Date: 2025-01-10DONGGUAN JINWENHUA DIGITAL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411562517.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-01-10
Estimated Expiration
2044-11-05

AI Technical Summary

Technical Problem

Most of the existing Bluetooth speakers are single speaker mode. The security and stability are insufficient when connecting multiple Bluetooth speakers, which makes it difficult for smart terminals to connect multiple Bluetooth speakers at the same time. The environmental interference affects the sound quality, making it impossible to provide a high-quality audio playback experience. And the accuracy of distance adjustment is low.

Method used

By obtaining the performance test data of each Bluetooth speaker, the main Bluetooth speaker is determined, and a safe and stable interconnection teaming system is established with the Bluetooth speaker through the team matching mode, the power spectrum density function and environmental coordination score are calculated for audio adjustment, combined with The signal intensity of the microphone adjusts the volume.

Benefits of technology

It realizes safe and stable interconnection between multiple Bluetooth speakers, improves the sound quality and user experience of audio playback, ensures the accuracy of volume adjustment, and provides a more ideal audio playback effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071694B_ABST
    Figure CN119071694B_ABST
Patent Text Reader

Abstract

The present invention discloses an audio processing method and related device based on the interconnection of Bluetooth speakers, and relates to the technical field of equipment communication. The method comprises: obtaining the comprehensive score of each Bluetooth speaker based on its performance test data to determine the master Bluetooth speaker; searching for slave Bluetooth speakers, sending a pairing request instruction to the slave Bluetooth speakers, generating an authentication key and sending it to the master Bluetooth speaker; authenticating the authentication key, and if the authentication is successful, sending a connection data packet to the slave Bluetooth speakers to form a Bluetooth speaker interconnection team system; calculating the power spectrum density function and the environmental coordination score of the audio to be transmitted to adjust the audio; establishing an audio transmission channel, and transmitting the adjusted audio to be transmitted to the system for playback based on the audio transmission channel; detecting the average real-time signal strength of several microphones connected to the system, and calculating the target average distance in combination with the attenuation factor to adjust the volume of the audio playback. The present invention enables the audio playback processing of the Bluetooth speaker to achieve a more ideal effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention mainly relates to the technical field of device communication, and in particular to an audio processing method and related devices based on Bluetooth speaker interconnection. Background Art

[0002] With the development of wireless transmission technology, Bluetooth speakers are becoming more and more popular, and many users will use smart terminals to connect Bluetooth speakers to play audio. However, most existing Bluetooth speakers are single-speaker mode, and most users can only play audio through one Bluetooth speaker. For those that can play audio through multiple speakers, the security and stability of the connection between Bluetooth speakers are insufficient, resulting in the inability to guarantee the reliability of smart terminals connecting to multiple Bluetooth speakers at the same time, making it difficult to meet the needs of users. At the same time, in the existing use of Bluetooth speakers for audio playback, there is a lack of consideration of the impact of environmental interference on audio playback, resulting in a large deviation between the actual sound quality during audio playback and the expected sound quality, and failing to provide users with a high-quality audio playback experience. When a user sings along with audio playback, the different distances between him and the Bluetooth speaker will affect the quality of the audio heard by the user. Therefore, the volume of the audio playback needs to be adjusted according to the distance between the user's handheld microphone and the Bluetooth speaker. Currently, the distance between the user's handheld microphone and the Bluetooth speaker is calculated only by relying on signal strength. However, the distance calculated by this method is not accurate enough, and it is easy for the calculated distance to deviate greatly from the actual situation, resulting in an inability to accurately adjust the volume of the audio playback, causing the audio playback of the Bluetooth speaker to fail to achieve the expected effect. Summary of the invention

[0003] The purpose of the present invention is to overcome the shortcomings of the prior art. The present invention provides an audio processing method and related devices based on Bluetooth speaker interconnection, which realizes safe and stable interconnection between several Bluetooth speakers, so that the audio playback processing of the Bluetooth speakers can achieve a more ideal effect.

[0004] In order to solve the above technical problems, the present invention provides an audio processing method based on Bluetooth speaker interconnection, which is applied to a smart terminal, a Bluetooth speaker interconnection team system composed of a plurality of Bluetooth speakers, and a plurality of microphones, wherein the Bluetooth speaker interconnection team system establishes communication connections with the smart terminal and the plurality of microphones respectively; the method comprises:

[0005] Acquire performance test data of each Bluetooth speaker, acquire a comprehensive score of each Bluetooth speaker based on the performance test data of each Bluetooth speaker, and determine a master Bluetooth speaker based on the comprehensive score of each Bluetooth speaker;

[0006] The master Bluetooth speaker enters a team matching mode and searches based on the team matching mode. When a slave Bluetooth speaker is found, the master Bluetooth speaker sends a pairing request instruction to the slave Bluetooth speaker. The slave Bluetooth speaker generates an authentication key based on the pairing request instruction and sends the authentication key to the master Bluetooth speaker.

[0007] The master Bluetooth speaker authenticates the authentication key, and if the authentication is successful, sends a connection data packet to the slave Bluetooth speaker, and the slave Bluetooth speaker teams up with the master Bluetooth speaker based on the connection data packet to form a Bluetooth speaker interconnection team system;

[0008] Acquire the audio to be transmitted of the smart terminal, calculate the power spectral density function and the environmental coordination score of the audio to be transmitted, and perform audio adjustment on the audio to be transmitted based on the power spectral density function and the environmental coordination score to obtain the adjusted audio to be transmitted;

[0009] The smart terminal establishes an audio transmission channel based on the communication connection with the Bluetooth speaker interconnection team system, and transmits the adjusted audio to be transmitted to the Bluetooth speaker interconnection team system for audio playback based on the audio transmission channel;

[0010] When the Bluetooth speaker interconnection team system performs audio playback, the average real-time signal strength of several microphones connected to the Bluetooth speaker interconnection team system is detected, and the target average distance between the Bluetooth speaker interconnection team system and the several microphones is calculated based on the average real-time signal strength combined with the attenuation factor, and the volume of the audio playback is adjusted based on the target average distance.

[0011] Optionally, acquiring a comprehensive score of each Bluetooth speaker based on the performance test data of each Bluetooth speaker, and determining a master Bluetooth speaker based on the comprehensive score of each Bluetooth speaker, includes:

[0012] Perform cluster analysis on the performance test data of each Bluetooth speaker to obtain a cluster analysis result of each Bluetooth speaker;

[0013] Based on the cluster analysis results of each Bluetooth speaker, singular value decomposition is used to obtain the performance membership of each Bluetooth speaker, and the performance score of each Bluetooth speaker is determined based on the performance membership;

[0014] The location distribution of each Bluetooth speaker is obtained, and a comprehensive score of each Bluetooth speaker is calculated based on the location distribution and the performance score, and the Bluetooth speaker with the highest comprehensive score is used as the main Bluetooth speaker.

[0015] Optionally, the searching is performed based on the team matching mode, and when a slave Bluetooth speaker is searched, the master Bluetooth speaker sends a pairing request instruction to the slave Bluetooth speaker, and the slave Bluetooth speaker generates an authentication key based on the pairing request instruction, including:

[0016] The master Bluetooth speaker searches for a candidate slave Bluetooth speaker that meets a preset effective distance based on the team matching mode, and extracts a signal strength and a team data packet of the candidate slave Bluetooth speaker that meets the preset effective distance;

[0017] Match the signal strength and team data packet of the candidate slave Bluetooth speakers that meet the preset effective distance with the preset matching strategy. If the match is successful, the successfully matched Bluetooth speaker is used as the slave Bluetooth speaker. The master Bluetooth speaker sends a pairing request instruction to the slave Bluetooth speaker, and the master Bluetooth speaker exchanges device information with the slave Bluetooth speaker.

[0018] The slave Bluetooth speaker generates an initial key and a random number based on the pairing request instruction, generates first data based on the random number combined with device information of the master Bluetooth device and the slave Bluetooth device, performs encryption operation based on the first data combined with the initial key using the verification tag to obtain an authentication key.

[0019] Optionally, the master Bluetooth speaker authenticates the authentication key, and if the authentication is successful, sends a connection data packet to the slave Bluetooth speaker, and the slave Bluetooth speaker teams up with the master Bluetooth speaker based on the connection data packet to form a Bluetooth speaker interconnection teaming system, including:

[0020] The master Bluetooth speaker converts the authentication key into a byte stream based on the ObjectOutputStream sequence to obtain the authentication key after the byte stream conversion;

[0021] Based on ObjectInputStream deserialization, the authentication key converted from the byte stream is converted into the original object, and the original object is checked for information tampering to obtain the information tampering check result;

[0022] The master Bluetooth speaker authenticates the authentication key based on the device information of the master Bluetooth speaker, the device information of the slave Bluetooth speaker and the preset communication parameters combined with the information tampering check result;

[0023] If the authentication key is successfully authenticated, a connection data packet is sent to the slave Bluetooth speaker, and the slave Bluetooth speaker creates a team link with the master Bluetooth speaker based on the connection data packet, and a Bluetooth speaker interconnection team system is formed based on the team link between the slave Bluetooth speaker and the master Bluetooth speaker.

[0024] Optionally, calculating the power spectral density function and the environmental coordination score of the audio to be transmitted, and performing audio adjustment on the audio to be transmitted based on the power spectral density function and the environmental coordination score to obtain the adjusted audio to be transmitted includes:

[0025] Calculating a signal spectrum of the audio to be transmitted, calculating the power of the frequency component based on the signal spectrum, calculating the power spectrum density based on the power of the frequency component, and determining the power of the interference interval based on the power spectrum density;

[0026] Acquire environmental audio information, classify the environmental audio information into categories, obtain an environmental audio category set, and calculate an environmental coordination score based on the environmental audio category set;

[0027] Calculating an anti-interference signal coefficient using a preset weight coefficient based on the power and environmental coordination score of the interference interval;

[0028] Audio adjustment is performed on the audio to be transmitted based on the anti-interference signal coefficient to obtain adjusted audio to be transmitted.

[0029] Optionally, the smart terminal establishes an audio transmission channel based on a communication connection with the Bluetooth speaker interconnection teaming system, and transmits the adjusted audio to be transmitted to the Bluetooth speaker interconnection teaming system for audio playback based on the audio transmission channel, including:

[0030] Acquire the Bluetooth protocol stack of the smart terminal, construct a virtual audio transmission model protocol channel based on the Bluetooth protocol stack, and establish an audio transmission channel based on the virtual audio transmission model protocol channel in combination with a communication connection with the Bluetooth speaker interconnection teaming system;

[0031] A synchronous broadcast stream is created, and based on the audio transmission channel and the synchronous broadcast stream, the adjusted audio to be transmitted is transmitted to the Bluetooth speaker interconnection team system for audio playback.

[0032] Optionally, detecting the average real-time signal strength of a plurality of microphones connected to the Bluetooth speaker interconnection team system, calculating the target average distance between the Bluetooth speaker interconnection team system and the plurality of microphones based on the average real-time signal strength combined with an attenuation factor, and adjusting the volume of the audio playback based on the target average distance includes:

[0033] Detecting the real-time signal strength of each microphone connected to the Bluetooth speaker interconnection team system, and calculating the average real-time signal strength based on the real-time signal strength of each microphone, and calculating the initial average distance between the Bluetooth speaker interconnection team system and the plurality of microphones based on the average real-time signal strength;

[0034] Obtain a preset attenuation factor, determine a loss coefficient based on the attenuation factor combined with a Bluetooth channel transmission time, and calculate a target average distance between the Bluetooth speaker interconnection team system and a plurality of microphones based on the loss coefficient combined with the initial average distance;

[0035] A corresponding distance level is determined based on the target average distance, and an adjustment volume is determined based on the distance level. The volume of audio playback in the Bluetooth speaker interconnection team system is adjusted based on the adjustment volume.

[0036] In addition, the present invention also provides an audio processing device based on Bluetooth speaker interconnection, which is applied to a smart terminal, a Bluetooth speaker interconnection team system composed of a plurality of Bluetooth speakers, and a plurality of microphones, wherein the Bluetooth speaker interconnection team system establishes communication connections with the smart terminal and the plurality of microphones respectively; the device comprises:

[0037] A master Bluetooth speaker determination module: used to obtain performance test data of each Bluetooth speaker, obtain a comprehensive score of each Bluetooth speaker based on the performance test data of each Bluetooth speaker, and determine the master Bluetooth speaker based on the comprehensive score of each Bluetooth speaker;

[0038] Authentication key generation module: used for the master Bluetooth speaker to enter the team matching mode, search based on the team matching mode, and when a slave Bluetooth speaker is searched, the master Bluetooth speaker sends a pairing request instruction to the slave Bluetooth speaker, and the slave Bluetooth speaker generates an authentication key based on the pairing request instruction and sends the authentication key to the master Bluetooth speaker;

[0039] A Bluetooth speaker teaming module: used for the master Bluetooth speaker to authenticate the authentication key. If the authentication is successful, a connection data packet is sent to the slave Bluetooth speaker. The slave Bluetooth speaker teams up with the master Bluetooth speaker based on the connection data packet to form a Bluetooth speaker interconnection teaming system.

[0040] An audio adjustment module is used to obtain the audio to be transmitted of the smart terminal, calculate the power spectrum density function and the environmental coordination score of the audio to be transmitted, and perform audio adjustment on the audio to be transmitted based on the power spectrum density function and the environmental coordination score to obtain the adjusted audio to be transmitted;

[0041] Audio playback module: used for the smart terminal to establish an audio transmission channel based on the communication connection with the Bluetooth speaker interconnection team system, and transmit the adjusted audio to be transmitted to the Bluetooth speaker interconnection team system for audio playback based on the audio transmission channel;

[0042] Audio volume adjustment module: used to detect the average real-time signal strength of several microphones connected to the Bluetooth speaker interconnection teaming system when the Bluetooth speaker interconnection teaming system is playing audio, and calculate the target average distance between the Bluetooth speaker interconnection teaming system and several microphones based on the average real-time signal strength combined with the attenuation factor, and adjust the volume of the audio playback based on the target average distance.

[0043] In addition, the present invention also provides an audio processing system based on Bluetooth speaker interconnection, the system comprising an intelligent terminal, a Bluetooth speaker interconnection team system consisting of a plurality of Bluetooth speakers, and a plurality of microphones, the Bluetooth speaker interconnection team system respectively establishing communication connections with the intelligent terminal and the plurality of microphones; the system is configured to execute the above-mentioned audio processing method based on Bluetooth speaker interconnection.

[0044] In addition, the present invention also provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned audio processing method based on Bluetooth speaker interconnection.

[0045] In an embodiment of the present invention, a comprehensive score of each Bluetooth speaker is obtained based on the performance score and position distribution obtained from the performance test data of each Bluetooth speaker to determine the master Bluetooth speaker, thereby avoiding audio quality problems caused by poor performance of the master Bluetooth speaker when forming a team system, which is beneficial to improving the user's sound experience. When the master Bluetooth speaker searches for a slave Bluetooth speaker, a pairing request instruction is sent to the slave Bluetooth speaker, and the slave Bluetooth speaker generates an authentication key based on the pairing request instruction. The master Bluetooth speaker authenticates the authentication key according to the respective device information and information tampering check results to form a team with the slave Bluetooth speaker to form a Bluetooth speaker interconnection team system, thereby realizing safe and stable interconnection between several Bluetooth speakers, so that several Bluetooth speakers can be connected to a smart terminal and a microphone at the same time under the same team system, and each Bluetooth speaker can simultaneously receive audio information sent by the smart terminal under the team system. Based on the anti-interference signal coefficient generated by the power spectral density function and the environmental coordination score, the audio to be transmitted is adjusted to improve the sound quality of the audio playback, avoid a large deviation between the actual sound quality and the expected sound quality during subsequent audio playback, and bring a high-quality audio playback experience to the user. Based on the audio transmission channel, the intelligent terminal transmits the adjusted audio to be transmitted to the Bluetooth speaker interconnection team system for audio playback, which can achieve fast and stable audio transmission. Based on the average real-time signal strength of several microphones detected and combined with the attenuation factor, the target average distance between the Bluetooth speaker interconnection team system and several microphones is calculated to adjust the volume of the audio playback, which improves the accuracy of distance detection, can more accurately adjust the volume of the audio playback, and improve the effect of audio playback at different distances, so that the audio playback processing of the Bluetooth speaker can achieve a more ideal effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0047] Figure 1 is a flow chart of an audio processing method based on Bluetooth speaker interconnection in an embodiment of the present invention;

[0048] Figure 2 is a flow chart of an audio processing method based on Bluetooth speaker interconnection in another embodiment of the present invention;

[0049] Figure 3 It is a schematic diagram of the structure of an audio processing system based on Bluetooth speaker interconnection in an embodiment of the present invention;

[0050] Figure 4 It is a schematic diagram of the structural composition of an audio processing device based on Bluetooth speaker interconnection in an embodiment of the present invention. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] Embodiment 1

[0053] See also Figure 1 , Figure 1 1 is a flow chart of an audio processing method based on Bluetooth speaker interconnection in an embodiment of the present invention, wherein the method is applied to a smart terminal, a Bluetooth speaker interconnection team system consisting of a plurality of Bluetooth speakers, and a plurality of microphones, wherein the Bluetooth speaker interconnection team system establishes communication connections with the smart terminal and the plurality of microphones respectively; the method comprises:

[0054] S11: Obtaining performance test data of each Bluetooth speaker, obtaining a comprehensive score of each Bluetooth speaker based on the performance test data of each Bluetooth speaker, and determining a master Bluetooth speaker based on the comprehensive score of each Bluetooth speaker;

[0055] In the specific implementation process of the present invention, the comprehensive score of each Bluetooth speaker is obtained based on the performance test data of each Bluetooth speaker, and the main Bluetooth speaker is determined based on the comprehensive score of each Bluetooth speaker, including: performing cluster analysis on the performance test data of each Bluetooth speaker to obtain the cluster analysis result of each Bluetooth speaker; obtaining the performance membership of each Bluetooth speaker based on the cluster analysis result of each Bluetooth speaker by using singular value decomposition, and determining the performance score of each Bluetooth speaker based on the performance membership; obtaining the location distribution of each Bluetooth speaker, and calculating the comprehensive score of each Bluetooth speaker based on the location distribution and the performance score, and taking the Bluetooth speaker with the highest comprehensive score as the main Bluetooth speaker.

[0056] Specifically, the performance test data of each Bluetooth speaker is obtained from the database, and the performance test data includes data such as sound quality, volume, anti-interference and sensitivity. Cluster analysis is performed on the performance test data of each Bluetooth speaker, and the parameters of the fuzzy clustering algorithm and the number of cluster centers are initialized. The performance test data of each Bluetooth speaker is clustered according to the initialized parameters and the number of cluster centers to obtain the corresponding membership matrix, that is, the cluster analysis result of each Bluetooth speaker is obtained. The membership matrix is ​​reduced in dimension by the singular value decomposition algorithm to obtain the eigenvector corresponding to the performance test data. The singular value decomposition algorithm can reduce the complexity of calculation, calculate the Manhattan distance between the eigenvectors, and when the Manhattan distance is greater than the preset Manhattan distance threshold, count the eigenvectors greater than the preset Manhattan distance threshold, and readjust the number of cluster centers for the performance test data corresponding to the eigenvector until the calculated Manhattan distance is no longer greater than the preset Manhattan distance threshold, and the performance membership of each Bluetooth speaker can be obtained, such as a Bluetooth speaker with a medium signal-to-noise ratio and a Bluetooth speaker with a high-quality signal-to-noise ratio. The performance score of each Bluetooth speaker is determined according to the performance membership. Different performance memberships correspond to different performance scores, which can be matched in the database. The position distribution of each Bluetooth speaker is obtained. The position distribution includes right front, right rear, left front, left rear, etc., and the comprehensive score of each Bluetooth speaker is calculated based on the position distribution and the performance score. Different positions have different effects on users, so the position score is determined according to the position distribution. The scores corresponding to different position distributions are pre-set. The comprehensive score is calculated based on the position score and performance score and their corresponding weights, and the Bluetooth speaker with the highest comprehensive score is used as the main Bluetooth speaker. When several Bluetooth speakers are paired to form an interconnected team system, the main Bluetooth speaker still serves as the main playback device. In order to ensure the quality of audio playback, a Bluetooth speaker with better performance needs to be configured, thereby avoiding audio quality problems caused by poor performance or position of the main Bluetooth speaker.

[0057] S12: the master Bluetooth speaker enters a team matching mode and searches based on the team matching mode. When a slave Bluetooth speaker is found, the master Bluetooth speaker sends a pairing request instruction to the slave Bluetooth speaker. The slave Bluetooth speaker generates an authentication key based on the pairing request instruction and sends the authentication key to the master Bluetooth speaker.

[0058] In the specific implementation process of the present invention, the search is performed based on the team matching mode, and when a slave Bluetooth speaker is searched, the master Bluetooth speaker sends a pairing request instruction to the slave Bluetooth speaker, and the slave Bluetooth speaker generates an authentication key based on the pairing request instruction, including: the master Bluetooth speaker searches for candidate slave Bluetooth speakers that meet a preset effective distance based on the team matching mode, and extracts the signal strength and team data packet of the candidate slave Bluetooth speakers that meet the preset effective distance; the signal strength and team data packet of the candidate slave Bluetooth speakers that meet the preset effective distance are matched with a preset matching strategy, and if the match is successful, the successfully matched Bluetooth speaker is used as a slave Bluetooth speaker, the master Bluetooth speaker sends a pairing request instruction to the slave Bluetooth speaker, and the master Bluetooth speaker exchanges device information with the slave Bluetooth speaker; the slave Bluetooth speaker generates an initial key and a random number based on the pairing request instruction, generates first data based on the random number combined with the device information of the master Bluetooth device and the slave Bluetooth device, and performs encryption operation using a verification tag based on the first data combined with the initial key to obtain an authentication key.

[0059] Specifically, after determining the master Bluetooth speaker, the master Bluetooth speaker enters the team matching mode, which is an active search state. In this mode, the master Bluetooth speaker will actively search for the corresponding slave Bluetooth device. The master Bluetooth speaker searches for a candidate slave Bluetooth speaker that meets a preset effective distance based on the team matching mode. The preset effective distance is the distance between Bluetooth speakers that can ensure an effective connection. There are several candidate slave Bluetooth speakers that are searched out, and the signal strength and team data packets of the candidate slave Bluetooth speakers that meet the preset effective distance are extracted. The team data packets include broadcast data packets and data data. The signal strength and team data packet of the candidate slave Bluetooth speakers that meet the preset effective distance are matched with the preset matching strategy, that is, the signal strength and team data packet of each candidate slave Bluetooth speaker are matched with the preset matching strategy, and the preset matching strategy is used to determine whether the signal strength of the slave Bluetooth speaker reaches the required preset signal strength and whether its team data packet conforms to the preset team data packet type, format and size. If the signal strength of the slave Bluetooth speaker reaches the preset signal strength and its team data packet conforms to the preset team data packet type, format and size, the matching is successful, and the successfully matched Bluetooth speaker is used as the slave Bluetooth speaker. If the signal strength does not reach the preset signal strength or the team data packet does not conform to the preset type, format and size, the candidate slave Bluetooth speaker is eliminated, and the next candidate slave Bluetooth speaker is matched. The master Bluetooth speaker sends a pairing request instruction to the slave Bluetooth speaker, and the master Bluetooth speaker exchanges device information with the slave Bluetooth speaker, and the device information includes the device address type and the device address. The slave Bluetooth speaker generates an initial key and a random number based on the pairing request instruction, obtains the initial key flag bit and the pairing mode flag bit of the pairing request instruction, generates an initial key and a random number according to the initial key flag bit and the pairing mode flag bit of the pairing request instruction, generates first data based on the random number combined with the device information of the master Bluetooth device and the slave Bluetooth device, that is, performs an XOR operation according to the device information of the master Bluetooth device and the slave Bluetooth device and the random number to obtain the first data, performs an encryption operation based on the first data combined with the initial key using a check tag, performs an operation based on the first data combined with the communication parameters in the pairing request instruction to obtain the second data, performs an encryption operation in an encryption chip based on the second data combined with the initial key using a check tag, the encryption operation includes an XOR operation and a symmetric encryption operation, the check tag is a hash sequence check value obtained by the slave Bluetooth device performing a hash operation according to its own device information and a preset key, and obtains an authentication key. The authentication key is sent to the master Bluetooth speaker.

[0060] S13: the master Bluetooth speaker authenticates the authentication key. If the authentication is successful, a connection data packet is sent to the slave Bluetooth speaker. The slave Bluetooth speaker teams up with the master Bluetooth speaker based on the connection data packet to form a Bluetooth speaker interconnection team system.

[0061] In the specific implementation process of the present invention, the master Bluetooth speaker authenticates the authentication key. If the authentication is successful, a connection data packet is sent to the slave Bluetooth speaker. The slave Bluetooth speaker teams up with the master Bluetooth speaker based on the connection data packet to form a Bluetooth speaker interconnection team system, including: the master Bluetooth speaker converts the authentication key into a byte stream based on the ObjectOutputStream sequence to obtain the authentication key after the byte stream conversion; based on the ObjectInputStream reverse sequence, the authentication key after the byte stream conversion is converted into an original object, and the original object is checked for information tampering to obtain an information tampering check result; the master Bluetooth speaker authenticates the authentication key based on the device information of the master Bluetooth speaker, the device information of the slave Bluetooth speaker and the preset communication parameters combined with the information tampering check result; if the authentication key is successfully authenticated, a connection data packet is sent to the slave Bluetooth speaker. The slave Bluetooth speaker creates a team link with the master Bluetooth speaker based on the connection data packet, and a Bluetooth speaker interconnection team system is formed based on the team link between the slave Bluetooth speaker and the master Bluetooth speaker.

[0062] Specifically, the master Bluetooth speaker converts the authentication key into a byte stream based on the ObjectOutputStream sequence. The ObjectOutputStream sequence is an object stream function that provides a serialization function, which can convert an object into a byte stream, realize persistent storage of the object, and obtain the authentication key after the byte stream conversion. Based on the ObjectInputStream deserialization, the authentication key after the byte stream conversion is converted into the original object. The ObjectInputStream deserialization is an object stream function that provides a deserialization function. Through the deserialization process, the authentication key information obtained can carry more resource amounts and resource domains. The original object is checked for information tampering, and a verification tag of a slave Bluetooth device is parsed from the original object. The verification tag is verified, that is, whether the hash sequence verification value has been tampered with during the key transmission process is checked. A comparison and matching can be performed according to database data. Since the verification tag is a hash sequence verification value obtained by hashing the device information of the Bluetooth device itself and a preset key, if information tampering occurs during the transmission process, the verification tag will also change, and even the transmitted key information may not be accompanied by a verification tag. The result of the information tampering check is obtained. If information tampering is detected, the connection with the team of the slave Bluetooth speaker is stopped, and the search for the next slave Bluetooth speaker continues. The information tampering check can achieve a more comprehensive and accurate information tampering check without losing identity information data, thereby improving the security of the Bluetooth speaker team.The master Bluetooth speaker authenticates the authentication key based on the device information of the master Bluetooth speaker, the device information of the slave Bluetooth speaker and the preset communication parameters in combination with the information tampering check result. After the information tampering check is passed, a check result signature will be generated. The master Bluetooth speaker generates security authentication data based on the device information of the master Bluetooth speaker, the device information of the slave Bluetooth speaker and the preset communication parameters in combination with the check result signature. An encryption operation is performed based on the security authentication data in combination with a new initial key generated by the user based on the initial key to obtain a verification key to authenticate the authentication key. Authentication can be performed by comparing and matching the keys to determine whether the authentication key is successfully authenticated. If the authentication key authentication fails, it means that the slave Bluetooth speaker is a non-target slave Bluetooth speaker, then the connection with the slave Bluetooth speaker is stopped, and the next slave Bluetooth speaker is searched for to match and form a team. If the authentication key authentication is successful, a connection data packet is sent to the slave Bluetooth speaker, and the connection data packet includes information for creating a teaming link and creating a teaming link. The information may refer to information required for creating a team link, such as a Bluetooth address and a logical transmission address, etc. The slave Bluetooth speaker creates a team link with the master Bluetooth speaker based on the connection data packet. The team link is a synchronous communication bridge between Bluetooth speakers. A Bluetooth speaker interconnection team system is formed based on the team link between the slave Bluetooth speaker and the master Bluetooth speaker. When the Bluetooth speakers are successfully teamed to form a Bluetooth speaker interconnection team system, the Bluetooth speakers are in the same team system, forming synchronization between the Bluetooth speakers. When the master Bluetooth speaker receives an audio signal, it can be synchronized to the slave Bluetooth speaker at the same time. The Bluetooth speaker interconnection team system may include a master Bluetooth speaker and a slave Bluetooth speaker. The number of slave Bluetooth speakers is determined by the user according to actual conditions. After the Bluetooth speaker interconnection team system is formed, the smart terminal simultaneously establishes a Bluetooth connection with each Bluetooth speaker in the Bluetooth speaker interconnection team system, and the microphone also simultaneously establishes a Bluetooth connection with each Bluetooth speaker in the Bluetooth speaker interconnection team system. It realizes safe and stable interconnection between several Bluetooth speakers, so that when several Bluetooth speakers are in the same team system, the smart terminal and the microphone can be simultaneously connected to each Bluetooth speaker in the Bluetooth speaker interconnection team system. At the same time, under the team system, each Bluetooth speaker can simultaneously receive the audio information sent by the smart terminal, solving the problems of signal transmission delay and signal interference between Bluetooth speakers.

[0063] S14: obtaining the audio to be transmitted of the smart terminal, calculating the power spectral density function and the environmental coordination score of the audio to be transmitted, and performing audio adjustment on the audio to be transmitted based on the power spectral density function and the environmental coordination score to obtain the adjusted audio to be transmitted;

[0064] In the specific implementation process of the present invention, the power spectral density function and the environmental coordination score of the audio to be transmitted are calculated, and the audio adjustment of the audio to be transmitted is performed based on the power spectral density function and the environmental coordination score to obtain the adjusted audio to be transmitted, including: calculating the signal spectrum of the audio to be transmitted, calculating the power of the frequency component based on the signal spectrum, and calculating the power spectral density based on the power of the frequency component, and determining the power of the interference interval based on the power spectral density; obtaining environmental audio information, classifying the environmental audio information, obtaining an environmental audio category set, and calculating the environmental coordination score based on the environmental audio category set; calculating an anti-interference signal coefficient based on the power of the interference interval and the environmental coordination score using a preset weight coefficient; and performing audio adjustment on the audio to be transmitted based on the anti-interference signal coefficient to obtain the adjusted audio to be transmitted.

[0065] Specifically, the audio to be transmitted of the intelligent terminal is obtained, and the signal spectrum of the audio to be transmitted is calculated, that is, the audio signal is Fourier transformed for the audio to be transmitted, the power of the frequency component is calculated based on the signal spectrum, and the square modulus of each frequency component in the signal spectrum is calculated to obtain the power of the frequency component, and the power spectrum density is calculated based on the power of the frequency component, and the power of the frequency component is normalized, and then the power spectrum density is calculated according to the power of the normalized frequency component in the logarithmic coordinates. Determine the power of the interference interval based on the power spectrum density, insert the interference source in the simulation software, the interference source can be electromagnetic interference, etc., use the power spectrum density of the audio to be transmitted as a simulation parameter, perform an audio playback test under the interference source in the simulation software, determine the interference intensity and interference direction interval of the audio to be transmitted according to the test data in the simulation software, and calculate according to the interference intensity and interference direction interval combined with the interference covariance matrix to obtain the power of the interference interval, and the interference covariance matrix is ​​obtained by reconstructing the spatial spectrum density function. Obtain environmental audio information, which is the audio information of the user's surrounding environment. The environmental audio information is classified, the environmental audio information is convoluted to obtain a convolution matrix set, the convolution matrix set is averaged pooled to obtain a pooling matrix set, the pooling matrix set is flattened to obtain a feature sequence set, the feature sequence set is multi-classified according to the decision tree, and the environmental audio category set is obtained. The environmental audio category set is each identified environmental audio category, such as the sound of a cup colliding and its operation with the device. Based on the environmental audio category set, the environmental coordination score is calculated, the interference score of each environmental audio category in the environmental audio category set is calculated according to a preset inverse proportional empirical function, the weight coefficient corresponding to the interference score of each environmental audio category is determined according to a preset weight allocation table, and the environmental coordination score is calculated according to each interference score and its corresponding weight. The environmental coordination score is the coordination of the environmental audio and the audio to be transmitted, that is, it characterizes the degree of interference of the environmental audio on the audio to be transmitted. Based on the power and environmental coordination score of the interference interval, the anti-interference signal coefficient is calculated using the preset weight coefficient, that is, the power and environmental coordination score of the interference interval are calculated with the corresponding preset weight coefficient to obtain the anti-interference signal coefficient. The audio to be transmitted is adjusted based on the anti-interference signal coefficient. Different anti-interference signal coefficients correspond to different audio enhancement levels. The audio enhancement level includes a signal-to-noise ratio mixing level, a reverberation simulation level, etc. The audio to be transmitted is adjusted according to the corresponding audio enhancement level to obtain the adjusted audio to be transmitted.

[0066] S15: The smart terminal establishes an audio transmission channel based on the communication connection with the Bluetooth speaker interconnection team system, and transmits the adjusted audio to be transmitted to the Bluetooth speaker interconnection team system for audio playback based on the audio transmission channel;

[0067] In the specific implementation process of the present invention, the smart terminal establishes an audio transmission channel based on the communication connection with the Bluetooth speaker interconnection teaming system, and transmits the adjusted audio to be transmitted to the Bluetooth speaker interconnection teaming system for audio playback based on the audio transmission channel, including: obtaining the Bluetooth protocol stack of the smart terminal, constructing a virtual audio transmission model protocol channel based on the Bluetooth protocol stack, and establishing an audio transmission channel based on the virtual audio transmission model protocol channel in combination with the communication connection with the Bluetooth speaker interconnection teaming system; creating a synchronous broadcast stream, and transmitting the adjusted audio to be transmitted to the Bluetooth speaker interconnection teaming system for audio playback based on the audio transmission channel in combination with the synchronous broadcast stream.

[0068] Specifically, different smart terminals have different Bluetooth protocol stacks. The Bluetooth protocol stack is a set of technical protocols that implement open specifications for wireless transmission of audio and data, which defines the communication rules between Bluetooth devices. A virtual audio transmission model protocol channel is constructed based on the Bluetooth protocol stack. The parameter negotiation, establishment and transmission process of the data stream handle between the smart terminal and the Bluetooth speaker interconnection team system and the mutually exchanged signaling entity form are defined according to the Bluetooth protocol stack. A virtual audio transmission model protocol channel is established according to the defined signaling entity form, that is, a channel for the virtual transmission model protocol. An audio transmission channel is established based on the virtual audio transmission model protocol channel in combination with the communication connection with the Bluetooth speaker interconnection team system. The constructed virtual audio transmission model protocol is used as a relevant parameter and added to the communication connection between the smart terminal and the Bluetooth speaker interconnection team system to establish an audio transmission channel with lower latency. A synchronous broadcast stream is created. The synchronous broadcast stream includes several sub-events for transmitting audio data packets. The protocol data unit is sent according to the hci_send_cmd function to fill the broadcast synchronization group information, thereby creating a synchronous broadcast stream. Based on the audio transmission channel combined with the synchronous broadcast stream, the adjusted audio to be transmitted is transmitted to the Bluetooth speaker interconnection team system. Each Bluetooth speaker in the Bluetooth speaker interconnection team system receives the adjusted audio to be transmitted at the same time and plays the audio synchronously. When the audio to be transmitted is transmitted, the audio data packet is broadcast through the synchronous broadcast stream to reduce the delay of audio data transmission.

[0069] S16: When the Bluetooth speaker interconnection team system performs audio playback, detect the average real-time signal strength of several microphones connected to the Bluetooth speaker interconnection team system, and calculate the target average distance between the Bluetooth speaker interconnection team system and the several microphones based on the average real-time signal strength combined with the attenuation factor, and adjust the volume of the audio playback based on the target average distance.

[0070] In the specific implementation process of the present invention, the detecting the average real-time signal strength of several microphones connected to the Bluetooth speaker interconnection teaming system, calculating the target average distance between the Bluetooth speaker interconnection teaming system and the several microphones based on the average real-time signal strength combined with the attenuation factor, and adjusting the volume of the audio playback based on the target average distance includes: detecting the real-time signal strength of each microphone connected to the Bluetooth speaker interconnection teaming system, calculating the average real-time signal strength based on the real-time signal strength of each microphone, and calculating the initial average distance between the Bluetooth speaker interconnection teaming system and the several microphones based on the average real-time signal strength; obtaining a preset attenuation factor, determining a loss coefficient based on the attenuation factor combined with the Bluetooth channel transmission time, and calculating the target average distance between the Bluetooth speaker interconnection teaming system and the several microphones based on the loss coefficient combined with the initial average distance; determining a corresponding distance level based on the target average distance, determining an adjustment volume based on the distance level, and adjusting the volume of audio playback in the Bluetooth speaker interconnection teaming system based on the adjusted volume.

[0071] Specifically, when the Bluetooth speaker interconnection team system is playing audio, each user sings karaoke while holding a microphone that has established a communication connection with the Bluetooth speaker interconnection team system. The real-time signal strength of each microphone connected to the Bluetooth speaker interconnection team system is detected by the signal sensing module, and the average real-time signal strength is calculated based on the real-time signal strength of each microphone. The initial average distance between the Bluetooth speaker interconnection team system and several microphones is calculated based on the average real-time signal strength, and the initial average distance is obtained by calculating according to the preset calibration value and the average real-time signal strength. The preset attenuation factor is obtained. The attenuation factor is a preset value, which refers to the attenuation effect of the environment on signal transmission, and can be set according to the actual environment. Based on the attenuation factor combined with the Bluetooth channel transmission time, the loss coefficient is determined, the request channel response and the response channel response in the Bluetooth channel of each microphone and Bluetooth speaker interconnected team system are obtained, and several intermediate values ​​are generated according to the request channel response and the response channel response. According to the orthogonal matching tracking, the Bluetooth channel transmission time is obtained by using the several intermediate values, and the attenuation factor and the Bluetooth channel transmission time are calculated to obtain the loss coefficient, which can be the transmission path loss power of the Bluetooth signal, and the target average distance between the Bluetooth speaker interconnected team system and several microphones is calculated based on the loss coefficient combined with the initial average distance. Based on the target average distance, the corresponding distance level is determined, and the adjustment volume is determined based on the distance level. Each target average distance corresponds to a different distance level, and different distance levels correspond to different adjustment volumes, which can be obtained through database matching. Based on the adjustment volume, the volume of the audio playback of each Bluetooth speaker in the Bluetooth speaker interconnected team system is adjusted. In order to be able to adjust the volume according to the average distance between each user and the Bluetooth speaker, it is avoided that the user is far away from the Bluetooth speaker and cannot hear clearly or is too close to the Bluetooth speaker, which affects the hearing sense.

[0072] In an embodiment of the present invention, a comprehensive score of each Bluetooth speaker is obtained based on the performance score and position distribution obtained from the performance test data of each Bluetooth speaker to determine the master Bluetooth speaker, thereby avoiding audio quality problems caused by poor performance of the master Bluetooth speaker when forming a team system, which is beneficial to improving the user's sound experience. When the master Bluetooth speaker searches for a slave Bluetooth speaker, a pairing request instruction is sent to the slave Bluetooth speaker, and the slave Bluetooth speaker generates an authentication key based on the pairing request instruction. The master Bluetooth speaker authenticates the authentication key according to the respective device information and information tampering check results to form a team with the slave Bluetooth speaker to form a Bluetooth speaker interconnection team system, thereby realizing safe and stable interconnection between several Bluetooth speakers, so that several Bluetooth speakers can be connected to a smart terminal and a microphone at the same time under the same team system, and each Bluetooth speaker can simultaneously receive audio information sent by the smart terminal under the team system. Based on the anti-interference signal coefficient generated by the power spectral density function and the environmental coordination score, the audio to be transmitted is adjusted to improve the sound quality of the audio playback, avoid a large deviation between the actual sound quality and the expected sound quality during subsequent audio playback, and bring a high-quality audio playback experience to the user. Based on the audio transmission channel, the intelligent terminal transmits the adjusted audio to be transmitted to the Bluetooth speaker interconnection team system for audio playback, which can achieve fast and stable audio transmission. Based on the average real-time signal strength of several microphones detected and combined with the attenuation factor, the target average distance between the Bluetooth speaker interconnection team system and several microphones is calculated to adjust the volume of the audio playback, which improves the accuracy of distance detection, can more accurately adjust the volume of the audio playback, and improve the effect of audio playback at different distances, so that the audio playback processing of the Bluetooth speaker can achieve a more ideal effect.

[0073] Embodiment 2

[0074] See also Figure 2 , Figure 2 1 is a flow chart of an audio processing method based on Bluetooth speaker interconnection in another embodiment of the present invention, wherein the method is applied to a smart terminal, a Bluetooth speaker interconnection team system composed of a plurality of Bluetooth speakers, and a plurality of microphones, wherein the Bluetooth speaker interconnection team system establishes communication connections with the smart terminal and the plurality of microphones respectively; the method comprises:

[0075] S201: Acquire performance test data of each Bluetooth speaker, acquire a comprehensive score of each Bluetooth speaker based on the performance test data of each Bluetooth speaker, and determine a master Bluetooth speaker based on the comprehensive score of each Bluetooth speaker;

[0076] S202: the master Bluetooth speaker enters a team matching mode and searches based on the team matching mode. When a slave Bluetooth speaker is found, the master Bluetooth speaker sends a pairing request instruction to the slave Bluetooth speaker. The slave Bluetooth speaker generates an authentication key based on the pairing request instruction and sends the authentication key to the master Bluetooth speaker.

[0077] S203: the master Bluetooth speaker converts the authentication key into a byte stream based on the ObjectOutputStream sequence to obtain the authentication key after the byte stream conversion;

[0078] S204: converting the authentication key converted from the byte stream into an original object based on ObjectInputStream deserialization, and performing information tampering check on the original object to obtain an information tampering check result;

[0079] S205: The master Bluetooth speaker authenticates the authentication key based on the device information of the master Bluetooth speaker, the device information of the slave Bluetooth speaker and the preset communication parameters combined with the information tampering check result;

[0080] S206: Determine whether the authentication key is successfully authenticated;

[0081] S207: If the authentication key is successfully authenticated, a connection data packet is sent to the slave Bluetooth speaker, and the slave Bluetooth speaker creates a team link with the master Bluetooth speaker based on the connection data packet, and a Bluetooth speaker interconnection team system is formed based on the team link between the slave Bluetooth speaker and the master Bluetooth speaker;

[0082] S208: The smart terminal simultaneously establishes a Bluetooth connection with each Bluetooth speaker in the Bluetooth speaker interconnection team system, and the microphone also simultaneously establishes a Bluetooth connection with each Bluetooth speaker in the Bluetooth speaker interconnection team system;

[0083] S209: Acquire the audio to be transmitted of the smart terminal, calculate the power spectral density function and the environmental coordination score of the audio to be transmitted, and perform audio adjustment on the audio to be transmitted based on the power spectral density function and the environmental coordination score to obtain the adjusted audio to be transmitted;

[0084] S210: The smart terminal establishes an audio transmission channel based on the communication connection with the Bluetooth speaker interconnection team system, and transmits the adjusted audio to be transmitted to the Bluetooth speaker interconnection team system for audio playback based on the audio transmission channel;

[0085] S211: When the Bluetooth speaker interconnection team system performs audio playback, detect the average real-time signal strength of several microphones connected to the Bluetooth speaker interconnection team system, and calculate the target average distance between the Bluetooth speaker interconnection team system and the several microphones based on the average real-time signal strength combined with an attenuation factor, and adjust the volume of the audio playback based on the target average distance.

[0086] In an embodiment of the present invention, a comprehensive score of each Bluetooth speaker is obtained based on the performance score and position distribution obtained from the performance test data of each Bluetooth speaker to determine the master Bluetooth speaker, thereby avoiding audio quality problems caused by poor performance of the master Bluetooth speaker when forming a team system, which is beneficial to improving the user's sound experience. When the master Bluetooth speaker searches for a slave Bluetooth speaker, a pairing request instruction is sent to the slave Bluetooth speaker, and the slave Bluetooth speaker generates an authentication key based on the pairing request instruction. The master Bluetooth speaker authenticates the authentication key according to the respective device information and information tampering check results to form a team with the slave Bluetooth speaker to form a Bluetooth speaker interconnection team system, thereby realizing safe and stable interconnection between several Bluetooth speakers, so that several Bluetooth speakers can be connected to a smart terminal and a microphone at the same time under the same team system, and each Bluetooth speaker can simultaneously receive audio information sent by the smart terminal under the team system. Based on the anti-interference signal coefficient generated by the power spectral density function and the environmental coordination score, the audio to be transmitted is adjusted to improve the sound quality of the audio playback, avoid a large deviation between the actual sound quality and the expected sound quality during subsequent audio playback, and bring a high-quality audio playback experience to the user. Based on the audio transmission channel, the intelligent terminal transmits the adjusted audio to be transmitted to the Bluetooth speaker interconnection team system for audio playback, which can achieve fast and stable audio transmission. Based on the average real-time signal strength of several microphones detected and combined with the attenuation factor, the target average distance between the Bluetooth speaker interconnection team system and several microphones is calculated to adjust the volume of the audio playback, which improves the accuracy of distance detection, can more accurately adjust the volume of the audio playback, and improve the effect of audio playback at different distances, so that the audio playback processing of the Bluetooth speaker can achieve a more ideal effect.

[0087] Embodiment 3

[0088] See also Figure 3 , Figure 3 It is a schematic diagram of the structural composition of an audio processing system based on Bluetooth speaker interconnection in an embodiment of the present invention, the system includes an intelligent terminal, a Bluetooth speaker interconnection team system composed of a master Bluetooth speaker and slave Bluetooth speakers, and a plurality of microphones, the Bluetooth speaker interconnection team system establishes communication connections with the intelligent terminal and the plurality of microphones respectively, and the system is configured to execute the audio processing method based on Bluetooth speaker interconnection in the above embodiment.

[0089] In the specific implementation process of the present invention, the smart terminal can be a smart phone and a tablet computer, etc. The Bluetooth speaker interconnection team system includes a master Bluetooth speaker and a slave Bluetooth speaker. When the Bluetooth speakers are successfully teamed to form a Bluetooth speaker interconnection team system, the Bluetooth speakers are in the same team system, forming synchronization between the Bluetooth speakers. When the master Bluetooth speaker receives an audio signal, it can be synchronized to the slave Bluetooth speaker at the same time. Among them, the Bluetooth speaker interconnection team system may include a master Bluetooth speaker and a slave Bluetooth speaker. The number of slave Bluetooth speakers is determined by the user according to actual conditions. After the Bluetooth speaker interconnection team system is formed, the smart terminal simultaneously establishes a Bluetooth connection with each Bluetooth speaker in the Bluetooth speaker interconnection team system, and the microphone also simultaneously establishes a Bluetooth connection with each Bluetooth speaker in the Bluetooth speaker interconnection team system. The smart terminal transmits the audio to each Bluetooth speaker in the Bluetooth speaker interconnection team system for synchronous playback, and the user holds the microphone to sing karaoke.

[0090] at the same time, Figure 3 The illustrated audio processing system based on Bluetooth speaker interconnection does not constitute a limitation on all components, and may include more or fewer components than illustrated, or combine certain components. The specific implementation method can be found in the above embodiments, which will not be described in detail here.

[0091] In an embodiment of the present invention, a comprehensive score of each Bluetooth speaker is obtained based on the performance score and position distribution obtained from the performance test data of each Bluetooth speaker to determine the master Bluetooth speaker, thereby avoiding audio quality problems caused by poor performance of the master Bluetooth speaker when forming a team system, which is beneficial to improving the user's sound experience. When the master Bluetooth speaker searches for a slave Bluetooth speaker, a pairing request instruction is sent to the slave Bluetooth speaker, and the slave Bluetooth speaker generates an authentication key based on the pairing request instruction. The master Bluetooth speaker authenticates the authentication key according to the respective device information and information tampering check results to form a team with the slave Bluetooth speaker to form a Bluetooth speaker interconnection team system, thereby realizing safe and stable interconnection between several Bluetooth speakers, so that several Bluetooth speakers can be connected to a smart terminal and a microphone at the same time under the same team system, and each Bluetooth speaker can simultaneously receive audio information sent by the smart terminal under the team system. Based on the anti-interference signal coefficient generated by the power spectral density function and the environmental coordination score, the audio to be transmitted is adjusted to improve the sound quality of the audio playback, avoid a large deviation between the actual sound quality and the expected sound quality during subsequent audio playback, and bring a high-quality audio playback experience to the user. Based on the audio transmission channel, the intelligent terminal transmits the adjusted audio to be transmitted to the Bluetooth speaker interconnection team system for audio playback, which can achieve fast and stable audio transmission. Based on the average real-time signal strength of several microphones detected and combined with the attenuation factor, the target average distance between the Bluetooth speaker interconnection team system and several microphones is calculated to adjust the volume of the audio playback, which improves the accuracy of distance detection, can more accurately adjust the volume of the audio playback, and improve the effect of audio playback at different distances, so that the audio playback processing of the Bluetooth speaker can achieve a more ideal effect.

[0092] Embodiment 4

[0093] See also Figure 4 , Figure 4 1 is a schematic diagram of the structure of an audio processing device based on Bluetooth speaker interconnection in an embodiment of the present invention, wherein the device is applied to a smart terminal, a Bluetooth speaker interconnection team system consisting of a plurality of Bluetooth speakers, and a plurality of microphones, wherein the Bluetooth speaker interconnection team system establishes communication connections with the smart terminal and the plurality of microphones respectively; the device comprises:

[0094] A master Bluetooth speaker determination module 41 is used to obtain performance test data of each Bluetooth speaker, obtain a comprehensive score of each Bluetooth speaker based on the performance test data of each Bluetooth speaker, and determine the master Bluetooth speaker based on the comprehensive score of each Bluetooth speaker;

[0095] Authentication key generation module 42: used for the master Bluetooth speaker to enter the team matching mode, search based on the team matching mode, and when a slave Bluetooth speaker is searched, the master Bluetooth speaker sends a pairing request instruction to the slave Bluetooth speaker, and the slave Bluetooth speaker generates an authentication key based on the pairing request instruction, and sends the authentication key to the master Bluetooth speaker;

[0096] A Bluetooth speaker teaming module 43 is used for the master Bluetooth speaker to authenticate the authentication key. If the authentication is successful, a connection data packet is sent to the slave Bluetooth speaker. The slave Bluetooth speaker teams up with the master Bluetooth speaker based on the connection data packet to form a Bluetooth speaker interconnection teaming system.

[0097] The audio adjustment module 44 is used to obtain the audio to be transmitted of the smart terminal, calculate the power spectrum density function and the environmental coordination score of the audio to be transmitted, and perform audio adjustment on the audio to be transmitted based on the power spectrum density function and the environmental coordination score to obtain the adjusted audio to be transmitted;

[0098] Audio playback module 45: used for the smart terminal to establish an audio transmission channel based on the communication connection with the Bluetooth speaker interconnection team system, and transmit the adjusted audio to be transmitted to the Bluetooth speaker interconnection team system for audio playback based on the audio transmission channel;

[0099] The audio volume adjustment module 46 is used to detect the average real-time signal strength of several microphones connected to the Bluetooth speaker interconnection teaming system when the Bluetooth speaker interconnection teaming system is playing audio, and calculate the target average distance between the Bluetooth speaker interconnection teaming system and the several microphones based on the average real-time signal strength combined with the attenuation factor, and adjust the volume of the audio playback based on the target average distance.

[0100] In the specific implementation process of the present invention, the specific implementation methods of the device items can be referred to the above embodiments, which will not be repeated here.

[0101] In an embodiment of the present invention, a comprehensive score of each Bluetooth speaker is obtained based on the performance score and position distribution obtained from the performance test data of each Bluetooth speaker to determine the master Bluetooth speaker, thereby avoiding audio quality problems caused by poor performance of the master Bluetooth speaker when forming a team system, which is beneficial to improving the user's sound experience. When the master Bluetooth speaker searches for a slave Bluetooth speaker, a pairing request instruction is sent to the slave Bluetooth speaker, and the slave Bluetooth speaker generates an authentication key based on the pairing request instruction. The master Bluetooth speaker authenticates the authentication key according to the respective device information and information tampering check results to form a team with the slave Bluetooth speaker to form a Bluetooth speaker interconnection team system, thereby realizing safe and stable interconnection between several Bluetooth speakers, so that several Bluetooth speakers can be connected to a smart terminal and a microphone at the same time under the same team system, and each Bluetooth speaker can simultaneously receive audio information sent by the smart terminal under the team system. Based on the anti-interference signal coefficient generated by the power spectral density function and the environmental coordination score, the audio to be transmitted is adjusted to improve the sound quality of the audio playback, avoid a large deviation between the actual sound quality and the expected sound quality during subsequent audio playback, and bring a high-quality audio playback experience to the user. Based on the audio transmission channel, the intelligent terminal transmits the adjusted audio to be transmitted to the Bluetooth speaker interconnection team system for audio playback, which can achieve fast and stable audio transmission. Based on the average real-time signal strength of several microphones detected and combined with the attenuation factor, the target average distance between the Bluetooth speaker interconnection team system and several microphones is calculated to adjust the volume of the audio playback, which improves the accuracy of distance detection, can more accurately adjust the volume of the audio playback, and improve the effect of audio playback at different distances, so that the audio playback processing of the Bluetooth speaker can achieve a more ideal effect.

[0102] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the audio processing method based on Bluetooth speaker interconnection in any of the above embodiments is implemented. The computer-readable storage medium includes but is not limited to any type of disk (including floppy disk, hard disk, optical disk, CD-ROM, and magneto-optical disk), ROM (Read-Only Memory), RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or optical card. That is, the storage device includes any medium that can store or transmit information in a readable form by a device (for example, a computer, a mobile phone), which can be a read-only memory, a disk or an optical disk, etc.

[0103] In addition, the above is a detailed introduction to an audio processing method based on Bluetooth speaker interconnection and related devices provided by an embodiment of the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for a general technician in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. An audio processing method based on Bluetooth speaker interconnection, characterized in that: The method is applied to a smart terminal, a Bluetooth speaker interconnection team system composed of a plurality of Bluetooth speakers and a plurality of microphones, wherein the Bluetooth speaker interconnection team system establishes communication connections with the smart terminal and the plurality of microphones respectively; the method comprises: Acquire performance test data of each Bluetooth speaker, acquire a comprehensive score of each Bluetooth speaker based on the performance test data of each Bluetooth speaker, and determine a master Bluetooth speaker based on the comprehensive score of each Bluetooth speaker; The master Bluetooth speaker enters a team matching mode and searches based on the team matching mode. When a slave Bluetooth speaker is found, the master Bluetooth speaker sends a pairing request instruction to the slave Bluetooth speaker. The slave Bluetooth speaker generates an authentication key based on the pairing request instruction and sends the authentication key to the master Bluetooth speaker. The master Bluetooth speaker authenticates the authentication key, and if the authentication is successful, sends a connection data packet to the slave Bluetooth speaker, and the slave Bluetooth speaker teams up with the master Bluetooth speaker based on the connection data packet to form a Bluetooth speaker interconnection team system; Acquire the audio to be transmitted of the smart terminal, calculate the power spectral density function and the environmental coordination score of the audio to be transmitted, and perform audio adjustment on the audio to be transmitted based on the power spectral density function and the environmental coordination score to obtain the adjusted audio to be transmitted; The smart terminal establishes an audio transmission channel based on the communication connection with the Bluetooth speaker interconnection team system, and transmits the adjusted audio to be transmitted to the Bluetooth speaker interconnection team system for audio playback based on the audio transmission channel; When the Bluetooth speaker interconnection team system performs audio playback, the average real-time signal strength of several microphones connected to the Bluetooth speaker interconnection team system is detected, and the target average distance between the Bluetooth speaker interconnection team system and the several microphones is calculated based on the average real-time signal strength combined with the attenuation factor, and the volume of the audio playback is adjusted based on the target average distance.

2. The audio processing method based on Bluetooth speaker interconnection according to claim 1 is characterized in that: The method of obtaining a comprehensive score of each Bluetooth speaker based on the performance test data of each Bluetooth speaker and determining a master Bluetooth speaker based on the comprehensive score of each Bluetooth speaker includes: Perform cluster analysis on the performance test data of each Bluetooth speaker to obtain a cluster analysis result of each Bluetooth speaker; Based on the cluster analysis results of each Bluetooth speaker, singular value decomposition is used to obtain the performance membership of each Bluetooth speaker, and the performance score of each Bluetooth speaker is determined based on the performance membership; The location distribution of each Bluetooth speaker is obtained, and a comprehensive score of each Bluetooth speaker is calculated based on the location distribution and the performance score, and the Bluetooth speaker with the highest comprehensive score is used as the main Bluetooth speaker.

3. The audio processing method based on Bluetooth speaker interconnection according to claim 1 is characterized in that: The searching is performed based on the team matching mode, and when a slave Bluetooth speaker is searched, the master Bluetooth speaker sends a pairing request instruction to the slave Bluetooth speaker, and the slave Bluetooth speaker generates an authentication key based on the pairing request instruction, including: The master Bluetooth speaker searches for a candidate slave Bluetooth speaker that meets a preset effective distance based on the team matching mode, and extracts a signal strength and a team data packet of the candidate slave Bluetooth speaker that meets the preset effective distance; Match the signal strength and team data packet of the candidate slave Bluetooth speakers that meet the preset effective distance with the preset matching strategy. If the match is successful, the successfully matched Bluetooth speaker is used as the slave Bluetooth speaker. The master Bluetooth speaker sends a pairing request instruction to the slave Bluetooth speaker, and the master Bluetooth speaker exchanges device information with the slave Bluetooth speaker. The slave Bluetooth speaker generates an initial key and a random number based on the pairing request instruction, generates first data based on the random number combined with device information of the master Bluetooth device and the slave Bluetooth device, performs encryption operation based on the first data combined with the initial key using the verification tag to obtain an authentication key.

4. The audio processing method based on Bluetooth speaker interconnection according to claim 1 is characterized in that: The master Bluetooth speaker authenticates the authentication key. If the authentication is successful, a connection data packet is sent to the slave Bluetooth speaker. The slave Bluetooth speaker teams up with the master Bluetooth speaker based on the connection data packet to form a Bluetooth speaker interconnection teaming system, including: The master Bluetooth speaker converts the authentication key into a byte stream based on the ObjectOutputStream sequence to obtain the authentication key after the byte stream conversion; Based on ObjectInputStream deserialization, the authentication key converted from the byte stream is converted into the original object, and the original object is checked for information tampering to obtain the information tampering check result; The master Bluetooth speaker authenticates the authentication key based on the device information of the master Bluetooth speaker, the device information of the slave Bluetooth speaker and the preset communication parameters combined with the information tampering check result; If the authentication key is successfully authenticated, a connection data packet is sent to the slave Bluetooth speaker, and the slave Bluetooth speaker creates a team link with the master Bluetooth speaker based on the connection data packet, and a Bluetooth speaker interconnection team system is formed based on the team link between the slave Bluetooth speaker and the master Bluetooth speaker.

5. The audio processing method based on Bluetooth speaker interconnection according to claim 1 is characterized in that: The step of calculating the power spectral density function and the environmental coordination score of the audio to be transmitted, and performing audio adjustment on the audio to be transmitted based on the power spectral density function and the environmental coordination score to obtain the adjusted audio to be transmitted includes: Calculating a signal spectrum of the audio to be transmitted, calculating the power of the frequency component based on the signal spectrum, calculating the power spectrum density based on the power of the frequency component, and determining the power of the interference interval based on the power spectrum density; Acquire environmental audio information, classify the environmental audio information into categories, obtain an environmental audio category set, and calculate an environmental coordination score based on the environmental audio category set; Calculating an anti-interference signal coefficient using a preset weight coefficient based on the power and environmental coordination score of the interference interval; Audio adjustment is performed on the audio to be transmitted based on the anti-interference signal coefficient to obtain adjusted audio to be transmitted.

6. The audio processing method based on Bluetooth speaker interconnection according to claim 1, characterized in that: The smart terminal establishes an audio transmission channel based on a communication connection with the Bluetooth speaker interconnection teaming system, and transmits the adjusted audio to be transmitted to the Bluetooth speaker interconnection teaming system for audio playback based on the audio transmission channel, including: Acquire the Bluetooth protocol stack of the smart terminal, construct a virtual audio transmission model protocol channel based on the Bluetooth protocol stack, and establish an audio transmission channel based on the virtual audio transmission model protocol channel in combination with a communication connection with the Bluetooth speaker interconnection teaming system; A synchronous broadcast stream is created, and based on the audio transmission channel and the synchronous broadcast stream, the adjusted audio to be transmitted is transmitted to the Bluetooth speaker interconnection team system for audio playback.

7. The audio processing method based on Bluetooth speaker interconnection according to claim 1 is characterized in that: The detecting the average real-time signal strength of a plurality of microphones connected to the Bluetooth speaker interconnection team system, calculating the target average distance between the Bluetooth speaker interconnection team system and the plurality of microphones based on the average real-time signal strength combined with an attenuation factor, and adjusting the volume of the audio playback based on the target average distance, includes: Detecting the real-time signal strength of each microphone connected to the Bluetooth speaker interconnection team system, and calculating the average real-time signal strength based on the real-time signal strength of each microphone, and calculating the initial average distance between the Bluetooth speaker interconnection team system and the plurality of microphones based on the average real-time signal strength; Obtain a preset attenuation factor, determine a loss coefficient based on the attenuation factor combined with a Bluetooth channel transmission time, and calculate a target average distance between the Bluetooth speaker interconnection team system and a plurality of microphones based on the loss coefficient combined with the initial average distance; A corresponding distance level is determined based on the target average distance, and an adjustment volume is determined based on the distance level. The volume of audio playback in the Bluetooth speaker interconnection team system is adjusted based on the adjustment volume.

8. An audio processing device based on Bluetooth speaker interconnection, characterized in that: A Bluetooth speaker interconnection team system is applied to a smart terminal, and is composed of a plurality of Bluetooth speakers and a plurality of microphones. The Bluetooth speaker interconnection team system establishes communication connections with the smart terminal and the plurality of microphones respectively; the device comprises: A master Bluetooth speaker determination module: used to obtain performance test data of each Bluetooth speaker, obtain a comprehensive score of each Bluetooth speaker based on the performance test data of each Bluetooth speaker, and determine the master Bluetooth speaker based on the comprehensive score of each Bluetooth speaker; Authentication key generation module: used for the master Bluetooth speaker to enter the team matching mode, search based on the team matching mode, and when a slave Bluetooth speaker is searched, the master Bluetooth speaker sends a pairing request instruction to the slave Bluetooth speaker, and the slave Bluetooth speaker generates an authentication key based on the pairing request instruction and sends the authentication key to the master Bluetooth speaker; A Bluetooth speaker teaming module: used for the master Bluetooth speaker to authenticate the authentication key. If the authentication is successful, a connection data packet is sent to the slave Bluetooth speaker. The slave Bluetooth speaker teams up with the master Bluetooth speaker based on the connection data packet to form a Bluetooth speaker interconnection teaming system. An audio adjustment module is used to obtain the audio to be transmitted of the smart terminal, calculate the power spectrum density function and the environmental coordination score of the audio to be transmitted, and perform audio adjustment on the audio to be transmitted based on the power spectrum density function and the environmental coordination score to obtain the adjusted audio to be transmitted; Audio playback module: used for the smart terminal to establish an audio transmission channel based on the communication connection with the Bluetooth speaker interconnection team system, and transmit the adjusted audio to be transmitted to the Bluetooth speaker interconnection team system for audio playback based on the audio transmission channel; Audio volume adjustment module: used to detect the average real-time signal strength of several microphones connected to the Bluetooth speaker interconnection teaming system when the Bluetooth speaker interconnection teaming system is playing audio, and calculate the target average distance between the Bluetooth speaker interconnection teaming system and the several microphones based on the average real-time signal strength combined with the attenuation factor, and adjust the volume of the audio playback based on the target average distance.

9. An audio processing system based on Bluetooth speaker interconnection, characterized in that: The system includes a smart terminal, a Bluetooth speaker interconnection team system consisting of a number of Bluetooth speakers, and a number of microphones, wherein the Bluetooth speaker interconnection team system establishes communication connections with the smart terminal and the number of microphones respectively; the system is configured to execute the audio processing method based on Bluetooth speaker interconnection as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the audio processing method based on Bluetooth speaker interconnection as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for resisting illegal connection attack in slave Bluetooth device

    CN106028319A

  • Audio synchronous playing method and device and TWS Bluetooth earphone

    CN110519742A