CN111356120A - Method for automatically detecting wireless earphone in range of mobile phone with Bluetooth function - Google Patents

Method for automatically detecting wireless earphone in range of mobile phone with Bluetooth function Download PDF

Info

Publication number
CN111356120A
CN111356120A CN202010313361.7A CN202010313361A CN111356120A CN 111356120 A CN111356120 A CN 111356120A CN 202010313361 A CN202010313361 A CN 202010313361A CN 111356120 A CN111356120 A CN 111356120A
Authority
CN
China
Prior art keywords
bluetooth
mobile phone
preset
weight factor
bluetooth device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010313361.7A
Other languages
Chinese (zh)
Other versions
CN111356120B (en
Inventor
邓先海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suining Motianshidai Technology Co ltd
Original Assignee
Suining Motianshidai Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suining Motianshidai Technology Co ltd filed Critical Suining Motianshidai Technology Co ltd
Priority to CN202010313361.7A priority Critical patent/CN111356120B/en
Publication of CN111356120A publication Critical patent/CN111356120A/en
Application granted granted Critical
Publication of CN111356120B publication Critical patent/CN111356120B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/60Substation equipment, e.g. for use by subscribers including speech amplifiers
    • H04M1/6033Substation equipment, e.g. for use by subscribers including speech amplifiers for providing handsfree use or a loudspeaker mode in telephone sets
    • H04M1/6041Portable telephones adapted for handsfree use
    • H04M1/6058Portable telephones adapted for handsfree use involving the use of a headset accessory device connected to the portable telephone
    • H04M1/6066Portable telephones adapted for handsfree use involving the use of a headset accessory device connected to the portable telephone including a wireless connection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/023Services making use of location information using mutual or relative location information between multiple location based services [LBS] targets or of distance thresholds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The invention discloses a method for automatically detecting a wireless earphone in a range by a mobile phone with a Bluetooth function, which comprises the following steps: s1, starting a Bluetooth detection function of the mobile phone end, waking up and running a Bluetooth searching thread, and starting to search Bluetooth equipment signals; s2, after searching the Bluetooth device signal, acquiring the first type verification information of the searched Bluetooth device and verifying the first type verification information; s3, if yes, continuously acquiring the second type of verification information of the searched Bluetooth equipment and verifying the second type of verification information; s4, if yes, pairing the mobile phone end and the Bluetooth device; and S5, if the pairing is successful, displaying a connection prompt at the mobile phone end. Compared with the prior art, the method provided by the invention combines multi-step signal verification of the Bluetooth equipment and the Bluetooth searching thread which can be continuously and repeatedly operated, simplifies the user operation process, starts the Bluetooth detection function of the mobile phone end and then operates the detection process in the background, so that the user does not need to stay in the Bluetooth operation interface of the mobile phone end for a long time, and the user experience is improved.

Description

Method for automatically detecting wireless earphone in range of mobile phone with Bluetooth function
Technical Field
The invention relates to a wireless earphone detection method, in particular to a method for automatically detecting a wireless earphone in a range by a mobile phone with a Bluetooth function.
Background
Bluetooth has become one of the global standards for short-range wireless connectivity, and is one of the most prominent wireless communication means for connecting portable mobile devices with other peripheral human-computer interaction devices. As shown in fig. 1, a process of detecting a wireless headset by a mobile phone with a bluetooth function in the prior art generally includes: the method comprises the steps of starting Bluetooth equipment, sending a search state broadcast message (starting search, searching equipment and ending search), displaying a list of the searched equipment and acquiring information of paired Bluetooth equipment, opening a Bluetooth operation interface of a mobile phone end by a user of the mobile phone end in the whole detection process, identifying and selecting the Bluetooth equipment list displayed by the mobile phone end in the interface and inputting an operation instruction, and then carrying out Bluetooth connection operation.
Disclosure of Invention
The invention aims to overcome the defects that in the prior art, when a user at a mobile phone end connects a wireless earphone, the user needs to stay at a Bluetooth interface at the mobile phone end for a long time, and needs to input operation instructions for many times, so that the steps are complicated, and the user experience is poor.
The purpose of the invention is mainly realized by the following technical scheme:
the method for automatically detecting the wireless earphone in the range of the mobile phone with the Bluetooth function comprises the following steps:
s1, starting a Bluetooth detection function of the mobile phone end, waking up and running a Bluetooth searching thread, and starting to search Bluetooth equipment signals;
s2, after searching the Bluetooth device signal, acquiring first type verification information of the searched Bluetooth device, wherein the first type verification information comprises Bluetooth device baseband field information and Bluetooth device address information, and verifying whether the first type verification information meets a first preset verification condition; if the first preset verification condition is not met, the mobile phone end records the address information of the Bluetooth device and operates the Bluetooth searching thread again;
s3, if the first preset verification condition is met, continuously acquiring second type verification information of the searched Bluetooth equipment, wherein the second type verification information comprises Bluetooth signal intensity and Bluetooth equipment distance, and verifying whether the second type verification information meets the second preset verification condition; if the second preset verification condition is not met, the mobile phone end records the address information of the Bluetooth device and operates the Bluetooth searching thread again;
s4, if the second preset verification condition is met, pairing the mobile phone end and the Bluetooth device; if the pairing is unsuccessful, the mobile phone end records the address information of the Bluetooth equipment and operates the Bluetooth searching thread again;
s5, if the pairing is successful, displaying a connection prompt at the mobile phone end, selecting whether to agree with the connection by the user at the mobile phone end, and if so, stopping searching for the Bluetooth equipment signal; and if the connection is not approved, the mobile phone end records the address information of the Bluetooth equipment and operates the Bluetooth searching thread again.
When a mobile phone with a Bluetooth function detects a wireless earphone in the prior art, a mobile phone end user opens a mobile phone end Bluetooth interface first, identifies and selects a Bluetooth device list displayed by a mobile phone end in the interface and inputs an operation instruction, so that Bluetooth connection operation can be performed. The technical proposal provides a method for automatically detecting a wireless earphone in the range by a mobile phone with Bluetooth function, after the user at the mobile phone end starts the Bluetooth detection function at the mobile phone end, the user wakes up and runs a Bluetooth searching thread, starts to retrieve the signal of the Bluetooth equipment, automatically verifies and pairs the information of the Bluetooth equipment respectively, since the detected bluetooth device is automatically authenticated and paired after the bluetooth function is enabled, the mobile phone end does not detect a plurality of Bluetooth device signals at one time, the mobile phone end does not display a Bluetooth device signal list, therefore, the user does not need to perform selection operation, the user can transfer the detection process to the background after the Bluetooth function is started, when the pairing between the mobile phone end and the Bluetooth equipment is successful, the prompt information is displayed at the mobile phone end, and a user can directly select the currently used interface according to the prompt information of the Bluetooth equipment without jumping to a Bluetooth connection interface for operation; because the Bluetooth equipment comprises the equipment with the Bluetooth function, such as earphone audio Bluetooth equipment, computer Bluetooth equipment, mobile phone Bluetooth equipment, printer Bluetooth equipment and the like, and different Bluetooth equipment has different baseband fields, in order to improve the detection efficiency and reduce the detection power consumption, the technical scheme firstly sets verification aiming at a first preset verification condition in multi-step verification, can confirm basic information of the Bluetooth equipment by identifying the baseband field information of the Bluetooth equipment and the address information of the Bluetooth equipment, screens the Bluetooth equipment and ensures that the technical scheme only detects the wireless earphone equipment; in addition, the technical scheme also combines the Bluetooth signal intensity and the Bluetooth equipment distance to carry out secondary verification, because the Bluetooth signal intensity is above a certain value in order to ensure the transmission rate and quality of Bluetooth data, and when a user wants to carry out Bluetooth connection between the mobile phone end and the wireless mobile phone, based on the behavior habit of the user, the mobile phone end and the wireless earphone are within a certain distance, such as the distance which can be held by a hand, therefore, the secondary verification by combining the Bluetooth signal intensity and the Bluetooth equipment distance can ensure that the connected wireless earphone is the wireless earphone which the user wants to connect and can be better used after connection, the poor connection signal of the mobile phone end or the wireless earphone connected at a remote place is avoided, the power consumption is reduced, and the detection efficiency is improved; according to the technical scheme, multi-step verification operation is adopted, multi-layer screening is carried out on the Bluetooth equipment, each piece of equipment does not need to be paired, verification time is saved, and power consumption is reduced. According to the technical scheme, multi-step signal verification of the Bluetooth device and a Bluetooth searching thread which can be repeatedly operated are combined, the user operation process is simplified, the detection process is operated in the background after the Bluetooth detection function of the mobile phone end is started, the user does not need to stay in a Bluetooth operation interface of the mobile phone end for a long time, and the user experience is improved; in addition, this technical scheme's can not only simplify user operation flow, promote user experience, be applicable to the bluetooth mobile phone, when the cell-phone end is for not taking the bluetooth mobile phone of BLE module, the reduction consumption utility that its multistep verification brought can reduce more and does not take the bluetooth function consumption of BLE module cell-phone.
Further, after the bluetooth detection function of the mobile phone end is started in S1, acquiring state information of the mobile phone end system, and if the mobile phone end system is not in a busy state, waking up and running a bluetooth search thread; the non-busy state refers to a state that the mobile phone end system is in a standby state or an operation interval is less than or equal to 5 seconds.
In order to further reduce the power consumption of the mobile phone end and improve the user experience, the technical scheme acquires the state information of the mobile phone end system after the Bluetooth detection function of the mobile phone end is started, acquires the operation behavior of the user at the mobile phone end to determine the state of the mobile phone end system, avoids the interruption of the in-use function of the user caused by the Bluetooth detection in the user operation, and also avoids the phenomenon that the in-use function of the user is wrong or unsmooth because a Bluetooth searching thread occupies a system memory, so that the user experience is poor. By using the method of the technical scheme, the detection process can be ensured to run in the background after the Bluetooth detection function of the mobile phone terminal is started, and a user does not need to stay in a Bluetooth operation interface of the mobile phone terminal for a long time, so that the user experience is improved. It should be noted that, in the technical scheme, if the mobile phone end system is in a busy state, the mobile phone end system waits until the mobile phone end system is in a non-busy state, and wakes up and runs a bluetooth search thread; if the Bluetooth searching thread is started and enters a background, the Bluetooth searching thread is suspended until the mobile phone end system is in the non-busy state after the mobile phone end enters the non-busy state during the operation of the user. In addition, according to the technical scheme, the backlight time setting of the screen can be read, and the thread suspends work after the screen of the mobile phone end is turned off.
Further, the bluetooth search thread is an independent thread, and the bluetooth search thread proceeds to step S2 each time it runs to search for a bluetooth device signal.
This technical scheme adopts independent thread to detect wireless earphone, and the testing process can stop at any time and can not influence other processes, promotes user experience, after detecting corresponding wireless earphone, can stop the scanning immediately, reduces the consumption. After the thread is awakened, the next step can directly enter into an operation stage, which is a circulation action, and repeated detection activities can be carried out at set fixed intervals under the condition that certain conditions are met in use.
Further, the first preset verification condition includes preset baseband field information and bluetooth device address information recorded by the mobile phone terminal, and the preset baseband field information is a bluetooth baseband field where the wireless headset is located; the verification method in S2 is as follows: and if the baseband field information of the Bluetooth equipment meets the preset baseband field information and the address information of the Bluetooth equipment is not recorded by the mobile phone terminal, the first preset verification condition is met.
Because the Bluetooth equipment comprises equipment with Bluetooth functions, such as earphone audio Bluetooth equipment, computer Bluetooth equipment, mobile phone Bluetooth equipment, printer Bluetooth equipment and the like, and different Bluetooth equipment has different baseband fields, in order to improve the detection efficiency and reduce the detection power consumption, the technical scheme sets a first preset verification condition comprising preset baseband field information and Bluetooth equipment address information recorded by a mobile phone end, can confirm basic information of the Bluetooth equipment by identifying the baseband field information and the Bluetooth equipment address information of the Bluetooth equipment, and screens the Bluetooth equipment, so that the technical scheme only detects the wireless earphone equipment; in addition, through the verification of the address information of the Bluetooth equipment recorded by the mobile phone terminal, the address information of the Bluetooth equipment which is not recorded by the mobile phone terminal is screened out, the repeated detection of the Bluetooth equipment which is verified to be non-target Bluetooth equipment is avoided, the power consumption is reduced, the detection efficiency is improved, and the user experience is improved.
Further, the distance between the bluetooth devices is calculated and optimized by the bluetooth signal strength, and specifically includes:
1) acquiring a plurality of Bluetooth signal intensities according to a time sequence, quantitatively calculating the Bluetooth signal intensities to obtain a plurality of original Bluetooth device distances, and calculating a deviation value of each original Bluetooth device distance;
2) counting the number of the distances of the original Bluetooth equipment with the deviation value exceeding the preset deviation value;
3) if the number is smaller than or equal to the preset value, calculating the average value of the distances of the original Bluetooth equipment which does not exceed the preset deviation value as the optimized distance of the Bluetooth equipment;
4) if the number is larger than the preset value, calculating the average value of the distances of the original Bluetooth devices which do not exceed the preset deviation value as the first Bluetooth device distance, and calculating the average value of the distances of the original Bluetooth devices which exceed the preset deviation value as the second Bluetooth device distance; respectively allocating a third weight factor and a fourth weight factor to the first Bluetooth device distance and the second Bluetooth device distance, wherein the third weight factor is greater than the fourth weight factor; and calculating to obtain the optimized Bluetooth device distance based on the first Bluetooth device distance, the second Bluetooth device distance, the third weight factor and the fourth weight factor.
According to the technical scheme, the distance between the Bluetooth devices is obtained through Bluetooth signal intensity calculation, the distance between the Bluetooth devices obtained through direct calculation by a quantization method is larger than the actual distance, although the distance between the Bluetooth devices with high precision can be obtained by methods such as fingerprint matching, the calculation process is complex, the power consumption is high, the requirement on a mobile phone end is high, the distance between the Bluetooth devices with high precision does not need to be obtained in the technical scheme, only the distance between the Bluetooth devices and the mobile phone end needs to be judged, and the methods such as fingerprint matching are not suitable. In order to increase the accuracy of the obtained distance of the Bluetooth equipment, the optimized distance of the Bluetooth equipment is obtained by performing deviation optimization calculation on the quantized original distance of the Bluetooth equipment, when the number of the original distance of the Bluetooth equipment is smaller than a preset value, the obtained original distance of the Bluetooth equipment is mostly concentrated in a certain numerical range, so that the distance of the Bluetooth equipment can be visually represented by calculating the average value of the distances of the original Bluetooth equipment which does not exceed the preset deviation value, and when the number of the original distance of the Bluetooth equipment is larger than the preset value, the optimized distance of the Bluetooth equipment can be more represented by calculating the weight factor; by adopting the method, the distance of the Bluetooth equipment meeting the detection requirement can be obtained, the energy consumption in the calculation process can be reduced, the detection efficiency is improved, and the user experience is further improved. (ii) a Preferably, the third weighting factor is 0.6 and the fourth weighting factor is 0.4. In the technical scheme, the distance between the Bluetooth equipment refers to the distance between the Bluetooth equipment and the mobile phone end.
Further, the verification method in S3 is: respectively distributing a first weight factor and a second weight factor for the Bluetooth signal intensity and the Bluetooth device distance, and obtaining verification values based on the Bluetooth signal intensity, the Bluetooth device distance, the first weight factor and the second weight factor; the second preset verification condition is a preset reference value, and if the verification value is greater than or equal to the reference value, the second preset verification condition is met.
When the mobile phone end is connected with the wireless earphone through Bluetooth, the Bluetooth signal strength can confirm the speed of Bluetooth transmission after connection, the distance of the Bluetooth equipment can determine whether the current wireless earphone is the earphone used by the user, and the earphone can be used as the basis for judging whether the user selects the current wireless earphone.
Further, the first weight factor + the second weight factor is 1, the first weight factor is greater than the second weight factor, and the verification value is × the first weight factor + the bluetooth device distance × the second weight factor.
This technical scheme is for preventing that the cell-phone end user mistake places bluetooth headset in the position far away in the in-service use, and the weighted value of setting for bluetooth signal intensity is greater than the bluetooth equipment distance, makes the verification process of the second time more reasonable. Preferably, the first weighting factor is 0.8 and the second weighting factor is 0.2.
In conclusion, compared with the prior art, the invention has the following beneficial effects:
1. according to the method for automatically detecting the wireless earphone in the range of the mobile phone with the Bluetooth function, after the Bluetooth function is started, the detected Bluetooth equipment is automatically verified and paired, a plurality of Bluetooth equipment signals cannot be detected at one time at the mobile phone end, and a Bluetooth equipment signal list cannot be displayed at the mobile phone end, so that the selection operation of a user is not needed, the user can turn the detection process to a background after the Bluetooth function is started, the prompt information can be displayed at the mobile phone end only after the mobile phone end is successfully paired with the Bluetooth equipment, and the user can directly select the currently used interface according to the prompt information of the Bluetooth equipment without jumping to the Bluetooth connection interface operation; the invention adopts multi-step verification operation, performs multi-layer screening on the Bluetooth equipment, does not need to pair each equipment, saves verification time and reduces power consumption; according to the invention, multi-step signal verification of the Bluetooth equipment and a Bluetooth searching thread which can be repeatedly operated are combined, the user operation process is simplified, the detection process is operated in the background after the Bluetooth detection function of the mobile phone end is started, the user does not need to stay in the Bluetooth operation interface of the mobile phone end for a long time, and the user experience is improved.
2. According to the invention, the distance of the Bluetooth equipment is obtained through Bluetooth signal intensity calculation, in order to increase the accuracy of the obtained distance of the Bluetooth equipment, the optimized distance of the Bluetooth equipment is obtained through deviation optimization calculation on the quantized original distance of the Bluetooth equipment, when the number of the original distance of the Bluetooth equipment is smaller than a preset value, the obtained original distance of the Bluetooth equipment is mostly concentrated in a certain numerical range, therefore, the distance of the Bluetooth equipment can be visually embodied by calculating the average value of the original distance of the Bluetooth equipment which does not exceed the preset deviation value, and when the number of the original distance of the Bluetooth equipment is larger than the preset value, the optimized distance of the Bluetooth equipment obtained through weight factor calculation can further embody the distance of the Bluetooth equipment; by adopting the method, the distance of the Bluetooth equipment meeting the detection requirement can be obtained, the energy consumption in the calculation process can be reduced, the detection efficiency is improved, and the user experience is further improved. .
Drawings
The accompanying drawings, which are included to provide a further understanding of the embodiments of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the principles of the invention. In the drawings:
FIG. 1 is a flow chart of a prior art method for detecting a wireless headset in a mobile phone with Bluetooth capability;
fig. 2 is a flow chart of a method for automatically detecting a wireless headset within range of a bluetooth enabled handset.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to examples and accompanying drawings, and the exemplary embodiments and descriptions thereof are only used for explaining the present invention and are not meant to limit the present invention.
Example 1:
as shown in fig. 2, the method for automatically detecting a wireless headset in a range of a mobile phone with bluetooth function includes the following steps:
s1, starting a Bluetooth detection function of the mobile phone end, waking up and running a Bluetooth searching thread, and starting to search Bluetooth equipment signals; preferably, after the bluetooth detection function of the mobile phone terminal is started in S1, acquiring state information of the mobile phone terminal system, and if the mobile phone terminal system is not in a busy state, waking up and running a bluetooth search thread; the non-busy state refers to a state that the mobile phone end system is in a standby state or an operation interval is less than or equal to 5 seconds. The Bluetooth searching thread is adopted to search Bluetooth signals, meanwhile, the state of a mobile phone end system is determined by obtaining the operation behavior of a mobile phone end user, the interruption of functions of the user in use caused by the fact that Bluetooth detection is carried out in user operation is avoided, the situation that the system memory is occupied by the Bluetooth searching thread and the function of the user in use is made to be wrong or not smooth is avoided, the situation that the detection process runs at the background after the mobile phone end Bluetooth detection function is started is guaranteed, the user does not need to stay at a mobile phone end Bluetooth operation interface for a long time, and.
S2, after searching the Bluetooth device signal, acquiring first type verification information of the searched Bluetooth device, wherein the first type verification information comprises Bluetooth device baseband field information and Bluetooth device address information, and verifying whether the first type verification information meets a first preset verification condition; if the first preset verification condition is not met, the mobile phone end records the address information of the Bluetooth device and operates the Bluetooth searching thread again; preferably, the first preset verification condition includes preset baseband field information and bluetooth device address information recorded by the mobile phone terminal, and the preset baseband field information is a bluetooth baseband field where the wireless headset is located; the verification method in S2 is as follows: and if the baseband field information of the Bluetooth equipment meets the preset baseband field information and the address information of the Bluetooth equipment is not recorded by the mobile phone terminal, the first preset verification condition is met. In order to improve the detection efficiency and reduce the detection power consumption, verification aiming at a first preset verification condition is firstly set in multi-step verification, basic information of the Bluetooth device can be confirmed through identification of baseband field information and address information of the Bluetooth device, the Bluetooth device is screened, so that the technical scheme only detects the wireless earphone device, in addition, the address information of the Bluetooth device which is not recorded by a mobile phone end is screened out through verification of the address information of the Bluetooth device recorded by the mobile phone end, repeated detection of the Bluetooth device which is verified as a non-target Bluetooth device is avoided, the power consumption is reduced, the detection efficiency is improved, and the user experience is improved.
S3, if a first preset verification condition is met, continuously acquiring second type verification information of the searched Bluetooth equipment, wherein the second type verification information comprises Bluetooth signal strength and Bluetooth equipment distance, verifying whether the second type verification information meets a second preset verification condition, if the second preset verification condition is not met, recording Bluetooth equipment address information by a mobile phone end, and re-running a Bluetooth searching thread, preferably, in S3, the verification method includes the steps of respectively allocating a first weight factor and a second weight factor to the Bluetooth signal strength and the Bluetooth equipment distance, obtaining verification values based on the Bluetooth signal strength, the Bluetooth equipment distance, the first weight factor and the second weight factor, preferably, in S3, the verification method includes the steps that the first weight factor and the second weight factor are respectively allocated to the Bluetooth signal strength and the Bluetooth equipment distance, obtaining verification values based on the Bluetooth signal strength, the Bluetooth equipment distance, the first weight factor and the second weight factor, the second preset verification condition is a preset reference value, if the verification values are greater than or equal to the reference value, the second preset verification condition is met, preferably, the first weight factor and the second weight factor is 1, the first weight factor is greater than the second weight factor, the first weight factor is more accurately determined, the Bluetooth signal strength and the second weight factor, the second weight factor is more accurately, the Bluetooth signal strength is used when the Bluetooth signal strength is more accurately determined, the Bluetooth signal strength and the Bluetooth signal strength is more accurately, the Bluetooth signal strength is more accurately connected to the Bluetooth signal strength, the Bluetooth signal strength is more accurately, the Bluetooth signal strength and the Bluetooth signal strength is more accurately, the Bluetooth signal strength is more accurately determined, the earphone connection speed is more accurately.
S4, if the second preset verification condition is met, pairing the mobile phone end and the Bluetooth device; if the pairing is unsuccessful, the mobile phone end records the address information of the Bluetooth equipment and operates the Bluetooth searching thread again;
s5, if the pairing is successful, displaying a connection prompt at the mobile phone end, selecting whether to agree with the connection by the user at the mobile phone end, and if so, stopping searching for the Bluetooth equipment signal; and if the connection is not approved, the mobile phone end records the address information of the Bluetooth equipment and operates the Bluetooth searching thread again.
Preferably, the bluetooth search thread is an independent thread, and the bluetooth search thread proceeds to step S2 each time it runs to search for a bluetooth device signal. Adopt independent thread to detect wireless earphone, the testing process can stop at any time and can not influence other processes, promotes user experience, after detecting corresponding wireless earphone, can stop the scanning immediately, reduces the consumption.
In the embodiment, multi-step signal verification of the Bluetooth equipment and a Bluetooth searching thread which can be repeatedly operated are combined, the operation flow of a user is simplified, the detection process is operated in the background after the Bluetooth detection function of the mobile phone end is started, the user does not need to stay in a Bluetooth operation interface of the mobile phone end for a long time, and the user experience is improved; in the multi-step verification and bluetooth search thread technology, proper bluetooth device signals are screened through multi-step bluetooth device signal verification, and the repeated detection of the bluetooth devices which are verified as non-target bluetooth devices is avoided by combining the weight algorithm of verification information, so that the detection method is optimized, the power consumption is reduced, the detection efficiency is improved, and the user experience is further improved.
Example 2:
in this embodiment, on the basis of embodiment 1, the distance between the bluetooth devices is calculated by the bluetooth signal strength, which specifically includes:
1) acquiring a plurality of Bluetooth signal intensities according to a time sequence, quantitatively calculating the Bluetooth signal intensities to obtain a plurality of original Bluetooth device distances, and calculating a deviation value of each original Bluetooth device distance;
2) counting the number of the distances of the original Bluetooth equipment with the deviation value exceeding the preset deviation value;
3) if the number is smaller than or equal to the preset value, calculating the average value of the distances of the original Bluetooth equipment which does not exceed the preset deviation value as the optimized distance of the Bluetooth equipment;
4) if the number is larger than the preset value, calculating the average value of the distances of the original Bluetooth devices which do not exceed the preset deviation value as the first Bluetooth device distance, and calculating the average value of the distances of the original Bluetooth devices which exceed the preset deviation value as the second Bluetooth device distance; respectively allocating a third weight factor and a fourth weight factor to the first Bluetooth device distance and the second Bluetooth device distance, wherein the third weight factor is greater than the fourth weight factor; and calculating to obtain the optimized Bluetooth device distance based on the first Bluetooth device distance, the second Bluetooth device distance, the third weight factor and the fourth weight factor.
In this embodiment, on the basis of embodiment 1, the optimized distance of the bluetooth device is obtained by performing deviation optimization calculation on the quantized distance of the original bluetooth device, and when the number of the distances of the original bluetooth device is smaller than a preset value, it indicates that most of the obtained distances of the original bluetooth device are concentrated in a certain numerical range, so that the distance of the bluetooth device can be directly represented by calculating an average value of the distances of the original bluetooth device that does not exceed a preset deviation value, and when the number of the distances of the original bluetooth device is larger than the preset value, the distance of the bluetooth device can be more represented by calculating the optimized distance of the bluetooth device by using a weight factor; by adopting the method for calculating the distance between the Bluetooth devices, the distance between the Bluetooth devices meeting the detection requirement can be obtained, the energy consumption in the calculation process can be reduced, the detection efficiency is improved, and the user experience is further improved. Preferably, the third weighting factor is 0.6 and the fourth weighting factor is 0.4.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (8)

1. The method for automatically detecting the wireless earphone in the range of the mobile phone with the Bluetooth function is characterized by comprising the following steps:
s1, starting a Bluetooth detection function of the mobile phone end, waking up and running a Bluetooth searching thread, and starting to search Bluetooth equipment signals;
s2, after searching the Bluetooth device signal, acquiring first type verification information of the searched Bluetooth device, wherein the first type verification information comprises Bluetooth device baseband field information and Bluetooth device address information, and verifying whether the first type verification information meets a first preset verification condition; if the first preset verification condition is not met, the mobile phone end records the address information of the Bluetooth device and operates the Bluetooth searching thread again;
s3, if the first preset verification condition is met, continuously acquiring second type verification information of the searched Bluetooth equipment, wherein the second type verification information comprises Bluetooth signal intensity and Bluetooth equipment distance, and verifying whether the second type verification information meets the second preset verification condition; if the second preset verification condition is not met, the mobile phone end records the address information of the Bluetooth device and operates the Bluetooth searching thread again;
s4, if the second preset verification condition is met, pairing the mobile phone end and the Bluetooth device; if the pairing is unsuccessful, the mobile phone end records the address information of the Bluetooth equipment and operates the Bluetooth searching thread again;
s5, if the pairing is successful, displaying a connection prompt at the mobile phone end, selecting whether to agree with the connection by the user at the mobile phone end, and if so, stopping searching for the Bluetooth equipment signal; and if the connection is not approved, the mobile phone end records the address information of the Bluetooth equipment and operates the Bluetooth searching thread again.
2. The method as claimed in claim 1, wherein the step of activating the bluetooth detection function of the handset end in S1 further includes obtaining status information of the system of the handset end, and if the system of the handset end is not busy, waking up and running a bluetooth search thread; the non-busy state refers to a state that the mobile phone end system is in a standby state or an operation interval is less than or equal to 5 seconds.
3. The method for automatically detecting the in-range wireless headset of claim 1, wherein the bluetooth search thread is an independent thread, and the bluetooth search thread proceeds to step S2 each time it searches for a bluetooth device signal.
4. The method according to claim 1, wherein the first predetermined verification condition comprises a predetermined baseband field information and bluetooth device address information recorded by the mobile phone terminal, and the predetermined baseband field information is a bluetooth baseband field where the wireless headset is located; the verification method in S2 is as follows: and if the baseband field information of the Bluetooth equipment meets the preset baseband field information and the address information of the Bluetooth equipment is not recorded by the mobile phone terminal, the first preset verification condition is met.
5. The method for automatically detecting the wireless headset in range of a mobile phone with bluetooth function as claimed in claim 1, wherein the bluetooth device distance is calculated by bluetooth signal strength, specifically:
1) acquiring a plurality of Bluetooth signal intensities according to a time sequence, quantitatively calculating the Bluetooth signal intensities to obtain a plurality of original Bluetooth device distances, and calculating a deviation value of each original Bluetooth device distance;
2) counting the number of the distances of the original Bluetooth equipment with the deviation value exceeding the preset deviation value;
3) if the number is smaller than or equal to the preset value, calculating the average value of the distances of the original Bluetooth equipment which does not exceed the preset deviation value as the optimized distance of the Bluetooth equipment;
4) if the number is larger than the preset value, calculating the average value of the distances of the original Bluetooth devices which do not exceed the preset deviation value as the first Bluetooth device distance, and calculating the average value of the distances of the original Bluetooth devices which exceed the preset deviation value as the second Bluetooth device distance; respectively allocating a third weight factor and a fourth weight factor to the first Bluetooth device distance and the second Bluetooth device distance, wherein the third weight factor is greater than the fourth weight factor; and calculating to obtain the optimized Bluetooth device distance based on the first Bluetooth device distance, the second Bluetooth device distance, the third weight factor and the fourth weight factor.
6. The method for automatically detecting the wireless earphone in the range of the mobile phone with Bluetooth function as claimed in claim 1, wherein the verification method in S3 is as follows: respectively distributing a first weight factor and a second weight factor for the Bluetooth signal intensity and the Bluetooth device distance, and obtaining verification values based on the Bluetooth signal intensity, the Bluetooth device distance, the first weight factor and the second weight factor; the second preset verification condition is a preset reference value, and if the verification value is greater than or equal to the reference value, the second preset verification condition is met.
7. The method of claim 6 wherein the first weight factor + second weight factor is 1 and the first weight factor is greater than the second weight factor, and wherein the verification value is × the first weight factor + Bluetooth device distance × the second weight factor.
8. The method of claim 7, wherein the first weighting factor is 0.8 and the second weighting factor is 0.2.
CN202010313361.7A 2020-04-20 2020-04-20 Method for automatically detecting wireless earphone in range of mobile phone with Bluetooth function Active CN111356120B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010313361.7A CN111356120B (en) 2020-04-20 2020-04-20 Method for automatically detecting wireless earphone in range of mobile phone with Bluetooth function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010313361.7A CN111356120B (en) 2020-04-20 2020-04-20 Method for automatically detecting wireless earphone in range of mobile phone with Bluetooth function

Publications (2)

Publication Number Publication Date
CN111356120A true CN111356120A (en) 2020-06-30
CN111356120B CN111356120B (en) 2022-08-16

Family

ID=71194966

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010313361.7A Active CN111356120B (en) 2020-04-20 2020-04-20 Method for automatically detecting wireless earphone in range of mobile phone with Bluetooth function

Country Status (1)

Country Link
CN (1) CN111356120B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112367654A (en) * 2020-11-06 2021-02-12 炬力(珠海)微电子有限公司 TWS equipment team forming method and device, electronic equipment and storage medium
WO2022247468A1 (en) * 2021-05-26 2022-12-01 Oppo广东移动通信有限公司 Data processing method and apparatus, and electronic device and storage medium
CN116133160A (en) * 2023-02-22 2023-05-16 珠海格力电器股份有限公司 Automatic pairing method and device of intelligent equipment, processor and electronic equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2355563A1 (en) * 2010-02-10 2011-08-10 Cheng Uei Precision Industry Co., Ltd. Method for automatic pairing to a wireless network
CN104967971A (en) * 2015-06-26 2015-10-07 飞天诚信科技股份有限公司 Method achieving bluetooth automatic return connection in Android system
US20160014545A1 (en) * 2012-06-04 2016-01-14 Qualcomm Incorporated Automatic connection of bluetooth human interface devices
CN105516896A (en) * 2015-12-02 2016-04-20 惠州Tcl移动通信有限公司 Bluetooth interconnection method and system for wearable device and mobile terminal
CN105516902A (en) * 2015-12-22 2016-04-20 惠州Tcl移动通信有限公司 Method and system for Bluetooth connection and Bluetooth device
US20170289787A1 (en) * 2015-12-02 2017-10-05 Huizhou Tcl Mobile Communication Co., Ltd. Bluetooth-based method and system for automatically connecting wearable device with mobile terminal
CN108769972A (en) * 2018-07-12 2018-11-06 南昌黑鲨科技有限公司 The connection control method and bluetooth connection control system of intelligent terminal and bluetooth equipment
CN110139261A (en) * 2019-06-06 2019-08-16 深圳诺康医疗设备股份有限公司 Bluetooth equipment, Bluetooth mobile terminal, bluetooth connect system and method fastly
CN110460983A (en) * 2019-08-06 2019-11-15 RealMe重庆移动通信有限公司 Bluetooth title searching method, device, electronic equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2355563A1 (en) * 2010-02-10 2011-08-10 Cheng Uei Precision Industry Co., Ltd. Method for automatic pairing to a wireless network
US20160014545A1 (en) * 2012-06-04 2016-01-14 Qualcomm Incorporated Automatic connection of bluetooth human interface devices
CN104967971A (en) * 2015-06-26 2015-10-07 飞天诚信科技股份有限公司 Method achieving bluetooth automatic return connection in Android system
CN105516896A (en) * 2015-12-02 2016-04-20 惠州Tcl移动通信有限公司 Bluetooth interconnection method and system for wearable device and mobile terminal
US20170289787A1 (en) * 2015-12-02 2017-10-05 Huizhou Tcl Mobile Communication Co., Ltd. Bluetooth-based method and system for automatically connecting wearable device with mobile terminal
CN105516902A (en) * 2015-12-22 2016-04-20 惠州Tcl移动通信有限公司 Method and system for Bluetooth connection and Bluetooth device
CN108769972A (en) * 2018-07-12 2018-11-06 南昌黑鲨科技有限公司 The connection control method and bluetooth connection control system of intelligent terminal and bluetooth equipment
CN110139261A (en) * 2019-06-06 2019-08-16 深圳诺康医疗设备股份有限公司 Bluetooth equipment, Bluetooth mobile terminal, bluetooth connect system and method fastly
CN110460983A (en) * 2019-08-06 2019-11-15 RealMe重庆移动通信有限公司 Bluetooth title searching method, device, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
M. SETHI等: "Commitment-based device pairing with synchronized drawing", 《2014 IEEE INTERNATIONAL CONFERENCE ON PERVASIVE COMPUTING AND COMMUNICATIONS 》 *
赵磊等: "近距离无线通信技术现状研究", 《科技视界》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112367654A (en) * 2020-11-06 2021-02-12 炬力(珠海)微电子有限公司 TWS equipment team forming method and device, electronic equipment and storage medium
WO2022247468A1 (en) * 2021-05-26 2022-12-01 Oppo广东移动通信有限公司 Data processing method and apparatus, and electronic device and storage medium
CN116133160A (en) * 2023-02-22 2023-05-16 珠海格力电器股份有限公司 Automatic pairing method and device of intelligent equipment, processor and electronic equipment

Also Published As

Publication number Publication date
CN111356120B (en) 2022-08-16

Similar Documents

Publication Publication Date Title
CN111356120B (en) Method for automatically detecting wireless earphone in range of mobile phone with Bluetooth function
CN104853405B (en) Intelligent networking method and smart machine
US10404539B2 (en) Multi-device sensor subsystem joint optimization
JP4352180B2 (en) Wireless communication handover processing method, portable electronic device, and wireless communication handover system
US11223497B2 (en) Method and apparatus for providing notification by interworking plurality of electronic devices
CN104378838B (en) A kind of method and device for establishing wireless connection
EP2355563A1 (en) Method for automatic pairing to a wireless network
US20160150066A1 (en) Method and Apparatus for Providing In-Vehicle Bluetooth Pairing
KR20120102446A (en) Mobile terminal, method for controlling wireless charge thereof, and wireless charging system thereof
JP6459965B2 (en) Wireless communication apparatus and communication control apparatus
US20150052221A1 (en) Method and apparatus for transmitting/receiving data based on wireless communication
CN109450747B (en) Method and device for awakening smart home equipment and computer storage medium
CN109696833A (en) A kind of intelligent home furnishing control method, wearable device and sound-box device
WO2014056342A1 (en) Method, mobile terminal and system for counting coverage blind spots in wireless network
CN104158506A (en) Method, device and terminal for adjusting volume
CN108988909A (en) Audio-frequency processing method and device, electronic equipment, computer readable storage medium
EP3633880A1 (en) Radio frequency interference processing method and electronic device
CN103744574A (en) Method and device for turning off alarm clock of mobile terminal and mobile terminal
CN112230877A (en) Voice operation method and device, storage medium and electronic equipment
CN105718405A (en) Mobile terminal and method for USB interface multiplex of processors of mobile terminal
US10156888B2 (en) Method and apparatus for controlling multiple processors to reduce current consumption
CN107079349A (en) Acquisition methods, the apparatus and system of system information
CN104936255A (en) Wireless access control method, device, router and terminal
CN103684548B (en) Terminal and wireless device method of attachment
CN108449787B (en) Connection control method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant