A bluetooth earphone automatic control method and system

By collecting data through the built-in microphone and accelerometer of the Bluetooth headset, performing frequency domain processing and behavioral feature analysis, and dynamically adjusting noise reduction and volume, the problem of intelligent adaptive control of Bluetooth headsets in complex environments and dynamic user states is solved, achieving precise noise reduction and scenario-based volume adjustment.

CN122120658APending Publication Date: 2026-05-29SHENZHEN XUSHENG TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN XUSHENG TECH CO LTD
Filing Date
2026-01-27
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing Bluetooth headphones struggle to achieve precise noise cancellation and contextualized volume adjustment in complex environments and dynamic user states, failing to meet users' high-quality demands.

Method used

By collecting external sound signals through a built-in microphone and motion trajectory data through an accelerometer, frequency domain conversion and noise reduction are performed, spectral features and behavioral features are extracted, an acoustic description matrix and a comprehensive environmental feature matrix are constructed, and the noise reduction mode and volume are dynamically adjusted to generate a control strategy adapted to the current environment.

Benefits of technology

It improves the accuracy of noise suppression in complex environments and the adaptability of user behavior recognition, providing accurate noise reduction and contextualized volume adjustment, and solves the problems of poor adaptability and slow response of traditional methods in diverse usage scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122120658A_ABST
    Figure CN122120658A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of intelligent sensors, and discloses a Bluetooth earphone automatic control method and system.The method comprises the following steps: acquiring external environment original sound signals and user motion trajectory data; performing sound signal frequency domain conversion and noise reduction to obtain a pure acoustic data set; extracting a frequency spectrum feature to construct a matrix, analyzing background volume, and dividing interference levels; smoothing motion data to extract behavior features, and matching to obtain a current user behavior state; triggering noise reduction mode switching if a standard is met, setting an environment control strategy; generating environment adaptation parameter adjustment volume to obtain a volume adjustment value; converting into a voltage current signal to form earphone output configuration; generating a control signal to be applied to hardware, optimizing output timing, and obtaining a scene-adapted driving signal.The method can realize intelligent adaptive control under complex environments and dynamic user states.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent sensor technology, and in particular to an automated control method and system for Bluetooth headsets. Background Technology

[0002] Currently, in the field of intelligent sensor technology, with the continuous improvement of users' demands for the diversification of Bluetooth headset functions and ease of use, the intelligent adaptive control of Bluetooth headsets needs to achieve dynamic adjustments by accurately capturing environmental acoustic characteristics and user movement status. The combination of acoustic signal processing, motion sensing data fusion, and intelligent algorithms has become the core technical direction for improving control accuracy and scene adaptability.

[0003] Existing automated control methods for Bluetooth headsets in the industry mainly rely on preset fixed rules or single-dimensional sensor triggers. Examples include adjusting output based on preset volume thresholds, switching modes based solely on simple movement states, or using a single noise reduction algorithm to handle all environmental noise. However, this approach is clearly inadequate in complex usage scenarios. Fixed rules cannot adapt to dynamically changing environmental acoustic interference, making them susceptible to background noise and sudden sounds, leading to misjudgments in noise reduction or volume adjustment. Furthermore, single-dimensional sensing does not incorporate user movement characteristics; for example, the difference in acoustic needs between rapid outdoor movement and sitting still cannot be accurately identified, resulting in slow response and poor adaptability. Simultaneously, the lack of refined processing of acoustic spectrum characteristics makes it difficult to distinguish between noise and target sounds in different frequency bands, further affecting control performance, especially in noisy outdoor scenarios where users frequently switch states, failing to provide a seamless user experience.

[0004] In summary, existing technologies struggle to achieve intelligent adaptive control of Bluetooth headphones in complex environments and dynamic user states, failing to meet users' high-quality demands for precise noise cancellation and contextualized volume adjustment. Summary of the Invention

[0005] This invention provides an automated control method and system for Bluetooth headsets, enabling intelligent adaptive control of Bluetooth headsets in complex environments and dynamic user states, thereby meeting users' high-quality needs for precise noise reduction and scenario-based volume adjustment.

[0006] In a first aspect, to solve the above-mentioned technical problems, the present invention provides an automated control method for Bluetooth headsets, comprising: Acquire raw sound signals from the external environment and user motion trajectory data; The original sound signal is subjected to frequency domain transformation and noise reduction processing to obtain a clean acoustic dataset; Spectral features are extracted from the acoustic dataset to construct an acoustic description matrix. The background volume of the environment is analyzed based on the acoustic description matrix. If the background volume exceeds a preset interference volume threshold, the interference level is divided according to the magnitude of the exceedance to obtain an interference level label. The motion trajectory data is smoothed, and the user's behavioral features are extracted from the smoothed data. The behavioral features are then matched with a preset behavioral pattern template to obtain the user's current behavioral state. If the current behavior state and the interference level label reach the preset noise reduction mode switching conditions, the noise reduction mode switching is triggered, the intensity parameters and start-up sequence of the noise reduction mode are set, and the environmental control strategy is obtained. Based on the environmental control strategy, environmental adaptation parameters adapted to the current environment are generated, and the volume is adjusted according to the environmental adaptation parameters to obtain the volume adjustment value. The volume adjustment value is converted into a voltage or current signal that the headphones can execute, thus obtaining the headphone's output configuration; The corresponding control signal is generated according to the output configuration and applied to the headphone hardware. The response time of the current hardware is monitored, and the output timing is optimized according to the response time to obtain a driving signal adapted to the scene.

[0007] In one optional implementation, acquiring the raw sound signals of the external environment and the user's motion trajectory data includes: It collects raw sound signals from the external environment through a built-in microphone; Accelerometers collect the user's acceleration data, and the acceleration data is integrated to obtain the user's motion trajectory data.

[0008] In one optional implementation, the step of performing frequency domain transformation and noise reduction on the original sound signal to obtain a clean acoustic dataset includes: The original sound signal is frequency domain transformed to extract the peak distribution and amplitude variation range of the signal's spectrum, and the noise interference components in the peak distribution and amplitude variation range are separated to obtain the initial acoustic dataset; If the noise percentage in the initial acoustic dataset exceeds a preset noise percentage threshold, then the initial acoustic dataset undergoes secondary noise reduction processing to obtain a clean acoustic dataset.

[0009] In one optional implementation, the step of smoothing the motion trajectory data, extracting user behavior features from the smoothed motion trajectory data, and matching the behavior features with a preset behavior pattern template to obtain the user's current behavior state includes: The motion trajectory data is smoothed to obtain a smoothed motion trajectory; The user's behavioral features are extracted from the smooth motion trajectory, and the behavioral features include the trajectory change amplitude and trajectory change frequency; The behavioral characteristics are matched with preset behavioral pattern templates to determine the user's current behavioral state.

[0010] In one optional implementation, if the current behavior state and the interference level label reach a preset noise reduction mode switching condition, a noise reduction mode switching is triggered, and the intensity parameters and activation sequence of the noise reduction mode are set to obtain an environmental control strategy, including: The current behavior state and the interference level label are fused to construct a comprehensive environmental feature matrix, and the target behavior state and target interference level are extracted from the comprehensive environmental feature matrix. If the target behavior state and the target interference level meet the preset noise reduction mode switching conditions, then the noise reduction mode switching is triggered. After the noise reduction mode switching is triggered, the intensity parameter of the noise reduction mode is set according to the magnitude by which the background volume exceeds the interference volume threshold, and then the signal start-up timing is set to obtain the environmental control strategy.

[0011] In one optional implementation, according to the environmental control strategy, environmental adaptation parameters adapted to the current environment are generated, and the volume is adjusted according to the environmental adaptation parameters to obtain a volume adjustment value, including: Based on the environmental control strategy, environmental adaptation parameters are generated to suit the current environment, including noise reduction intensity and volume adjustment range. The volume is initially adjusted based on the environmental adaptation parameters to obtain an initial volume adjustment value; If the initial volume adjustment value exceeds the preset volume limit threshold, the initial volume adjustment value is corrected to obtain an optimized volume adjustment value.

[0012] In one optional implementation, converting the volume adjustment value into a voltage or current signal that the headphones can execute to obtain the headphone's output configuration includes: The signal transmission rate of the headphones was measured. Based on the voltage and current range of the current headphone hardware, the volume adjustment value is converted into a corresponding voltage and current signal to obtain the initial adjustment signal; If the initial adjustment signal exceeds a preset signal range threshold, the initial adjustment signal is optimized to obtain an optimized adjustment signal. By integrating the optimized adjustment signal and the signal transmission rate, the output configuration of the headphones is obtained.

[0013] In one optional implementation, the step of generating a corresponding control signal based on the output configuration and applying it to the headphone hardware, monitoring the current hardware response time, optimizing the output timing based on the response time, and obtaining a driving signal adapted to the scene includes: The corresponding control signal is generated according to the output configuration and applied to the headphone hardware. The actual response time of the current headphone hardware is monitored and compared with the preset response time to obtain the response delay. If the response delay exceeds a preset delay threshold, the output timing is optimized, and the response delay is monitored again until the response delay is less than or equal to the delay threshold, thus obtaining a driving signal adapted to the scene.

[0014] In a second aspect, the present invention provides an automated control system for Bluetooth headsets, comprising: The data acquisition module is used to acquire raw sound signals from the external environment and the user's motion trajectory data; An acoustic processing module is used to perform frequency domain conversion and noise reduction on the original sound signal to obtain a clean acoustic dataset. The interference label generation module is used to extract spectral features from the acoustic dataset, construct an acoustic description matrix, analyze the background volume of the environment based on the acoustic description matrix, and if the background volume exceeds a preset interference volume threshold, the interference level is divided according to the magnitude of the exceedance to obtain an interference level label. The behavior recognition module is used to smooth the motion trajectory data, extract the user's behavior features from the smoothed data, and match the behavior features with a preset behavior pattern template to obtain the user's current behavior state. The strategy generation module is used to trigger noise reduction mode switching if the current behavior state and the interference level label reach the preset noise reduction mode switching conditions, set the intensity parameters and start-up sequence of the noise reduction mode, and obtain the environmental control strategy. The volume adjustment module is used to generate environmental adaptation parameters adapted to the current environment according to the environmental control strategy, and adjust the volume according to the environmental adaptation parameters to obtain the volume adjustment value; The signal conversion module is used to convert the volume adjustment value into a voltage and current signal that the headphones can execute, thereby obtaining the output configuration of the headphones; The driver optimization module is used to generate corresponding control signals according to the output configuration and apply them to the headphone hardware, monitor the current response time of the hardware, optimize the output timing according to the response time, and obtain a driver signal adapted to the scene.

[0015] Compared with the prior art, the present invention has the following beneficial effects: (1) This invention collects the original sound signal of the external environment through the built-in microphone of the earphone, extracts the peak distribution and amplitude variation range of the spectrum through frequency domain conversion, separates high and low frequency noise through bandpass filtering, and obtains a clean acoustic dataset through fine noise reduction. It constructs an acoustic description matrix according to frequency band and amplitude characteristics, breaks through the limitation of traditional single noise reduction algorithm that cannot distinguish noise of different frequency bands, fully explores the dynamic characteristics of environmental acoustics, eliminates background noise and sudden sound interference, provides high-precision data support for interference level determination, effectively improves the accuracy of noise suppression in complex environments, and solves the problem of misjudgment in existing noise reduction technology.

[0016] (2) This invention collects user motion trajectory data through a built-in accelerometer, smooths out instantaneous fluctuations, extracts the trajectory change amplitude, frequency and direction features, maps them to generate motion description vectors, matches them with preset behavior state templates to obtain the user's current behavior state, and then integrates acoustic interference label levels to construct a comprehensive feature matrix. This breaks through the limitations of traditional single-dimensional sensing that fails to combine user motion features, accurately captures the linkage between user behavior and environmental acoustics, provides multi-dimensional basis for control strategy generation, significantly improves the adaptability of headphone control in complex scenarios, and makes up for the shortcomings of slow response and poor scene adaptability of existing technologies.

[0017] (3) Based on the comprehensive feature matrix, if it is determined that the outdoor movement is fast and the interference level is high, the noise reduction mode is switched, and environmental adaptation parameters including noise reduction frequency band and gain value are generated. The volume is dynamically adjusted and the intensity parameter is integrated to determine the output configuration. The control signal and the dynamic adjustment value are synchronously transmitted to the hardware. The output timing is optimized by combining the response time. It breaks through the limitation of traditional fixed rules that cannot dynamically adapt to complex environments and user states, and provides users with accurate noise reduction and scenario-based volume adjustment solutions. It solves the problem that existing technologies cannot seamlessly adapt to diverse usage scenarios, takes into account control accuracy and user experience, and meets the needs of high-quality audio use. Attached Figure Description

[0018] Figure 1 This is a schematic flowchart of an automated control method for Bluetooth headsets provided in the first embodiment of the present invention; Figure 2 This is a schematic diagram of an automated control system for Bluetooth headsets provided in the second embodiment of the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] Reference Figure 1 The first embodiment of the present invention provides an automated control method for Bluetooth headsets, comprising the following steps: S101, acquires raw sound signals from the external environment and user motion trajectory data; S102, the original sound signal is subjected to frequency domain transformation and noise reduction processing to obtain a clean acoustic dataset; S103, extract spectral features from the acoustic dataset, construct an acoustic description matrix, analyze the background volume of the environment based on the acoustic description matrix, and if the background volume exceeds a preset interference volume threshold, divide the interference level according to the excess amplitude to obtain the interference level label; S104, the motion trajectory data is smoothed, the user's behavioral features are extracted from the smoothed data, and the behavioral features are matched with a preset behavioral pattern template to obtain the user's current behavioral state. S105, if the current behavior state and the interference level label reach the preset noise reduction mode switching conditions, then the noise reduction mode switching is triggered, the intensity parameters and start-up sequence of the noise reduction mode are set, and the environmental control strategy is obtained. S106, Generate environmental adaptation parameters adapted to the current environment according to the environmental control strategy, and adjust the volume according to the environmental adaptation parameters to obtain the volume adjustment value; S107, the volume adjustment value is converted into a voltage and current signal that the headphones can execute, to obtain the output configuration of the headphones; S108: Generate a corresponding control signal according to the output configuration and apply it to the headphone hardware; monitor the current response time of the hardware; optimize the output timing according to the response time; and obtain a driving signal adapted to the scene.

[0021] In step S101, acquiring the raw sound signal of the external environment and the user's motion trajectory data includes: It collects raw sound signals from the external environment through a built-in microphone; Accelerometers collect the user's acceleration data, and the acceleration data is integrated to obtain the user's motion trajectory data.

[0022] It should be noted that, firstly, when capturing raw sound signals from the external environment using the built-in microphone of the headphones, the microphone sampling frequency is set to 44.1kHz. This frequency is based on the general frequency range of human voices and common ambient sounds, covering sound signals from 20-20000Hz. In noisy outdoor scenarios, the sampling frequency can be increased to 48kHz to improve high-frequency noise capture capabilities, while in quiet indoor scenarios, it can be decreased to 40kHz to reduce power consumption. For example, when a user is walking on a city street, the microphone continuously captures a mixture of sounds such as vehicle horns, conversations, and wind noise to form the raw sound signal.

[0023] Next, when collecting the user's motion trajectory data through the triaxial accelerometer built into the earphone, the sensor sampling frequency is set to 50Hz. This frequency setting aims to satisfy the Nyquist sampling theorem and cover the dominant frequency range of 0.5Hz to 3Hz for daily human movement, preventing signal aliasing and ensuring the accuracy of integral calculation. The sensor outputs raw acceleration values ​​in the X, Y, and Z axes in real time. The system first uses a Butterworth low-pass filter to filter out high-frequency jitter noise. Then, a quaternion-based gradient descent attitude calculation algorithm is used for gravity removal. Specifically, the system constructs a quaternion vector q=[q0,q1,q2,q3] describing the current attitude of the earphone. The normalized acceleration measurement value is used as the observation vector, and the direction error between this observation vector and the preset gravity reference vector in the carrier coordinate system is calculated. The quaternion parameters are iteratively updated along the opposite direction of the error gradient using the gradient descent method, thereby calculating the attitude matrix of the earphone relative to the geographic coordinate system in real time. Based on this attitude matrix, the gravitational acceleration vector g is projected backward onto the three axes of the sensor coordinate system to obtain the current gravity components (g_x, g_y, g_z). The system subtracts this gravity component from the original acceleration value, thereby eliminating the gravitational acceleration component and obtaining the true linear acceleration generated by the user. Subsequently, a second integral operation is performed on this linear acceleration in the time domain to convert the acceleration into an instantaneous velocity vector, and then the spatial displacement trend reflecting the amplitude and rhythm of limb movements is calculated, thus constructing continuous motion trajectory data. During the calculation, zero-velocity update is performed on the linear acceleration to suppress integral drift and ensure the accuracy of the motion trajectory. For example, when a user is jogging, the sensor captures acceleration fluctuations at a frequency of 50Hz. After degravity removal and second integral processing, the system analyzes the periodic displacement characteristics of the user's body in the vertical direction.

[0024] In step S102, the frequency domain transformation and noise reduction processing of the original sound signal to obtain a clean acoustic dataset includes: The original sound signal is frequency domain transformed to extract the peak distribution and amplitude variation range of the signal's spectrum, and the noise interference components in the peak distribution and amplitude variation range are separated to obtain the initial acoustic dataset; If the noise percentage in the initial acoustic dataset exceeds a preset noise percentage threshold, then the initial acoustic dataset undergoes secondary noise reduction processing to obtain a clean acoustic dataset.

[0025] It should be noted that, firstly, when performing frequency domain conversion on the original audio signal, Fast Fourier Transform (FFT) technology was used, with the number of FFT sampling points set to 1024. This number of sampling points is suitable for a microphone sampling frequency of 44.1kHz, enabling a frequency resolution of 43Hz and fully preserving the amplitude information of different frequency components. After verification with a large number of audio samples, the similarity confidence of the data after frequency domain conversion with the original signal reached over 96%. In outdoor scenarios with more high-frequency noise, the number of sampling points can be increased to 2048, while in indoor scenarios with more low-frequency noise, it can be reduced to 512. When extracting the peak distribution of the spectrum, a sliding window maximum value detection method was used, with the window size set to 5 frequency points. The spectrum was scanned point by point to locate the peak amplitude of each frequency band and record the corresponding frequency. When extracting the amplitude variation range, the difference between the overall maximum and minimum amplitude of the spectrum was calculated. Noise interference components were separated using a Butterworth 4th-order bandpass filter, with a low-frequency cutoff frequency of 200Hz and a high-frequency cutoff frequency of 3000Hz. This range was set based on the frequency distribution of human voice and common environmental target sounds, effectively filtering low-frequency vibration noise below 200Hz and electronic interference noise above 3000Hz to obtain the initial acoustic dataset. For example, the original sound signal from a user in an office environment, after FFT transformation, yielded spectral peaks of 50Hz air conditioner noise and 800Hz keyboard sound, with amplitude variations ranging from 20-50dB. After Butterworth 4th-order bandpass filtering, the 50Hz noise was filtered out, resulting in an initial acoustic dataset containing the 800Hz keyboard sound.

[0026] Next, when determining whether the noise proportion in the initial acoustic dataset exceeds a preset threshold, the system first employs a noise estimation algorithm based on minimum statistics to perform a time-domain scan of the initial acoustic dataset, tracking the minimum power spectrum value of each frequency band within the time window to construct a background noise floor. Simultaneously, combined with spectral flatness analysis, components with uniform spectral energy distribution and lacking harmonic characteristics are identified as residual noise components. The noise proportion is calculated by dividing the sum of the amplitudes of the identified residual noise components by the total signal amplitude. The preset noise proportion thresholds are set based on statistical data of normal noise proportions in three scenarios—indoor, outdoor, and transportation—over the past year. A percentile statistical method is used to take the upper limit of the noise proportion for 95% of normal scenarios as the initial threshold, with indoor thresholds at 10%, outdoor at 15%, and transportation at 20%. After verification with 50,000 scenario data points quarterly, the confidence level of the thresholds matching the actual scenarios reaches over 95%. For extremely noisy scenarios such as concerts, the threshold can be increased to 25%, while for ultra-quiet scenarios such as libraries, it can be decreased to 8%. If the noise percentage exceeds a threshold, the initial acoustic dataset undergoes secondary processing using wavelet thresholding denoising. Specifically, the sym4 wavelet basis function is selected to decompose the signal into three levels of wavelet coefficients. Soft thresholding is applied to the high-frequency coefficients, with the threshold calculated according to the Birgé-Massart strategy and determined based on the signal-to-noise standard deviation. After retaining the effective signal coefficients, residual noise is removed through wavelet reconstruction, resulting in a clean acoustic dataset. For example, if the initial acoustic dataset has a noise percentage of 12%, exceeding the indoor 10% threshold, after sym4 wavelet thresholding denoising, residual slight electrical noise is removed, reducing the noise percentage to 5%, resulting in a clean acoustic dataset.

[0027] In step S103, spectral features are extracted from the acoustic dataset to construct an acoustic description matrix. The background volume of the environment is analyzed based on the acoustic description matrix. If the background volume exceeds a preset interference volume threshold, the interference level is divided according to the magnitude of the excess, and an interference level label is obtained.

[0028] It should be noted that, firstly, when extracting spectral features from the clean acoustic dataset to construct the acoustic description matrix, a spectral analysis tool, specifically the Short-Time Fourier Transform (STFT), was used. A window length of 256 sampling points and an overlap rate of 50% were set to extract the average amplitude, peak amplitude, and amplitude standard deviation for each frequency band as spectral features. The frequency range of the clean acoustic dataset, 200-3000Hz, was divided into five equally spaced frequency bands: 200-760Hz, 760-1320Hz, 1320-1880Hz, 1880-2440Hz, and 2440-3000Hz. Using frequency bands as rows and spectral features as columns, the corresponding feature values ​​for each frequency band were filled in to construct a two-dimensional acoustic description matrix. The average amplitude is used to calculate the fundamental sound intensity, the amplitude standard deviation is used to evaluate the stability of the sound in that frequency band (i.e., distinguishing between continuous background noise and transient sudden sounds), and the peak amplitude is used to evaluate the sharpness and impact of the noise. For example, in a pure acoustic dataset, the average amplitude in the 200-760Hz frequency band is 35dB, the peak amplitude is 42dB, and the standard deviation is 3dB. Arranged in frequency band order and feature dimension, it forms a 5-row, 3-column acoustic description matrix.

[0029] Next, when analyzing the background volume of the environment based on the acoustic description matrix, an energy integration algorithm based on sound power is used. The weights of each frequency band are set according to the sensitivity characteristics of the human ear to sounds of different frequencies (refer to the A-weighted equal loudness curve) and the energy distribution law of that frequency band in environmental noise, so as to simulate the real loudness perceived by the human ear subjectively: 0.3 for 200-760Hz, 0.25 for 760-1320Hz, 0.2 for 1320-1880Hz, 0.15 for 1880-2440Hz, and 0.1 for 2440-3000Hz. First, exponential operations are used to convert the average amplitude (logarithmic units in dB) of each frequency band in the acoustic description matrix into linear sound power values. Second, the amplitude standard deviation in the matrix is ​​introduced as a stability correction coefficient. If the standard deviation of a frequency band exceeds a preset fluctuation threshold (e.g., 5 dB), it is determined that there is non-steady-state noise such as human conversation or sudden knocking in that frequency band. Then, according to the fluctuation amplitude, the attenuation coefficient is set to automatically reduce the proportion of linear sound power values ​​in that frequency band. For every 1 dB fluctuation amplitude exceeds the threshold, the attenuation coefficient increases by 10%, with a maximum attenuation ratio not exceeding 50%. This is to eliminate the interference of non-steady-state noise on the background volume calculation and ensure that the calculation results mainly reflect the continuous environmental background. Noise floor; then, the corrected linear sound power values ​​of each frequency band are multiplied by the corresponding frequency weights and superimposed to obtain the total weighted sound power; finally, the total weighted sound power is restored to decibel value through logarithmic transformation, and sharpness compensation is performed in combination with the peak amplitude in the matrix, that is, when the high-frequency peak is too high, the gain is finely adjusted. The spectrum peak detection algorithm is used to identify whether the high-frequency peak exceeds 1.5 times the average amplitude of the frequency band. If it exceeds, the gain is finely adjusted by 0.5-2dB according to the excess ratio. The gain amplitude increases with the excess ratio but does not exceed 2dB, which conforms to the human ear's perception characteristics of high-frequency sharp sound, and finally obtains the ambient background volume that conforms to the human ear's hearing perception. The preset interference volume thresholds are set based on statistical data of normal background volume in three scenarios: indoor, outdoor, and in vehicles over the past year. The initial thresholds are determined using a percentile statistical method, taking the upper limit of background volume for 95% of normal scenarios: 28dB indoors, 35dB outdoors, and 40dB in vehicles. After validation with 50,000 scenario data points quarterly, the threshold confidence level exceeds 95%. For noisy outdoor scenarios, the thresholds can be increased by 3dB, and for quiet indoor scenarios, they can be decreased by 2dB. If the background volume exceeds the threshold, the interference level is classified according to the magnitude of the exceedance: 0-5dB is low interference, 5-10dB is medium interference, and above 10dB is high interference, resulting in an interference level label. For example, if the outdoor scene interference volume threshold is 35dB and the current background volume is 41dB, exceeding the threshold by 6dB, the interference level is classified as medium interference, resulting in a medium interference level label.

[0030] In step S104, the smoothing of the motion trajectory data, the extraction of user behavior features from the smoothed motion trajectory data, and the matching of the behavior features with a preset behavior pattern template to obtain the user's current behavior state include: The motion trajectory data is smoothed to obtain a smoothed motion trajectory; The user's behavioral features are extracted from the smooth motion trajectory, and the behavioral features include the trajectory change amplitude and trajectory change frequency; The behavioral characteristics are matched with preset behavioral pattern templates to determine the user's current behavioral state.

[0031] It should be noted that, firstly, when smoothing the motion trajectory data, a moving average filtering technique is used, with a window size set at 5 sampling points. This window size is based on the accelerometer's 10Hz sampling frequency, and 5 sampling points correspond to a duration of 0.5 seconds. This effectively removes instantaneous jitter noise without losing the true motion trend. After verification with nearly 80,000 data points of different motion states over the past year, the smoothed data achieves a confidence level of over 95% matching the actual motion trajectory. For fast-moving scenarios such as running, the window can be reduced to 3 sampling points, while for static scenarios, it can be expanded to 7 sampling points. During processing, the arithmetic mean of the motion data at each sampling point and the two points before and after it is taken, and this value replaces the original sampling point value to obtain the smoothed motion trajectory data. For example, if the original motion trajectory data shows an instantaneous peak of 0.8g due to hand tremors, after moving average filtering, this peak is smoothed to 0.3g, consistent with the trend of the surrounding data, resulting in the smoothed motion trajectory data.

[0032] Subsequently, when extracting user behavioral features from the smoothed motion trajectory data, the system first analyzes the direction of the motion trajectory based on the instantaneous velocity vector obtained through quadratic integration in step S101. Specifically, the system calculates the azimuth angle (heading angle) of the instantaneous velocity vector in the horizontal coordinate system (XY plane) in real time and defines it as the current trajectory motion direction. The trajectory change amplitude is obtained by calculating the difference between the maximum and minimum values ​​of the degravity-free composite acceleration modulus within 1 second; the trajectory change frequency is obtained by counting the number of times the azimuth angle of the above trajectory motion direction changes significantly (change angle exceeding 30°) within 1 second. Both together constitute the user's behavioral features. For example, from the smoothed motion trajectory data, the maximum acceleration value is 0.7g and the minimum value is 0.2g within 1 second, and the trajectory change amplitude is 0.5g; at the same time, the number of times the velocity vector azimuth angle changes by more than 30° within 1 second is counted as 1, and the trajectory change frequency is 1.0Hz. These two sets of behavioral features are extracted.

[0033] Finally, when matching behavioral characteristics with preset behavioral pattern templates, the behavioral pattern templates are built based on a large-scale, full-scenario motion sample library. The sample library covers 100,000 sets of valid data from different age groups and activity scenarios. It also supports users to adaptively update based on their own motion characteristics during actual use, with an update cycle of 30 days. Each update only retains the most recent 90 days of valid motion data to ensure that the templates continuously match users' behavioral habits. The preset behavioral pattern templates cover five typical behaviors: "stationary," "walking," "running," "cycling," and "commuting (by car / subway)." Each template includes the characteristic distribution range of trajectory change amplitude and frequency (i.e., the high probability interval). For example, the walking template has an amplitude of 0.3-0.6g and a frequency of 0.5-1.2Hz; the running template has an amplitude of more than 0.6g and a frequency of more than 1.2Hz; the cycling template has an amplitude of 0.2-0.5g (mainly affected by road bumps) and a frequency of 0.2-0.8Hz (few changes in direction); and the commuting template has an amplitude of 0.1-0.3g (low-frequency vibration) and a frequency of less than 0.1Hz (stable trajectory). For this type of matching based on numerical range features, a fuzzy membership matching algorithm is adopted. The system constructs a two-dimensional Gaussian membership function for each behavior template, the specific form of which is μ(x,y)=exp[-((x-μ1)] 2 / (2σ1 2 ))-((y-μ2) 2 / (2σ2 2 The formula is defined as follows: x is the extracted trajectory change amplitude, y is the extracted trajectory change frequency, μ1 is the midpoint of the template amplitude range, μ2 is the midpoint of the template frequency range, σ1 is 1 / 6 of the template amplitude range, and σ2 is 1 / 6 of the template frequency range. This formula can accurately quantify the fit between behavioral features and templates. The extracted behavioral features (amplitude and frequency) are used as input variables in the function to calculate the probability score (i.e., membership degree, range 0-1) of the feature vector falling within the range of each behavioral template. A preset membership degree threshold of 0.8 is used. If the output membership degree of a behavioral template exceeds this threshold, it is determined to be the corresponding behavioral state. If multiple templates have high membership degrees (e.g., overlapping cycling and walking features), acoustic features (e.g., wind noise) are introduced for auxiliary weighted judgment. For example, if the extracted behavioral features are amplitude 0.5g and frequency 1.0Hz, its Gaussian membership degree to the "walking" template is calculated to be 0.92, exceeding the threshold of 0.8, thus the walking template is determined as the user's current behavioral state.

[0034] In step S105, if the current behavior state and the interference level label reach the preset noise reduction mode switching condition, then the noise reduction mode switching is triggered, the intensity parameters and activation sequence of the noise reduction mode are set, and an environmental control strategy is obtained, including: The current behavior state and the interference level label are fused to construct a comprehensive environmental feature matrix, and the target behavior state and target interference level are extracted from the comprehensive environmental feature matrix. If the target behavior state and the target interference level meet the preset noise reduction mode switching conditions, then the noise reduction mode switching is triggered. After the noise reduction mode switching is triggered, the intensity parameter of the noise reduction mode is set according to the magnitude by which the background volume exceeds the interference volume threshold, and then the signal start-up timing is set to obtain the environmental control strategy.

[0035] It should be noted that, firstly, when fusing the current behavior state and interference level labels to construct the comprehensive environmental feature matrix, a feature splicing method is used. First, numerical labels are assigned to the current behavior state and interference level labels: stationary corresponds to 1, walking to 2, running to 3, cycling to 4, and commuting to 5. These labels correspond one-to-one with the five preset behavior pattern templates, while also supporting user-defined labels later; low interference corresponds to 1, medium interference to 2, and high interference to 3.

[0036] Next, the environmental and behavioral dimensions of the matrix are determined. The environmental dimension includes not only the interference level identifier but also the amplitude of background volume exceeding the threshold and the signal fluctuation variance, reflecting the absolute intensity and stability of the noise. The behavioral dimension includes not only the behavioral pattern identifier but also the mean of motion amplitude and the mean of motion frequency, reflecting the intensity and rhythm of the action. After filling the matrix with the numerical identifiers and the above quantitative feature data according to the correspondence, the system calculates the consistency using the Pearson correlation coefficient algorithm. For example, taking the behavioral dimension as an example, the correlation coefficient between the feature interval corresponding to the behavioral pattern identifier and the mean of motion amplitude and the mean of motion frequency is calculated. Similarly, the correlation coefficient between the interference level identifier and the amplitude of background volume exceeding the threshold and the signal fluctuation variance is calculated. The correlation coefficient judgment threshold is set to 0.7. This threshold is determined through training with 100,000 sets of fused data and can be finely adjusted in the range of 0.6-0.8 for different scenarios. If the correlation coefficient is higher than the threshold, the consistency is judged to be up to standard; if it is lower than the threshold, the consistency is considered low. At this time, the system will call the behavior recognition module and the interference label generation module again to extract features and match labels until the consistency is up to standard. Then, the verified and confirmed target behavior state and target interference level are extracted from the matrix. The target state here refers to directly using the numerical identifier that highly matches the quantitative features from the previous sub-step as the target value after consistency is achieved, rather than resetting the value. For example, if the current behavior state is determined to be running, corresponding to identifier 3, and the interference level label is high, the corresponding identifier 3 matrix environment dimension records background volume exceeding the threshold by 8dB and signal fluctuation variance of 0.8, and behavior dimension records average motion amplitude of 0.7g and average motion frequency of 1.3Hz. Calculated using Pearson correlation coefficients, the correlation coefficient for the behavior dimension is 0.85, and the correlation coefficient for the interference dimension is 0.82, both higher than the threshold of 0.7, thus meeting the consistency standard. Finally, the target behavior state 3 and target interference level 3 are extracted, consistent with the original identifier and conforming to the actual scene characteristics. As another example, if the behavior identifier in a certain scene is cycling 4, but the average motion amplitude is only 0.15g, which deviates significantly from the cycling template feature range, the calculated correlation coefficient is 0.55, failing the consistency standard. The system will re-extract the motion features and match them, ultimately determining it as commuting 5. After recalculating the correlation coefficient to 0.78, the target behavior state 5 is determined.

[0037] Subsequently, when determining whether the target behavior status and target interference level meet the preset noise reduction mode switching conditions, the switching conditions are preset to a target behavior status indicator greater than 3 and a target interference level indicator of 3. The determination of behavior status indicator 3 is based on the experience that low-motion scenes do not require excessive noise reduction processing. Interference level indicator 3 corresponds to a background volume exceeding the outdoor interference threshold by more than 10dB. After verification with 40,000 high-interference scene data, the confidence level of the level determination reaches more than 95%. If both the target behavior status indicator and the target interference level indicator meet the preset values, the noise reduction mode switching is triggered. For example, if the extracted target behavior status indicator 3 and target interference level indicator 3 meet the switching conditions, the noise reduction mode switching is triggered.

[0038] Finally, after the switch is triggered, the intensity parameter of the noise reduction mode is set by directly calling the range of background volume exceeding the interference volume threshold recorded in the matrix environment dimension. Exceeding by 0-5dB corresponds to light noise reduction (e.g., 15dB depth), exceeding by 5-10dB corresponds to medium noise reduction (e.g., 22dB depth), and exceeding by more than 10dB corresponds to deep noise reduction (e.g., 28dB depth). The signal start-up timing is then set to a delay of 0.3 seconds. This delay time is set based on experiments on the human ear's perception threshold for sudden sound changes and is calibrated in combination with the signal processing response speed of the headphone hardware. Through listening tests of 500 users of different ages, it can effectively avoid the abruptness of the switch without affecting the timeliness of the response. In outdoor fast-moving scenarios, it can be shortened to 0.2 seconds, and in indoor static scenarios, it can be extended to 0.4 seconds, thus obtaining the environmental control strategy. For example, when a user walks from a quiet office to an outdoor street, and the background volume exceeds the threshold by 7dB, triggering moderate noise reduction, the activation timing is delayed by 0.3 seconds. During the switching process, the user does not perceive any sudden change in sound, while street traffic noise is quickly suppressed. If the user triggers the switch while running outdoors, the activation timing is automatically shortened to 0.2 seconds to ensure that the noise reduction adjustment is synchronized with the environmental changes.

[0039] In step S106, generating environmental adaptation parameters to suit the current environment according to the environmental control strategy, and adjusting the volume according to the environmental adaptation parameters to obtain a volume adjustment value, includes: Based on the environmental control strategy, environmental adaptation parameters are generated to suit the current environment, including noise reduction intensity and volume adjustment range. The volume is initially adjusted based on the environmental adaptation parameters to obtain an initial volume adjustment value; If the initial volume adjustment value exceeds the preset volume limit threshold, the initial volume adjustment value is corrected to obtain an optimized volume adjustment value.

[0040] It should be noted that, firstly, when generating environmental adaptation parameters to suit the current environment based on the environmental control strategy, the system adopts a mechanism of parallel generation of noise reduction and volume control through dual channels. The noise reduction intensity in the environmental adaptation parameters directly uses the intensity value already set in the environmental control strategy, while the volume adjustment amplitude is dynamically calculated using a psychoacoustic masking effect model. Specifically, the psychoacoustic masking effect model adopts the Early model. This model, based on the physiological characteristics of the human auditory system, can quantify the mutual masking rules between sounds of different frequencies and intensities; that is, strong sound signals reduce the human ear's sensitivity to weak sound signals in the same or adjacent frequency bands. The core parameters of this model include 24 critical frequency bands based on the Bark scale, a masking threshold function matrix characterizing the relationship between masking sound intensity and frequency difference, and the integrated weighting coefficients of each frequency band energy for the overall masking effect. The model is trained based on the system's auditory experimental data. In an anechoic chamber, masking noises of different characteristics are played, and an adaptive method is used to measure the masking thresholds of subjects for pure tones at each frequency, constructing a large-scale dataset. Then, a nonlinear regression algorithm is used to fit this dataset, optimizing the coefficients in the masking function to minimize the error between the model's predicted values ​​and the average measured thresholds of the population. Finally, the preliminary model is integrated with a typical environmental noise spectrum library, and the integration weights for specific frequency bands are fine-tuned according to the spectral characteristics of different noises, thereby ensuring the model's computational accuracy and robustness in real-world scenarios. The system can collect environmental noise in real time and calculate its masking threshold curve, while simultaneously analyzing the energy spectrum of the currently played audio content. By comparing the two, the signal-to-noise ratio gap of the audio being submerged by noise in each frequency band is determined, thereby calculating the minimum target gain value that can restore auditory clarity without producing a harsh feeling; this value is the volume adjustment amplitude. For example, in a subway car scenario, the masking effect model detects that low-frequency road noise severely masks the bass band of the music and calculates that a 6dB low-frequency gain compensation is needed, thereby generating environmental adaptation parameters containing specific gain values. For example, in a coffee shop scenario, the model identifies that mid-frequency human voice noise masks the core frequency band of the speech audio, and calculates a 2dB mid-frequency gain based on the trained parameters, which can ensure that the speech is clear and not abrupt.

[0041] Next, when initially adjusting the volume based on the environmental adaptation parameters, the system adds the calculated volume adjustment magnitude as a digital gain offset to the headphone's current base volume. Since dB is a logarithmic unit, this process is implemented in the digital signal processor by amplifying the audio signal amplitude logarithmically, ensuring that the perceived loudness increase matches the calculated value, thus obtaining the initial volume adjustment value. For example, if the headphone's current base volume is set to 60dB, and the environmental adaptation parameters indicate a need for 4dB gain compensation, the system will add these two values ​​together to obtain an initial volume adjustment value of 64dB.

[0042] Finally, if the initial volume adjustment value exceeds the preset volume limit threshold, which is set at 85dB sound pressure level according to the safe listening standards published by relevant organizations, and verified by long-term hearing health tracking data, this limit can effectively prevent permanent hearing damage. When the initial volume adjustment value is detected to exceed this safety threshold, the system will immediately activate the dynamic range compression algorithm or hard limiter to flexibly limit the signal energy exceeding the limit, forcibly clamping the final output volume within the safe threshold range, resulting in an optimized volume adjustment value. For example, next to an extremely noisy construction site, if the calculated initial volume adjustment value reaches 92dB, exceeding the 85dB safety threshold, the system will automatically correct it to 85dB, outputting an optimized volume that is both clear and safe.

[0043] In step S107, converting the volume adjustment value into a voltage and current signal that the headphones can execute to obtain the headphone output configuration includes: The signal transmission rate of the headphones was measured. Based on the voltage and current range of the current headphone hardware, the volume adjustment value is converted into a corresponding voltage and current signal to obtain the initial adjustment signal; If the initial adjustment signal exceeds a preset signal range threshold, the initial adjustment signal is optimized to obtain an optimized adjustment signal. By integrating the optimized adjustment signal and the signal transmission rate, the output configuration of the headphones is obtained.

[0044] It's important to note that, firstly, when acquiring the headphone's signal transmission rate, a standard embedded system clock frequency detection technique is used. This technique primarily confirms the communication handshake speed between the main control chip and the audio amplifier chip. The system reads the preset I2C or SPI bus clock frequency from the hardware configuration file. This frequency determines the writing speed of volume control commands. Typically, the standard mode is set to 100kHz to ensure communication stability under extremely low power consumption. However, in scenarios requiring high-frequency dynamic adjustment of noise reduction parameters, the system automatically requests to switch the rate to a fast mode of 400kHz to reduce control latency. For example, if the system detects a high-interference outdoor environment requiring rapid response, it uses the bus handshake protocol to confirm the signal transmission rate from the default 100kHz to a high-speed 400kHz.

[0045] Next, when converting the optimized volume adjustment value into corresponding voltage and current signals based on the voltage and current range of the current headphone hardware, the system employs digital gain mapping technology. This is because the voltage and current output inside the headphone is controlled by digital register values. The system pre-establishes a linear mapping table between volume decibel values ​​and hardware drive register values. This table is set according to the gain step characteristics of the hardware amplifier, quantizing the abstract volume adjustment value into hexadecimal register control codes that can directly drive the hardware circuit to output specific voltage and current. Each register control code strictly corresponds to a specific effective value of output voltage and current driving capability, thereby realizing the digital translation of "voltage and current signals". For example, if the optimized volume adjustment value is -12 dB, according to the gain mapping table in the chip datasheet, this decibel value corresponds to an output drive voltage of 0.8 volts. The system converts this into the corresponding hardware execution code 0x4A as the initial adjustment signal.

[0046] Subsequently, if the initial adjustment signal exceeds a preset signal range threshold, the signal is optimized. The preset signal range threshold corresponds to the digital full-scale gain value of the audio amplifier chip, which represents the maximum undistorted power limit that can be output under the hardware supply voltage. If the calculated register control code exceeds the chip's maximum allowed register address range or maximum gain limit, the system will activate overflow protection logic to forcibly clamp the control code to the maximum allowed value, preventing hardware clipping distortion or coil overheating damage due to drive signal overload, thereby obtaining an optimized adjustment signal. For example, if the calculated initial adjustment signal corresponds to code 0xFF, which exceeds the hardware-set maximum safe gain limit of 0xF0, the system will automatically correct the signal to 0xF0, ensuring that the output voltage and current are always controlled within the safe range.

[0047] Finally, when integrating and optimizing the signals and signal transmission rate to obtain the headphone's output configuration, the system encapsulates it according to the data frame format of the hardware communication protocol. The system fills the data bits with the optimized signal containing the target gain, writes the confirmed signal transmission rate into the clock control bits, and combines this with the device's physical address to construct a complete control command frame. This output configuration is no longer a simple list of values, but a standard binary bitstream that the hardware can directly parse and execute, ensuring that the control intent can be correctly recognized by the headphone hardware and converted into physical acoustic output. For example, the system integrates the optimized gain code 0xF0 with a transmission rate of 400kHz, encapsulating it into a standard I2C control frame containing a start bit, device address 0x1A, write command, and data bits, as the final headphone output configuration.

[0048] In step S108, generating a corresponding control signal based on the output configuration and applying it to the headphone hardware, monitoring the current hardware response time, optimizing the output timing based on the response time, and obtaining a driving signal adapted to the scene include: The corresponding control signal is generated according to the output configuration and applied to the headphone hardware. The actual response time of the current headphone hardware is monitored and compared with the preset response time to obtain the response delay. If the response delay exceeds a preset delay threshold, the output timing is optimized, and the response delay is monitored again until the response delay is less than or equal to the delay threshold, thus obtaining a driving signal adapted to the scene.

[0049] It should be noted that, firstly, when applying the control signals corresponding to the output configuration to the headphone hardware, a digital control bus protocol commonly used in embedded systems (such as I2C or SPI bus technology) is employed. Specifically, the main control unit (MCU) encapsulates the voltage and current parameters and mode switching instructions determined in step S107 into a digital command frame containing the device address, register address, and configuration values. This frame is then written to the target register of the audio codec (Codec) or power management unit (PMU) via the control bus, thereby precisely driving the hardware to perform the corresponding voltage adjustment or mode switching. During this process, monitoring the current hardware response time no longer relies on fuzzy estimation but instead employs a hardware interrupt feedback mechanism. That is, a microsecond-level timer is started simultaneously with the MCU sending the instruction, and the timer stops when the hardware completes the execution and returns an interrupt signal or handshake signal indicating operation completion (ACK / Done). The time difference between the two is the actual hardware response delay. For example, the main control unit sends a volume adjustment command through the I2C bus at time t1 and receives an execution completion interrupt signal from the hardware at time t2. The system then calculates the difference between the two, t2-t1, to accurately determine the actual response delay of the current hardware (e.g., 3ms), providing measured data support for subsequent timing optimization.

[0050] Finally, if the response latency exceeds the preset latency threshold, the output timing needs to be optimized. The preset latency threshold is set based on user auditory latency perception experimental data, typically 5ms. Beyond this threshold, users will clearly perceive a lag in volume or noise reduction adjustments. Based on 60,000 user experience tests, user satisfaction with the timeliness of adjustments at this threshold is over 94%, with a confidence level of over 95%. For outdoor fast-moving scenarios (requiring real-time adaptation to ambient noise), the threshold can be lowered to 3ms, while for indoor static scenarios, it can be raised to 7ms. When optimizing the output timing, a control signal is sent 2ms in advance each time. After sending, the response latency is monitored again using a hardware response timer. This process of sending in advance and monitoring the latency is repeated until the response latency is less than or equal to the latency threshold. The control signal at this point is the driving signal adapted to the scene. For example, if the response latency of 7ms exceeds the 5ms threshold, sending the control signal 2ms in advance and then monitoring the response latency again (4ms, less than the threshold) yields a driving signal adapted to the current outdoor scene.

[0051] In summary, this invention discloses an automated control method for Bluetooth headsets, comprising: The system acquires raw sound signals from the external environment and user motion trajectory data; performs frequency domain transformation and noise reduction on the raw sound signals to obtain a clean acoustic dataset; extracts spectral features from the acoustic dataset, constructs an acoustic description matrix, analyzes the background volume of the environment based on the acoustic description matrix, and if the background volume exceeds a preset interference volume threshold, classifies the interference level according to the magnitude of the exceedance to obtain an interference level label; smooths the motion trajectory data, extracts user behavior features from the smoothed data, matches the behavior features with a preset behavior pattern template to obtain the user's current behavior state; if the current... If the preceding behavior state and the interference level label reach the preset noise cancellation mode switching conditions, the noise cancellation mode switching is triggered. The intensity parameters and activation sequence of the noise cancellation mode are set to obtain an environmental control strategy. Based on the environmental control strategy, environmental adaptation parameters are generated to suit the current environment. The volume is adjusted according to these parameters to obtain a volume adjustment value. This volume adjustment value is converted into a voltage and current signal that the headphones can execute, obtaining the headphone's output configuration. A corresponding control signal is generated based on the output configuration and applied to the headphone hardware. The response time of the current hardware is monitored, and the output timing is optimized based on the response time to obtain a driving signal adapted to the scene. This achieves intelligent adaptive control of the Bluetooth headphones in complex environments and dynamic user states, meeting users' high-quality needs for precise noise cancellation and scene-specific volume adjustment.

[0052] Reference Figure 2 The second embodiment of the present invention provides an automated control system for Bluetooth headsets, comprising: The data acquisition module is used to acquire raw sound signals from the external environment and the user's motion trajectory data; An acoustic processing module is used to perform frequency domain conversion and noise reduction on the original sound signal to obtain a clean acoustic dataset. The interference label generation module is used to extract spectral features from the acoustic dataset, construct an acoustic description matrix, analyze the background volume of the environment based on the acoustic description matrix, and if the background volume exceeds a preset interference volume threshold, the interference level is divided according to the magnitude of the exceedance to obtain an interference level label. The behavior recognition module is used to smooth the motion trajectory data, extract the user's behavior features from the smoothed data, and match the behavior features with a preset behavior pattern template to obtain the user's current behavior state. The strategy generation module is used to trigger noise reduction mode switching if the current behavior state and the interference level label reach the preset noise reduction mode switching conditions, set the intensity parameters and start-up sequence of the noise reduction mode, and obtain the environmental control strategy. The volume adjustment module is used to generate environmental adaptation parameters adapted to the current environment according to the environmental control strategy, and adjust the volume according to the environmental adaptation parameters to obtain the volume adjustment value; The signal conversion module is used to convert the volume adjustment value into a voltage and current signal that the headphones can execute, thereby obtaining the output configuration of the headphones; The driver optimization module is used to generate corresponding control signals according to the output configuration and apply them to the headphone hardware, monitor the current response time of the hardware, optimize the output timing according to the response time, and obtain a driver signal adapted to the scene.

[0053] It should be noted that the Bluetooth headset automated control system provided in this embodiment of the invention is used to execute all the process steps of the Bluetooth headset automated control method in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.

[0054] This invention also provides an electronic device. The electronic device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a hardware driver. When the processor executes the computer program, it implements the steps described in the various Bluetooth headset automation control method embodiments above, for example... Figure 1 The step S101 shown. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the above system embodiments, such as the driver optimization module.

[0055] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.

[0056] The electronic device may be a desktop computer, laptop, handheld computer, or smart tablet, etc. The electronic device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. It may include more or fewer components than described above, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.

[0057] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the electronic device, connecting all parts of the electronic device via various interfaces and lines.

[0058] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0059] If the modules / units integrated into the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or system capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0060] It should be noted that the system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the system embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.

[0061] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. An automated control method for Bluetooth headsets, characterized in that, include: Acquire raw sound signals from the external environment and user motion trajectory data; The original sound signal is subjected to frequency domain transformation and noise reduction processing to obtain a clean acoustic dataset; Spectral features are extracted from the acoustic dataset to construct an acoustic description matrix. The background volume of the environment is analyzed based on the acoustic description matrix. If the background volume exceeds a preset interference volume threshold, the interference level is divided according to the magnitude of the exceedance to obtain an interference level label. The motion trajectory data is smoothed, and the user's behavioral features are extracted from the smoothed data. The behavioral features are then matched with a preset behavioral pattern template to obtain the user's current behavioral state. If the current behavior state and the interference level label reach the preset noise reduction mode switching conditions, the noise reduction mode switching is triggered, the intensity parameters and start-up sequence of the noise reduction mode are set, and the environmental control strategy is obtained. Based on the environmental control strategy, environmental adaptation parameters adapted to the current environment are generated, and the volume is adjusted according to the environmental adaptation parameters to obtain the volume adjustment value. The volume adjustment value is converted into a voltage or current signal that the headphones can execute, thus obtaining the headphone's output configuration; The corresponding control signal is generated according to the output configuration and applied to the headphone hardware. The response time of the current hardware is monitored, and the output timing is optimized according to the response time to obtain a driving signal adapted to the scene.

2. The automated control method for Bluetooth headsets according to claim 1, characterized in that, The acquisition of raw sound signals from the external environment and user motion trajectory data includes: It collects raw sound signals from the external environment through a built-in microphone; Accelerometers collect the user's acceleration data, and the acceleration data is integrated to obtain the user's motion trajectory data.

3. The automated control method for Bluetooth headsets according to claim 1, characterized in that, The process of frequency domain transformation and noise reduction of the original sound signal to obtain a clean acoustic dataset includes: The original sound signal is frequency domain transformed to extract the peak distribution and amplitude variation range of the signal's spectrum, and the noise interference components in the peak distribution and amplitude variation range are separated to obtain the initial acoustic dataset; If the noise percentage in the initial acoustic dataset exceeds a preset noise percentage threshold, then the initial acoustic dataset undergoes secondary noise reduction processing to obtain a clean acoustic dataset.

4. The automated control method for Bluetooth headsets according to claim 1, characterized in that, The process of smoothing the motion trajectory data, extracting user behavior features from the smoothed motion trajectory data, and matching the behavior features with a preset behavior pattern template to obtain the user's current behavior state includes: The motion trajectory data is smoothed to obtain a smoothed motion trajectory; The user's behavioral features are extracted from the smooth motion trajectory, and the behavioral features include the trajectory change amplitude and trajectory change frequency; The behavioral characteristics are matched with preset behavioral pattern templates to determine the user's current behavioral state.

5. The automated control method for Bluetooth headsets according to claim 1, characterized in that, If the current behavior state and the interference level label reach the preset noise reduction mode switching conditions, then the noise reduction mode switching is triggered, the intensity parameters and activation sequence of the noise reduction mode are set, and an environmental control strategy is obtained, including: The current behavior state and the interference level label are fused to construct a comprehensive environmental feature matrix, and the target behavior state and target interference level are extracted from the comprehensive environmental feature matrix. If the target behavior state and the target interference level meet the preset noise reduction mode switching conditions, then the noise reduction mode switching is triggered. After the noise reduction mode switching is triggered, the intensity parameter of the noise reduction mode is set according to the magnitude by which the background volume exceeds the interference volume threshold, and then the signal start-up timing is set to obtain the environmental control strategy.

6. The automated control method for Bluetooth headsets according to claim 1, characterized in that, The step of generating environmental adaptation parameters adapted to the current environment according to the environmental control strategy, and adjusting the volume according to the environmental adaptation parameters to obtain the volume adjustment value includes: Based on the environmental control strategy, environmental adaptation parameters are generated to suit the current environment, including noise reduction intensity and volume adjustment range. The volume is initially adjusted based on the environmental adaptation parameters to obtain an initial volume adjustment value; If the initial volume adjustment value exceeds the preset volume limit threshold, the initial volume adjustment value is corrected to obtain an optimized volume adjustment value.

7. The automated control method for Bluetooth headsets according to claim 1, characterized in that, The step of converting the volume adjustment value into a voltage or current signal that the headphones can execute, to obtain the headphone's output configuration, includes: The signal transmission rate of the headphones was measured. Based on the voltage and current range of the current headphone hardware, the volume adjustment value is converted into a corresponding voltage and current signal to obtain the initial adjustment signal; If the initial adjustment signal exceeds a preset signal range threshold, the initial adjustment signal is optimized to obtain an optimized adjustment signal. By integrating the optimized adjustment signal and the signal transmission rate, the output configuration of the headphones is obtained.

8. The automated control method for Bluetooth headsets according to claim 1, characterized in that, The process of generating corresponding control signals based on the output configuration and applying them to the headphone hardware, monitoring the current hardware response time, optimizing the output timing based on the response time, and obtaining a driving signal adapted to the scene includes: The corresponding control signal is generated according to the output configuration and applied to the headphone hardware. The actual response time of the current headphone hardware is monitored and compared with the preset response time to obtain the response delay. If the response delay exceeds a preset delay threshold, the output timing is optimized, and the response delay is monitored again until the response delay is less than or equal to the delay threshold, thus obtaining a driving signal adapted to the scene.

9. An automated control system for Bluetooth headsets, characterized in that, include: The data acquisition module is used to acquire raw sound signals from the external environment and the user's motion trajectory data; An acoustic processing module is used to perform frequency domain conversion and noise reduction on the original sound signal to obtain a clean acoustic dataset. The interference label generation module is used to extract spectral features from the acoustic dataset, construct an acoustic description matrix, analyze the background volume of the environment based on the acoustic description matrix, and if the background volume exceeds a preset interference volume threshold, the interference level is divided according to the magnitude of the exceedance to obtain an interference level label. The behavior recognition module is used to smooth the motion trajectory data, extract the user's behavior features from the smoothed data, and match the behavior features with a preset behavior pattern template to obtain the user's current behavior state. The strategy generation module is used to trigger noise reduction mode switching if the current behavior state and the interference level label reach the preset noise reduction mode switching conditions, set the intensity parameters and start-up sequence of the noise reduction mode, and obtain the environmental control strategy. The volume adjustment module is used to generate environmental adaptation parameters adapted to the current environment according to the environmental control strategy, and adjust the volume according to the environmental adaptation parameters to obtain the volume adjustment value; The signal conversion module is used to convert the volume adjustment value into a voltage and current signal that the headphones can execute, thereby obtaining the output configuration of the headphones; The driver optimization module is used to generate corresponding control signals according to the output configuration and apply them to the headphone hardware, monitor the current response time of the hardware, optimize the output timing according to the response time, and obtain a driver signal adapted to the scene.