Method, system and device for detecting state of Bluetooth headset and Bluetooth headset

By obtaining the electrical parameters of Bluetooth headsets for state calculations and using pre-trained models to adjust the connection channel, the problem of low connection efficiency of Bluetooth headsets in the prior art is solved, and the preset and sorting of the connection channels are realized, which improves connection stability and efficiency.

CN119545281AInactive Publication Date: 2025-02-28SHENZHEN SHIKE JINHUA ELECTRONICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411773862.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-02-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing Bluetooth headset connection method is inefficient and cannot achieve the preset of the connected channel and the sorting of channel search results.

Method used

By obtaining the electrical parameters of the left and right earphones, state calculations are performed to evaluate the Bluetooth connection status, and adjust the Bluetooth pairing channel to achieve preset and sorting of the connected channels using a pre-trained model.

Benefits of technology

Improves the stability and efficiency of Bluetooth headset connection, reduces the number of scans during connection, speeds up the connection speed, optimizes channel management, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119545281A_ABST
    Figure CN119545281A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of wireless communication, and discloses a state detection method, system and device for a Bluetooth headset and the Bluetooth headset, and the method comprises the steps: obtaining electrical parameters of the headset, carrying out first state calculation according to the electrical parameters to obtain Bluetooth state data of the headset, and carrying out second state calculation according to the data to obtain a Bluetooth connection state of the headset. Inputting the Bluetooth connection state of the earphone into a pre-trained connection state detection model, comparing the Bluetooth connection state with a preset threshold value in the model, and if the connection state is smaller than the preset threshold value, ending state detection and successfully connecting; and if the connection state is greater than the preset threshold, adjusting the Bluetooth pairing channel of the earphone, and re-executing the acquisition of the electrical parameters of the earphone. According to the method, the scanning times during connection can be reduced, and the connection channels can be preset and sorted, so that the connection stability of the Bluetooth headset and the user experience are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of wireless communication technology, and in particular to a method, system, device and Bluetooth headset state detection method. Background Art

[0002] At present, with the rapid development of wireless communication technology, Bluetooth technology has been widely used in portable devices due to its advantages of long transmission distance, fast speed, low cost, wide range of supported devices, high security, etc. In particular, Bluetooth headsets and Bluetooth speakers, as representatives of wireless audio transmission, are widely favored by the market.

[0003] In a prior art, when connecting a Bluetooth headset, the Bluetooth connection method often requires multiple scans to be successful, which is inefficient.

[0004] The prior art has the problem that it is not possible to preset the connection channels and does not have the function of sorting the searched channels. Summary of the invention

[0005] The present invention provides a method, system, device and Bluetooth headset for detecting the state of a Bluetooth headset, so as to realize the problem of presetting connection channels and sorting the searched channels.

[0006] In a first aspect, in order to solve the above technical problem, the present invention provides a method for detecting the state of a Bluetooth headset, comprising: Obtain electrical parameters of the left earphone and the right earphone; Performing a first state calculation according to the electrical parameters of the left earphone and the electrical parameters of the right earphone to obtain Bluetooth state data of the left earphone and the Bluetooth state data of the right earphone; Performing a second state calculation according to the Bluetooth state data of the left earphone and the Bluetooth state data of the right earphone to obtain the Bluetooth connection state of the left earphone and the Bluetooth connection state of the right earphone; The Bluetooth connection status of the left earphone and the Bluetooth connection status of the right earphone are input into a pre-trained connection status detection model and compared with the preset threshold in the model. If the Bluetooth connection status of the left earphone and the Bluetooth connection status of the right earphone are both less than the preset threshold, the status detection is ended and the connection is successful; if the Bluetooth connection status of the left earphone and the Bluetooth connection status of the right earphone are both greater than the preset threshold, the Bluetooth pairing channel of the left earphone and the Bluetooth pairing channel of the right earphone are adjusted, and the acquisition of the electrical parameters of the left earphone and the electrical parameters of the right earphone is re-executed.

[0007] In a preferred embodiment, the left earphone electrical parameters include the left earphone battery level and the left earphone microcontroller operating voltage; The right earphone electrical parameters include the right earphone battery level and the right earphone microcontroller operating voltage.

[0008] In a preferred embodiment, the step of obtaining the electrical parameters of the left earphone and the right earphone includes: Obtaining a left earphone battery voltage analog signal and a right earphone battery voltage analog signal, converting the left earphone battery voltage analog signal and the right earphone battery voltage analog signal into a left earphone battery voltage digital signal and a right earphone battery voltage digital signal based on an analog-to-digital converter, and obtaining a left earphone battery voltage value and a right earphone battery voltage value through calculation and processing by a microprocessor; Performing curve fitting based on the left earphone battery voltage value and the right earphone battery voltage value and the corresponding standard voltage value of the left earphone battery and the standard voltage value of the right earphone battery to obtain the left earphone battery level and the right earphone battery level; Acquire analog signals of operating voltages of left and right earphone microcontrollers, convert them based on analog-to-digital converters, convert the analog signals of operating voltages of left and right earphone microcontrollers into digital signals of operating voltages of left and right earphone microcontrollers, and calculate and process them through a microprocessor to obtain operating voltage values ​​of left and right earphone microcontrollers; Based on the comparison and data fitting of the left and right earphone microcontroller operating voltage values ​​and the corresponding microcontroller standard voltage values, the left earphone microcontroller operating voltage and the right earphone microcontroller operating voltage are obtained.

[0009] In a preferred embodiment, performing a first state calculation according to the electrical parameters of the left earphone and the electrical parameters of the right earphone to obtain Bluetooth state data of the left and right earphones includes: Determining the magnitude relationship between the left earphone electrical parameter and the right earphone electrical parameter according to the left earphone electrical parameter and the right earphone electrical parameter; If IL<IR, then DR=0, DL=1 / (IL K1); If IL=IR, then DR=DL=0.5 / (IL K2); If IL>IR, then DR=0.5 / (IR K2), DL = 1 / (IR K1); Among them, IR is the electrical parameter of the right ear, IL is the electrical parameter of the left ear, DR is the status data of the right ear, DL is the status data of the left ear, and K1 and K2 are the gain coefficients of the left and right earphones respectively.

[0010] In a preferred embodiment, performing a second state calculation according to the Bluetooth state data of the left and right earphones to obtain the Bluetooth connection states of the left and right earphones includes: The formula for calculating the second state is: PL = -10 lg(10 DL) PR = -10 lg(10 DR) Among them, PL is the Bluetooth connection status of the left earphone, PR is the Bluetooth connection status of the right earphone, DL is the Bluetooth status data of the left earphone, and DR is the Bluetooth status data of the right earphone.

[0011] In a preferred embodiment, adjusting the Bluetooth pairing channels of the left and right earphones includes: Perform real-time connection status detection on the Bluetooth headset, compare and analyze the detected Bluetooth headset connection status with a preset performance threshold, and when the Bluetooth connection status of the left and right headsets is less than the preset threshold, set the current connection channel as the pairing channel of the left and right headsets; When the Bluetooth connection status of the left and right earphones are both greater than a preset threshold, the connection channels of the Bluetooth earphones are reordered.

[0012] In a preferred embodiment, the reordering of the connection channels of the Bluetooth headset includes: According to each connection channel of the left and right earphones, check whether the connection channel exists in the preset channel list; if so, keep the current order of the connection channel in the list; if not, record the position information of the connection channel in the preset channel list; According to the position information, the connection channels that do not exist in the preset channel list are reordered in the order of the position information in the preset channel list.

[0013] In a second aspect, the present invention provides a Bluetooth headset status detection system, comprising: A parameter acquisition module, used to acquire electrical parameters of the left earphone and the right earphone; A state data module, used for performing a first state calculation according to the electrical parameters of the left earphone and the electrical parameters of the right earphone to obtain Bluetooth state data of the left earphone and the right earphone; A connection status module for performing a second state calculation based on the Bluetooth status data of the left and right earphones to obtain the Bluetooth connection status of the left and right earphones; The result output module inputs the Bluetooth connection status of the left and right earphones into a pre-trained connection status detection model and compares it with the preset threshold in the model. If the Bluetooth connection status of the left and right earphones is less than the preset threshold, the status detection ends and the connection is successful; if the Bluetooth connection status of the left and right earphones is greater than the preset threshold, the Bluetooth pairing channels of the left and right earphones are adjusted, and the acquisition of the electrical parameters of the left earphone and the electrical parameters of the right earphone is re-executed.

[0014] In a third aspect, the present invention further provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the method for detecting the status of a Bluetooth headset as described in any one of the above is implemented.

[0015] In a fourth aspect, the present invention further provides a Bluetooth headset, wherein the Bluetooth headset comprises the Bluetooth headset status detection system as described above.

[0016] Compared with the prior art, the present invention has the following beneficial effects: The present invention is a method, system, device and Bluetooth headset for detecting the state of a Bluetooth headset, which is intended to optimize the connection process of a Bluetooth headset. The scheme first obtains the electrical parameters of the left and right earphones, including the battery level and the operating voltage of the microcontroller. Then, a series of calculations are performed using these parameters, including a first state calculation and a second state calculation, to evaluate the Bluetooth connection state of the headset. The first state calculation determines the state data based on the magnitude relationship of the electrical parameters, and the second state calculation uses the formula PL=-10 lg(10 DL) and formula PR = -10 lg(10 DR) to determine the Bluetooth connection status. Finally, the calculated connection status is compared with the preset threshold. If the Bluetooth connection status is less than the preset threshold, the connection is successful. Otherwise, the Bluetooth pairing channel is adjusted and the electrical parameters are re-acquired. In addition, the solution can also preset and sort the connection channels to improve the connection efficiency.

[0017] In the prior art, the connection of Bluetooth headsets often requires multiple scans, which is inefficient and lacks an effective channel management and sorting mechanism. In response to these problems, the present invention monitors the electrical parameters of the headset in real time and converts them into evaluable Bluetooth status data, thereby more accurately predicting and adjusting the Bluetooth connection status. Through pre-trained models and set thresholds, this solution can quickly determine whether the headset is in a good connection state, avoiding unnecessary scanning and waiting time. In addition, the present invention can also dynamically adjust the Bluetooth pairing channel based on historical data and performance threshold analysis, achieve optimized channel sorting, and further improve the stability and efficiency of the connection.

[0018] Compared with the prior art, the present invention has significant beneficial effects. First, it provides a more stable and efficient Bluetooth connection method, which speeds up the connection speed by reducing the number of scans during connection. Secondly, by realizing the presetting and sorting of connection channels, the channel management is optimized, making the connection process more intelligent and automated. In addition, the present invention also provides a more accurate Bluetooth headset status detection method, which significantly improves the connection stability of the Bluetooth headset, thereby enhancing the user experience. In general, the present invention provides Bluetooth headset users with a faster, more stable and more convenient connection experience through its innovative methods and systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a schematic flow chart of a method for detecting the state of a Bluetooth headset provided by the first embodiment of the present invention; Figure 2 It is a schematic diagram of the structure of a Bluetooth headset status detection system provided by the second embodiment of the present invention. DETAILED DESCRIPTION

[0020] 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.

[0021] At present, with the rapid development of wireless communication technology, Bluetooth technology has been widely used in portable devices due to its advantages of long transmission distance, fast speed, low cost, wide range of supported devices, high security, etc. In particular, Bluetooth headsets and Bluetooth speakers, as representatives of wireless audio transmission, are widely favored by the market.

[0022] In a prior art, when connecting a Bluetooth headset, the Bluetooth connection method often requires multiple scans to be successful, which is inefficient. It can be seen that the prior art has the problem of not being able to preset the connection channel and not having the function of sorting the searched channels.

[0023] In order to solve the above technical problems, refer to Figure 1 The first embodiment of the present invention provides a method for detecting the status of a Bluetooth headset, comprising the following steps: S11, obtaining electrical parameters of the left earphone and the right earphone; S12, performing a first state calculation according to the electrical parameters of the left earphone and the electrical parameters of the right earphone to obtain Bluetooth state data of the left earphone and the right earphone; S13, performing a second state calculation according to the Bluetooth state data of the left and right earphones to obtain the Bluetooth connection states of the left and right earphones; S14, inputting the Bluetooth connection status of the left and right earphones into a pre-trained connection status detection model and comparing them with the preset threshold in the model; if the Bluetooth connection status of the left and right earphones are both less than the preset threshold, the status detection ends and the connection is successful; if the Bluetooth connection status of the left and right earphones are both greater than the preset threshold, adjusting the Bluetooth pairing channels of the left and right earphones, and re-executing the acquisition of the left earphone electrical parameters and the right earphone electrical parameters.

[0024] In step S11, electrical parameters of the left earphone and electrical parameters of the right earphone are acquired.

[0025] According to the step of obtaining the electrical parameters of the left earphone and the right earphone, the step characteristics refer to the electrical parameters, mainly including the battery level and the microcontroller operating voltage. These parameters are important indicators of the working state of the earphones and can reflect the power state and working performance of the earphones.

[0026] The acquisition process of these electrical parameters involves the acquisition of analog signals and the processing of digital signals. Specifically: First, the process converts the analog voltage signal generated by the Bluetooth headset battery into a digital signal through the built-in analog-to-digital converter of the Bluetooth headset, which enables the microprocessor to recognize and process these signals. The converted digital signal is then transmitted to the microprocessor for calculation and processing, thereby obtaining the accurate battery voltage value.

[0027] Secondly, the process converts the analog signals of the supply voltage of the microcontrollers inside the left and right earphones into digital signals through an analog-to-digital converter. This conversion allows the microprocessor to read and process these digital signals to calculate the actual operating voltage values ​​of the left and right earphone microcontrollers.

[0028] The acquisition of this series of electrical parameters not only ensures accurate monitoring of the battery status, but also provides the necessary basic data support for the subsequent optimization of the Bluetooth connection status.

[0029] The analog-to-digital converter converts analog signals from the outside world into digital signals that can be processed by computers or digital circuits. The specific working process is: First, the analog-to-digital converter samples the analog signal at specific time intervals. Sampling is the process of measuring the instantaneous value of a signal. According to the Nyquist theorem, the sampling frequency must be greater than twice the highest frequency of the signal to avoid aliasing effects.

[0030] Secondly, the sampled signal values ​​are then quantized. Quantization is the process of mapping the continuous amplitude of an analog signal to a finite number of discrete values. The number of bits of the analog-to-digital converter represents its quantization accuracy. The more bits, the more distinguishable discrete values, the smaller the quantization noise, and the closer the conversion result is to the original analog signal.

[0031] The quantized discrete values ​​are then converted into digital values ​​in binary or other coded form through a process called encoding. This step usually involves digital logic circuits that convert discrete voltage levels into a format that can be read and processed by a digital system.

[0032] Finally, the analog-to-digital converter outputs digital signals that can be further processed or stored by a computer or other digital device.

[0033] In step S12, a first state calculation is performed according to the electrical parameters of the left earphone and the electrical parameters of the right earphone to obtain Bluetooth state data of the left earphone and the right earphone; The electrical parameters obtained from the left and right earphones include the battery level and the microcontroller operating voltage. These parameters are a direct reflection of the working status of the earphones and are the basis for status calculation. Specifically, the magnitude relationship between the electrical parameters of the left earphone and the electrical parameters of the right earphone is determined based on the electrical parameters of the left earphone and the electrical parameters of the right earphone. If the electrical parameters of the left earphone are smaller than those of the right earphone, the status data (DR) of the right earphone is set to 0, and the status data (DL) of the left earphone is calculated by the formula 1 / (IL K1). If the electrical parameters of the two earphones are equal, the status data (DR) and (DL) of the two earphones are calculated by the formula 0.5 / (IL K2). If the electrical parameters of the left earphone are greater than those of the right earphone, the status data (DR) of the right earphone is calculated by the formula 0.5 / (IR K2) is calculated, and the status data of the left earphone (DL) is calculated by the formula 1 / (IR K1) is calculated. Based on the comparison results, a specific mathematical formula is used to calculate the status data of the left and right earphones, which is the basis for the next step of calculation.

[0034] This step not only improves the stability and efficiency of the connection through precise electrical parameter acquisition and calculation, but also enhances the adaptability and flexibility of the system by introducing the gain factor. Through this process, users can expect a more optimized Bluetooth connection experience.

[0035] The "first state calculation" is to obtain the electrical parameters of the left and right earphones and then obtain the Bluetooth state data of the earphones through a certain algorithm. The specific calculation rules are as follows: If IL<IR, then DR=0, DL=1 / (IL K1); If IL=IR, then DR=DL=0.5 / (IL K2); If IL>IR, then DR=0.5 / (IR K2), DL = 1 / (IR K1); Among them, IR is the electrical parameter of the right ear, IL is the electrical parameter of the left ear, DR is the status data of the right ear, DL is the status data of the left ear, and K1 and K2 are the gain coefficients of the left and right earphones respectively. K1 and K2 are gain coefficients set for the left and right earphones respectively. They are used to adjust the calculation results of the status data to take into account the possible differences in electrical characteristics of different earphones. The gain coefficient plays a vital role in the Bluetooth headset status detection method, and its functions include the following aspects: 1. Standardization and normalization The gain coefficients (K1 and K2) play a role in standardizing and normalizing the calculation of electrical parameters (IL and IR). Since electrical parameters may have different magnitudes and ranges due to factors such as different headphone models, battery status, and usage environment, the gain coefficients can adjust these parameters to a relatively stable calculation range. In this way, the calculated status data (DL and DR) can be ensured to be comparable and consistent, making the subsequent connection status evaluation more accurate.

[0036] 2. Adjust sensitivity The gain factor provides a means of adjusting the sensitivity of the calculation. In the calculation formula of the status data, the larger the value of the gain factor, the more sensitive the response to the change of the electrical parameters. This means that if the system needs to respond quickly to slight changes in electrical parameters, a larger gain factor can be selected. Conversely, if the system needs to be more robust to fluctuations in electrical parameters, a smaller gain factor can be selected. By adjusting the gain factor, the system's recognition ability and response speed to different headphone states can be optimized.

[0037] 3. Compensating for non-idealities In practical applications, the electrical parameters of Bluetooth headsets may be affected by a variety of non-ideal factors, such as temperature changes, battery aging, etc. These factors may cause deviations between the actual values ​​of the electrical parameters and the ideal values. Through carefully selected gain coefficients, these deviations can be compensated, thereby improving the accuracy of state detection.

[0038] 4. Implementing dynamic range control The gain factor helps control the dynamic range of the calculation results. In signal processing, the dynamic range refers to the ratio between the maximum and minimum values ​​of the signal. By adjusting the gain factor, the dynamic range of the state data (DL and DR) can be effectively controlled to avoid calculation overflow or underflow caused by extreme parameter values, ensuring the stability of the calculation process.

[0039] 5. Optimize algorithm performance In the state detection algorithm of Bluetooth headsets, the introduction of gain coefficient can optimize the overall performance of the algorithm. Reasonable gain coefficient setting can reduce the computational complexity and improve the algorithm's operation speed and real-time performance. At the same time, the gain coefficient can also be used to balance the accuracy and resource consumption of the algorithm to achieve optimal performance in specific application scenarios.

[0040] 6. Adaptive Adjustment The gain factor provides the algorithm with the ability to adapt to different usage scenarios. For example, in a noisy environment, the gain factor may need to be increased to enhance the ability to identify changes in electrical parameters; while in a quiet environment, a smaller gain factor can be selected to reduce misjudgment. By dynamically adjusting the gain factor, the algorithm can better adapt to different working environments and user needs.

[0041] In summary, the gain coefficient plays a key role in many aspects of the Bluetooth headset status detection method, including standardization, sensitivity adjustment, non-ideal compensation, dynamic range control, algorithm performance optimization, and adaptive adjustment. By reasonably designing and adjusting the gain coefficient, the accuracy, stability, and adaptability of the status detection method can be significantly improved.

[0042] In step S13, a second state calculation is performed according to the Bluetooth state data of the left and right earphones to obtain the Bluetooth connection states of the left and right earphones.

[0043] The main feature of this step is the Bluetooth connection status of the left and right earphones, which is calculated through the second state and is used to evaluate the Bluetooth connection quality of the earphones.

[0044] For the process of obtaining the Bluetooth connection status, the status data of the left and right earphones need to be calculated from the first state. These data are calculated by comparing the electrical parameters of the left and right earphones and applying a specific gain coefficient. These data reflect the electrical status of the earphones, but do not directly express the quality of the Bluetooth connection. By using the second state calculation formula PL = -10 lg(10 DL) and PR = -10 lg(10 DR), converting the status data into a value representing the connection status. This calculation process uses a logarithmic function to quantify the connection status of the headset, thereby providing a basis for subsequent Bluetooth connection stability analysis. This method can effectively evaluate the connection quality of Bluetooth headsets in different environments, and make adjustments accordingly to optimize the user experience.

[0045] This method provides a quantitative means to evaluate and optimize the connection quality of Bluetooth headsets, ensuring the stability and efficiency of the connection.

[0046] For the formula PL = -10 lg(10 DL) and PR = -10 lg(10 DR), where: -10 in the formula lg(10 DL) and -10 lg(10 DR) converts the status data into a more intuitive connection status indicator through a logarithmic transformation. The logarithmic function is used here because the logarithm can convert the multiplication relationship into an addition relationship, which is easy to process and interpret.

[0047] The base 10 logarithm was chosen because in electrical engineering, logarithmic units are usually based on base 10, which is consistent with the concept of decibel (dB), a common unit used to describe the ratio of two quantities.

[0048] The factor -10 is used to convert the output of the logarithmic function to a more realistic magnitude. This is because in wireless communications, the logarithmic scale of signal strength is usually based on 10, and every increase of 10 means a 20 dB increase in signal strength.

[0049] Among them, PL is the Bluetooth connection status of the left earphone, PR is the Bluetooth connection status of the right earphone, DL is the Bluetooth status data of the left earphone, and DR is the Bluetooth status data of the right earphone.

[0050] The calculated PL and PR values ​​represent the Bluetooth connection status of the left and right earphones. These values ​​are often interpreted as an indicator of signal quality, where smaller values ​​indicate a better connection status. This is because the logarithmic function is monotonically decreasing, so when the value of DL or DR increases (indicating a better electrical status), the value of PL or PR decreases. In step S14, the Bluetooth connection status of the left and right earphones is input into a pre-trained connection status detection model and compared with a preset threshold in the model. If the Bluetooth connection status of the left and right earphones is less than the preset threshold, the status detection ends and the connection is successful. If the Bluetooth connection status of the left and right earphones is greater than the preset threshold, the Bluetooth pairing channels of the left and right earphones are adjusted, and the acquisition of the electrical parameters of the left earphone and the electrical parameters of the right earphone is re-executed.

[0051] The feature in this step is the comparison result of the Bluetooth connection status of the left and right earphones with the preset threshold, which is a judgment indicator used to decide whether to continue the connection process or make adjustments.

[0052] First, the Bluetooth connection status of the left and right earphones calculated by the second state is compared with the preset threshold value using a preset threshold value determined by a connection status detection model, and the subsequent operation is determined according to the comparison result.

[0053] Specifically, if the values ​​of the Bluetooth connection status PL and PR of the left and right earphones are less than or equal to the preset threshold, the connection status is considered to be good, the detection is completed, and the connection is successful. If the values ​​of PL and PR are greater than the preset threshold, it means that the connection status is not good, and the Bluetooth pairing channel of the earphones needs to be adjusted to find a better connection. After adjusting the channel, the system will re-execute the operation of obtaining electrical parameters and restart the entire status detection process to ensure that a stable Bluetooth connection can be achieved in the end. This method can dynamically adjust the connection strategy of Bluetooth headsets, optimize connection quality, and ensure user experience.

[0054] Among them, "adjusting the Bluetooth pairing channel of the headset" is to check whether each connection channel of the left and right headset exists in the preset channel list. If the connection channels of the left and right headsets match the channels in the preset channel list, the connection channels of the left and right headsets will maintain the original record order in the preset channel list; if the connection channels of the left and right headsets do not match the channels in the preset channel list, the positions of the unmatched channels in the preset channel list will be recorded, and the connection channels of the Bluetooth headset will be reordered. During the rearrangement process, the system will reorder those connection channels that are not in the preset channel list according to this position information. This means that even if some connection channels do not initially appear in the preset list, the system will supplement these unmatched channels in the preset position order according to the position order in the preset channel list, thereby ensuring that all connection channels are arranged in an optimized order. This process helps to improve the efficiency of Bluetooth headsets when searching and connecting, ensuring that those channels with higher signal quality are connected first.

[0055] Among them, the "preset threshold" is a key parameter used in the Bluetooth headset status detection method to evaluate whether the Bluetooth connection status is successful. Exemplarily, the following is a method and steps for obtaining the "preset threshold", specifically: First, we conducted a demand analysis to identify the quality and stability standards that the headphone connection needs to meet, and set goals for model accuracy and response time. Then, we collected Bluetooth connection data under different conditions through a series of experimental tests, and used data analysis methods to identify the key factors that affect connection stability. Based on the experience of engineers and historical data, we initially set a set of thresholds, and further optimized these values ​​through statistical methods such as standard deviation and percentiles.

[0056] Next, we selected a suitable machine learning model, trained the model using the collected data, and continuously adjusted the parameters until the model reached the expected accuracy. We tested the model on a variety of devices and environments to verify the model's prediction effect, and adjusted the threshold according to the actual connection situation to more accurately evaluate the connection status of Bluetooth headsets.

[0057] After the thresholds are finalized, they are embedded in the status detection system of the Bluetooth headset and the system operation is continuously monitored to ensure the continued applicability of the thresholds. In addition, user feedback can be actively collected and combined with new data analysis results to continuously optimize the threshold settings, which will help improve the connection stability and user satisfaction of Bluetooth headsets.

[0058] The working process of the present invention is described below using a relatively common scenario as an example; When a user is using a pair of Bluetooth headphones to listen to music or make calls. During this process, the Bluetooth headphones need to maintain a stable connection with the playback device (such as a smartphone). The working process of the present invention can be described as follows: 1. Obtaining electrical parameters: When the user turns on the power of the Bluetooth headset, the microprocessor inside the headset starts working and prepares to establish a connection with the playback device.

[0059] The microprocessor first obtains electrical parameters of the left earphone and electrical parameters of the right earphone, including battery level and microcontroller operating voltage.

[0060] 2. Analog-to-digital conversion: These electrical parameters initially exist in the form of analog signals, which are converted into digital signals by the microprocessor through the built-in analog-to-digital converter (ADC).

[0061] 3. State calculation: The converted digital signal is used to perform a first state calculation to obtain Bluetooth state data of the left earphone and Bluetooth state data of the right earphone. This process may include comparing the battery power and microcontroller voltage of the left and right earphones to determine their relative states.

[0062] Then the second state calculation is performed, using the specific formula P = -10 lg(10 D) to calculate the Bluetooth connection status.

[0063] 4. Connection status detection: The calculated Bluetooth connection status is input into a pre-trained connection status detection model.

[0064] The model contains a set of preset thresholds that are compared with the calculated connection status.

[0065] 5. Connection successful or channel adjustment: If the calculated connection status value is less than the preset threshold, it means that the connection status between the headset and the playback device is good and the connection is successful, and the user can start listening to music or making calls.

[0066] If the connection status value is greater than the preset threshold, indicating that the connection may be unstable, the system will adjust the Bluetooth pairing channel of the headset and then re-execute the acquisition of electrical parameters and status calculation.

[0067] 6. Channel sorting and optimization: If the channel needs to be adjusted, the system will sort the channels based on the comparison of the connected channel of the headset with the preset channel list to find the best connection channel.

[0068] Channel sorting may include checking whether the current channel is in a preset channel list and prioritizing channels based on historical connection quality data.

[0069] 7. User experience: Through the above process, the present invention can provide a more stable and efficient Bluetooth connection method, reduce the number of scans during connection, realize the presetting and sorting of connection channels, and improve the connection stability and user experience of Bluetooth headsets.

[0070] In this scenario, the present invention ensures that the connection between the Bluetooth headset and the playback device is both stable and efficient through real-time monitoring and intelligent adjustment, thereby improving the user experience.

[0071] In summary, the present invention is a state detection method, system, device and Bluetooth headset for a Bluetooth headset, which is intended to optimize the connection process of the Bluetooth headset. The scheme first obtains the electrical parameters of the left headset and the electrical parameters of the right headset, including the battery level and the operating voltage of the microcontroller. Then, a series of calculations are performed using these parameters, including a first state calculation and a second state calculation, to evaluate the Bluetooth connection state of the headset. Among them, the first state calculation determines the state data according to the magnitude relationship of the electrical parameters, and the second state calculation applies the formula PL=-10 lg(10 DL) and formula PR = -10 lg(10 DR) to determine the Bluetooth connection status. Finally, the calculated connection status is compared with the preset threshold. If the status is good, the connection is successful. Otherwise, the Bluetooth pairing channel is adjusted and the electrical parameters are re-acquired. In addition, the solution can also preset and sort the connection channels to improve connection efficiency.

[0072] In the prior art, the connection of Bluetooth headsets often requires multiple scans, which is inefficient and lacks an effective channel management and sorting mechanism. In response to these problems, the present invention monitors the electrical parameters of the headset in real time and converts them into evaluable Bluetooth status data, thereby more accurately predicting and adjusting the Bluetooth connection status. Through pre-trained models and set thresholds, this solution can quickly determine whether the headset is in a good connection state, avoiding unnecessary scanning and waiting time. In addition, the present invention can also dynamically adjust the Bluetooth pairing channel based on historical data and performance threshold analysis, achieve optimized channel sorting, and further improve the stability and efficiency of the connection.

[0073] Compared with the prior art, the present invention has significant beneficial effects. First, it provides a more stable and efficient Bluetooth connection method, which speeds up the connection speed by reducing the number of scans during connection. Secondly, by realizing the presetting and sorting of connection channels, the channel management is optimized, making the connection process more intelligent and automated. In addition, the present invention also provides a more accurate Bluetooth headset status detection method, which significantly improves the connection stability of the Bluetooth headset, thereby enhancing the user experience. In general, the present invention provides Bluetooth headset users with a faster, more stable and more convenient connection experience through its innovative methods and systems.

[0074] Reference Figure 2 The second embodiment of the present invention provides a Bluetooth headset status detection system, comprising: A parameter acquisition module, used to acquire electrical parameters of the left earphone and the right earphone; A state data module, used for performing a first state calculation according to the electrical parameters of the left earphone and the electrical parameters of the right earphone to obtain Bluetooth state data of the left earphone and the right earphone; A connection status module, used to perform a second status calculation according to the Bluetooth status data of the left and right earphones to obtain the Bluetooth connection status of the left and right earphones; The result output module inputs the Bluetooth connection status of the left and right earphones into a pre-trained connection status detection model and compares it with the preset threshold in the model. If the Bluetooth connection status of the left and right earphones is less than the preset threshold, the status detection ends and the connection is successful; if the Bluetooth connection status of the left and right earphones is greater than the preset threshold, the Bluetooth pairing channels of the left and right earphones are adjusted, and the acquisition of the electrical parameters of the left earphone and the electrical parameters of the right earphone is re-executed.

[0075] In an optional implementation, the parameter acquisition module is specifically used to: Get the left earphone battery level and the right earphone battery level; Get the operating voltage of the left earphone microcontroller and the operating voltage of the right earphone microcontroller.

[0076] In an optional implementation manner, the acquiring of the left earphone electrical parameters and the right earphone electrical parameters is specifically used for: Obtaining a left earphone battery voltage analog signal and a right earphone battery voltage analog signal, converting the left earphone battery voltage analog signal and the right earphone battery voltage analog signal into left and right earphone battery voltage digital signals through an analog-to-digital converter, and calculating and processing the left and right earphone battery voltage values ​​through a microprocessor; Based on the left and right earphone battery voltage values ​​and the corresponding standard voltage values ​​of the left and right earphone batteries, curve fitting is performed to obtain the left earphone battery level and the right earphone battery level; Acquire analog signals of operating voltages of left and right earphone microcontrollers, convert them based on analog-to-digital converters, convert the analog signals of operating voltages of left and right earphone microcontrollers into digital signals of operating voltages of left and right earphone microcontrollers, and calculate and process them through a microprocessor to obtain operating voltage values ​​of left and right earphone microcontrollers; Based on the comparison and data fitting of the left and right earphone microcontroller operating voltage values ​​and the corresponding microcontroller standard voltage values, the left earphone microcontroller operating voltage and the right earphone microcontroller operating voltage are obtained.

[0077] In an optional implementation, the status data module is specifically used to: Determining the magnitude relationship between the left earphone electrical parameter and the right earphone electrical parameter according to the left earphone electrical parameter and the right earphone electrical parameter; If IL<IR, then DR=0, DL=1 / (IL K1); If IL=IR, then DR=DL=0.5 / (IL K2); If IL>IR, then DR=0.5 / (IR K2), DL = 1 / (IR K1); Among them, IR is the electrical parameter of the right ear, IL is the electrical parameter of the left ear, DR is the status data of the right ear, DL is the status data of the left ear, and K1 and K2 are the gain coefficients of the left and right earphones respectively.

[0078] In an optional implementation, the connection status module is specifically configured to: According to the Bluetooth status data of the left and right earphones, a second status calculation is performed to obtain the Bluetooth connection status of the left and right earphones. The specific calculation formula is: PL = -10 lg(10 DL) PR = -10 lg(10 DR) Among them, PL is the Bluetooth connection status of the left earphone, PR is the Bluetooth connection status of the right earphone, DL is the Bluetooth status data of the left earphone, and DR is the Bluetooth status data of the right earphone.

[0079] In an optional implementation, the result output module is specifically used to: According to the status detection method of the present invention, the Bluetooth headset is detected in real time, and the detected Bluetooth headset connection status is compared and analyzed with a preset performance threshold. When the Bluetooth connection status of the left and right headsets is less than the preset threshold, the current connection channel is set as the pairing channel of the left and right headsets; When the Bluetooth connection status of the left and right earphones is greater than a preset threshold, the connection channels of the Bluetooth earphones are reordered.

[0080] In an optional implementation manner, the reordering of the connection channels of the Bluetooth headset is specifically used for: According to each connection channel of the left and right earphones, check whether it exists in the preset channel list, if so, keep the current order of the channel in the list, if not, record the position information of the channel in the preset channel list; According to the position information, the channels at the position are reordered according to the order of the position information in the preset channel list.

[0081] It should be noted that a Bluetooth headset status detection system provided in an embodiment of the present invention is used to execute all process steps of a Bluetooth headset status detection method in the above embodiment, and the working principles and beneficial effects of the two correspond one to one, so they will not be repeated here.

[0082] The embodiment of the present invention further 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 an analog-to-digital conversion program. When the processor executes the computer program, the steps in the above-mentioned embodiments of the method for detecting the state of a Bluetooth headset are implemented, such as Figure 1 Alternatively, when the processor executes the computer program, the functions of the modules in the above-mentioned system embodiments are realized, such as the parameter acquisition module.

[0083] Exemplarily, the computer program may be divided into one or more modules, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the electronic device.

[0084] The electronic device may be a computing device such as a desktop computer, a notebook, a PDA, and a smart tablet. The electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. The electronic device may include more or fewer components than the above components, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0085] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device.

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

[0087] Wherein, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or system capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased 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 electric carrier signals and telecommunication signals.

[0088] It should be noted that the system embodiment described above is merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the system embodiment provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.

[0089] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for detecting the status of a Bluetooth headset, characterized in that: include: Obtain electrical parameters of the left earphone and the right earphone; Performing a first state calculation according to the electrical parameters of the left earphone and the electrical parameters of the right earphone to obtain Bluetooth state data of the left earphone and the right earphone; Performing a second state calculation according to the Bluetooth state data of the left and right earphones to obtain the Bluetooth connection states of the left and right earphones; The Bluetooth connection status of the left and right earphones is input into a pre-trained connection status detection model and compared with the preset threshold in the model. If the Bluetooth connection status of the left and right earphones are both less than the preset threshold, the status detection is ended and the connection is successful; if the Bluetooth connection status of the left and right earphones are both greater than the preset threshold, the Bluetooth pairing channels of the left and right earphones are adjusted, and the acquisition of the electrical parameters of the left earphone and the electrical parameters of the right earphone is re-executed.

2. A method for detecting the status of a Bluetooth headset according to claim 1, characterized in that: The left earphone electrical parameters include the left earphone battery level and the left earphone microcontroller operating voltage; The right earphone electrical parameters include the right earphone battery level and the right earphone microcontroller operating voltage.

3. The method for detecting the state of a Bluetooth headset according to claim 1, characterized in that: The obtaining of the electrical parameters of the left earphone and the right earphone includes: Obtaining left and right earphone battery voltage analog signals, converting the left and right earphone battery voltage analog signals into left and right earphone battery voltage digital signals based on an analog-to-digital converter, and obtaining left and right earphone battery voltage values ​​through calculation and processing by a microprocessor; Based on the left and right earphone battery voltage values ​​and the corresponding standard voltage values ​​of the left and right earphone batteries, curve fitting is performed to obtain the left earphone battery level and the right earphone battery level; Acquire analog signals of operating voltages of left and right earphone microcontrollers, convert the analog signals of operating voltages of left and right earphone microcontrollers into digital signals of operating voltages of left and right earphone microcontrollers based on an analog-to-digital converter, and obtain operating voltage values ​​of left and right earphone microcontrollers through calculation and processing by a microprocessor; Based on the comparison and data fitting of the left and right earphone microcontroller operating voltage values ​​and the corresponding microcontroller standard voltage values, the left earphone microcontroller operating voltage and the right earphone microcontroller operating voltage are obtained.

4. The method for detecting the status of a Bluetooth headset according to claim 1, characterized in that: The first state calculation is performed according to the electrical parameters of the left earphone and the electrical parameters of the right earphone to obtain Bluetooth state data of the left earphone and the right earphone, including: Determining the magnitude relationship between the left earphone electrical parameter and the right earphone electrical parameter according to the left earphone electrical parameter and the right earphone electrical parameter; If IL<IR, then DR=0, DL=1 / (IL K1); If IL=IR, then DR=DL=0.5 / (IL K2); If IL>IR, then DR=0.5 / (IR K2), DL=1 / (IR K1); Among them, IR is the electrical parameter of the right ear, IL is the electrical parameter of the left ear, DR is the status data of the right ear, DL is the status data of the left ear, and K1 and K2 are the gain coefficients of the left and right earphones respectively.

5. The method for detecting the status of a Bluetooth headset according to claim 1, characterized in that: The performing a second state calculation according to the Bluetooth state data of the left and right earphones to obtain the Bluetooth connection states of the left and right earphones includes: The formula for calculating the second state is: PL=-10 lg(10 DL) PR=-10 lg(10 DR) Among them, PL is the Bluetooth connection status of the left earphone, PR is the Bluetooth connection status of the right earphone, DL is the Bluetooth status data of the left earphone, and DR is the Bluetooth status data of the right earphone.

6. The method for detecting the status of a Bluetooth headset according to claim 1, characterized in that: The adjusting of the Bluetooth pairing channels of the left and right earphones includes: Perform real-time connection status detection on the Bluetooth headset, compare and analyze the detected Bluetooth headset connection status with a preset performance threshold, and when the Bluetooth connection status of the left and right headsets is less than the preset threshold, set the current connection channel as the pairing channel of the left and right headsets; When the Bluetooth connection status of the left and right earphones are both greater than a preset threshold, the connection channels of the Bluetooth earphones are reordered.

7. A method for detecting the status of a Bluetooth headset according to claim 6, characterized in that: The re-ordering of the connection channels of the Bluetooth headset includes: According to each connection channel of the left and right earphones, check whether the connection channel exists in the preset channel list; if so, keep the current order of the connection channel in the list; if not, record the position information of the connection channel in the preset channel list; According to the position information, the connection channels that do not exist in the preset channel list are reordered in the order of the position information in the preset channel list.

8. A Bluetooth headset status detection system, characterized in that: include: A parameter acquisition module, used to acquire electrical parameters of the left earphone and the right earphone; A state data module, used for performing a first state calculation according to the electrical parameters of the left earphone and the electrical parameters of the right earphone to obtain Bluetooth state data of the left earphone and the right earphone; A connection status module, used to perform a second status calculation according to the Bluetooth status data of the left and right earphones to obtain the Bluetooth connection status of the left and right earphones; The result output module inputs the Bluetooth connection status of the left and right earphones into a pre-trained connection status detection model and compares it with the preset threshold in the model. If the Bluetooth connection status of the left and right earphones is less than the preset threshold, the status detection ends and the connection is successful; if the Bluetooth connection status of the left and right earphones is greater than the preset threshold, the Bluetooth pairing channels of the left and right earphones are adjusted, and the acquisition of the electrical parameters of the left earphone and the electrical parameters of the right earphone is re-executed.

9. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, a method for detecting the status of a Bluetooth headset as claimed in any one of claims 1 to 7 is implemented.

10. A Bluetooth headset, characterized in that: The Bluetooth headset comprises the status detection system of the Bluetooth headset as claimed in claim 8.