A reflective photoelectric switch, method, electronic device and storage medium for a Bluetooth headset

By using reflective photoelectric switches and UWB positioning modules in Bluetooth headphones, combined with the attention mechanism adaptive weight network, the problem of the automatic playback/stop function of Bluetooth headphones is easily started or stopped by mistake, achieving more accurate switching control and lower power consumption.

CN119382687BActive Publication Date: 2025-06-06GUANGDONG CHAU LIGHT SOURCE INFRARED SEMICON CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411407634.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-06-06
Estimated Expiration
2044-10-10

AI Technical Summary

Technical Problem

The automatic playback/stop function of existing Bluetooth headsets is prone to error startup or error stop, resulting in poor user experience and high power consumption.

Method used

Reflective photoelectric switches, including FPC, photoelectric sensor and filter, are used to improve the induction speed through the combination of laser emitting diode and silicon photo transistor, and the adaptive weight network of the UWB positioning module and attention mechanism adaptive weight network are adjusted according to the probability of use and position information.

Benefits of technology

It effectively reduces the error switching of Bluetooth headsets, reduces power consumption, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119382687B_ABST
    Figure CN119382687B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a reflective photoelectric switch, method, electronic device and storage medium for a Bluetooth headset, wherein a photoelectric sensor is located above an FPC, and a filter is located above the photoelectric sensor; the photoelectric sensor includes a housing, a laser emitting diode and a silicon phototransistor; the laser diode can emit laser light through a transmitting end to pass through the filter, and the silicon phototransistor is used to receive laser light emitted by the laser diode reflected by an object; the Bluetooth headset is provided with a processor, the processor is connected to the reflective photoelectric switch in communication, and the reflective photoelectric switch can transmit the detected data signal to the processor; the Bluetooth headset is connected to the target electronic device in communication, the Bluetooth headset can receive the use probability sent by the target electronic device, and the processor can control the switch of the Bluetooth headset based on the data signal and the use probability. The implementation of the embodiment of the present application can reduce the erroneous switch of the Bluetooth headset and reduce the power consumption of the Bluetooth headset.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electronic equipment, specifically to the field of Bluetooth headsets, and in particular to a reflective photoelectric switch, method, electronic equipment and storage medium for Bluetooth headsets. Background Art

[0002] With the advancement of electronic devices, Bluetooth headsets have become popular, and with the development of intelligence, current Bluetooth headsets are all equipped with an automatic play / stop function, which is specifically achieved through an optical sensor. Specifically, the Bluetooth headset is started and stopped based on the factory settings of the optical sensor; however, the current automatic play / stop function has the problem of false start or false stop, resulting in poor user experience and high power consumption of the Bluetooth headset. Summary of the invention

[0003] The embodiments of the present invention provide a reflective photoelectric switch, method, electronic device and storage medium for a Bluetooth headset, which can reduce the erroneous switching of the Bluetooth headset and reduce the power consumption of the Bluetooth headset.

[0004] On the one hand, the present invention is an embodiment that provides a reflective photoelectric switch for a Bluetooth headset, the reflective photoelectric switch is arranged in the Bluetooth headset, the reflective photoelectric switch includes an FPC, a photoelectric sensor, and a filter; the photoelectric sensor is located above the FPC, and the filter is located above the photoelectric sensor; the photoelectric sensor includes a housing, a laser emitting diode and a silicon phototransistor, the laser emitting diode and the silicon phototransistor are packaged side by side in the housing, the transmitting end of the laser emitting diode and the receiving end of the silicon phototransistor face the filter; the laser emitting diode can emit laser through the transmitting end to pass through the filter, and the silicon phototransistor is used to receive the laser emitted by the laser emitting diode reflected by an object; the Bluetooth headset is provided with a processor, the processor is communicatively connected to the reflective photoelectric switch, and the reflective photoelectric switch can transmit the detected data signal to the processor; the Bluetooth headset is communicatively connected to a target electronic device, the Bluetooth headset can receive the usage probability sent by the target electronic device, and the processor can control the switch of the Bluetooth headset based on the data signal and the usage probability.

[0005] It can be seen that in the embodiment of the present application, a laser emitting diode and a silicon phototransistor are provided in the Bluetooth headset, which improves the sensing speed and thereby improves the response speed of the Bluetooth headset switch.

[0006] Preferably, the Bluetooth headset and the target electronic device are provided with UWB positioning modules.

[0007] Specifically, a UWB transmitting module is provided in the Bluetooth headset, and a UWB receiving module is provided in the target electronic device. The specific UWB receiving module includes multiple receiving antennas. The target electronic device can calculate the distance between the Bluetooth headset and each receiving antenna based on the time points of the signals received by the multiple receiving antennas, and then determine the position and distance of the Bluetooth headset relative to the target electronic device.

[0008] On the other hand, the present invention provides a switch control method for a Bluetooth headset, wherein the Bluetooth headset comprises a left Bluetooth headset and a right Bluetooth headset, wherein the left Bluetooth headset and the right Bluetooth headset are both provided with a processor, a first position positioning module and a reflective photoelectric switch, wherein the left Bluetooth headset and the right Bluetooth headset are communicatively connected with a target electronic device, wherein the target electronic device is provided with a second position positioning module, wherein the method comprises: the target electronic device determines a usage probability of the Bluetooth headset based on historical data; the target electronic device sends the usage probability to the left Bluetooth headset and the right Bluetooth headset; the left Bluetooth headset and the right Bluetooth headset set the usage probability based on the usage probability The sensitivity of the reflective photoelectric switch; when it is detected that the reflective photoelectric switch is in the on state: based on the first position positioning module and the second position positioning module, determine the position and distance of the left Bluetooth headset and the right Bluetooth headset relative to the target electronic device; based on the position and the distance, determine the angle, which is the angle formed by the first connecting line between the left Bluetooth headset and the target electronic device and the second connecting line between the right Bluetooth headset and the target electronic device; under the condition that the angle is less than or equal to a preset angle, set the Bluetooth headset to the start state, and under the condition that the angle is greater than the preset angle, determine the state of the Bluetooth headset based on the preset condition.

[0009] Preferably, the reflective photoelectric switch can output different voltage values ​​based on the intensity of the reflected light; the Bluetooth headset can set a voltage threshold, and when the Bluetooth headset is close to an object, the voltage output by the reflective photoelectric switch is greater than the voltage threshold, the Bluetooth headset is turned on; when the Bluetooth headset is away from the object, the voltage output by the reflective photoelectric switch is less than the voltage threshold, the Bluetooth headset is turned off; the Bluetooth headset can adjust the voltage threshold based on the usage probability, that is, when the usage probability is higher than the preset probability value, the sensitivity is increased, that is, the voltage threshold is lowered; when the usage probability is less than the preset probability value, the sensitivity is reduced, that is, the voltage threshold is increased.

[0010] Preferably, the preset angle can be set based on historical prior data. Specifically, the target electronic device is a mobile phone. When the user wears a left Bluetooth headset and a right Bluetooth headset, the closer the mobile phone is to the center of the face, the larger the angle formed by the line connecting the left Bluetooth headset and the right Bluetooth headset. The farther the mobile phone is from the center of the face, the larger the angle formed by the line connecting the left Bluetooth headset and the right Bluetooth headset. The corresponding angle can be determined based on the closest distance when the user wears the left Bluetooth headset and the right Bluetooth headset and uses the mobile phone. The angle is the preset angle. For example, when the user uses the mobile phone, the closest distance from the face is 8 cm, and the mobile phone is located in the center of the face. At this time, the corresponding angle is 80 degrees, and the preset angle is 80 degrees. When it is greater than 80 degrees, it is considered that the user is not wearing the left Bluetooth headset and the right Bluetooth headset at the same time, and the Bluetooth headset is set to the off state. When it is less than 80 degrees, it is considered that the user is wearing the left Bluetooth headset and the right Bluetooth headset at the same time, and the Bluetooth headset is set to the on state.

[0011] Preferably, the target electronic device determines the probability of using the Bluetooth headset based on historical data and environmental perception information, including: obtaining historical data, the historical data including the start time and total usage time of the Bluetooth headset in the past T periods, and the start time and total usage time of multiple applications in the electronic device; obtaining current data, the current data including the current time and the currently opened application, inputting the historical data and current data into an adaptive weight network using an attention mechanism for prediction, and outputting the probability of using the Bluetooth headset.

[0012] Preferably, after matching with the Bluetooth headset, the target electronic device can monitor the connection status and the time and market for each application to use the Bluetooth headset after the connection. The specific period can be set to 1 day, and T can be 7, that is, the target electronic device can perform probability calculation based on the usage time and usage duration of the application in the past week.

[0013] Preferably, the neural network can analyze the types and correlations of historically used applications and currently opened applications, and then comprehensively output the probability of using the Bluetooth headset at the current time point, and then adjust the sensitivity of the Bluetooth headset reflective photoelectric switch based on the probability.

[0014] Preferably, the attention mechanism adaptive weight network includes an encoding network and a prediction network; the encoding network extracts context variables of the data; the prediction network generates a prediction result according to the context variables; the inputting of the historical data and the current data into the attention mechanism adaptive weight network for prediction, and outputting the Bluetooth headset usage probability, specifically includes: inputting the T period historical data into the encoding network, adjusting the weights through the attention mechanism adaptive weight module, and obtaining the context variables C of T periods:

[0015]

[0016] Where T is the number of cycles, is the time attention value of time period t, is the hidden state of time period t;

[0017] The weights are calculated using the softmax function.

[0018] Score for attention,

[0019] , , are learnable parameters, To predict the hidden state of the network in time period T+2;

[0020] The context variable , the hidden state of time period T+2 , time period T+2 prediction network The output of is taken as input, and the prediction network output of time period T+3 is taken as the prediction output. The calculation steps of the prediction output are iterated until the future A matrix sequence of time periods; according to the future The matrix sequence of time periods obtains the Bluetooth headset usage probability.

[0021] In different cycles of headphone use, the time frequency of using headphones in different cycles is different. If one cycle is a day and T is 7, the usage frequency from Monday to Friday and Saturday and Sunday will be quite different. Therefore, the impact of some periodic data on the prediction performance is different from that of other periodic data. Therefore, the attention mechanism is used to adaptively calculate the weight of the cycle, thereby reflecting the different impacts of different cycles on the prediction results and obtaining more accurate prediction results.

[0022] The method of determining the state of the Bluetooth headset based on a preset condition under the condition that the angle is greater than the preset angle includes: if the angle is greater than the preset angle, the electronic device records the positions of the left Bluetooth headset and the right Bluetooth headset in space within a first preset time period; if the position of the first Bluetooth headset in the space remains unchanged and the position of the second Bluetooth headset in the space changes within the first preset time period, setting the first Bluetooth headset to an off state and the second Bluetooth headset to an on state, the first Bluetooth headset being one of the left Bluetooth headset or the right Bluetooth headset, and the second Bluetooth headset being the other one of the left Bluetooth headset and the right Bluetooth headset relative to the first Bluetooth headset.

[0023] Preferably, the target electronic device can establish a spatial rectangular coordinate system, and calculate its own position changes in the spatial rectangular coordinate system in real time based on its own acceleration sensor and gyroscope, and calculate the positions of the left Bluetooth headset and the right Bluetooth headset in space based on the relative positions of the left Bluetooth headset and the right Bluetooth headset and the target electronic device.

[0024] The position change is specifically used to determine whether the Bluetooth headset is stationary within a first preset time period. For example, the first preset time period is 60 seconds. At the 1st second, the left Bluetooth headset is at position A, at the 30th second the left Bluetooth headset is at position B, and at the 60th second the left Bluetooth headset returns to position A, that is, there is a position change in the 60-second period. The Bluetooth headset can be set to the on state; if the left Bluetooth headset is always at position A within 60 seconds, the Bluetooth headset can be set to the off state.

[0025] The first position positioning module and the second position positioning module are matched UWB positioning modules.

[0026] Under the condition that the angle is greater than the preset angle, determining the state of the Bluetooth headset based on the preset conditions, including: under the condition that the angle is greater than the preset angle: detecting the first height and the second height of the left Bluetooth headset and the right Bluetooth headset relative to the target electronic device respectively; setting the Bluetooth headset to the start state if the preset conditions are met within the second preset time period, otherwise setting the Bluetooth headset to the off state; the preset condition is: the height difference between the first height and the second height is less than the preset height difference value, and there is position fluctuation of the left Bluetooth headset and the right Bluetooth headset within the second preset time period.

[0027] There is a situation where two people wear the Bluetooth headset. When the left Bluetooth headset and the right Bluetooth headset are worn by different people, the angle may be greater than the preset angle, and the headset needs to be started; when two people wear it, it is usually a scene of watching TV series together. In this scene, the people are usually at a similar height. Therefore, it is possible to determine whether two people are using it at the same time by monitoring the height difference; that is, if it is detected that there is fluctuation between the left Bluetooth headset and the right Bluetooth headset, it means that the Bluetooth headset is not placed statically on the object. If the height difference is greater than the preset height difference value, it means that it is not a two-person wearing scenario, then the Bluetooth headset is set to the off state; if the height difference is less than the preset height difference value, it is a two-person wearing scenario, then the Bluetooth headset is set to the started state.

[0028] On the other hand, the present invention provides a Bluetooth headset, comprising: a processor, suitable for implementing one or more instructions; and a computer storage medium, the computer storage medium storing one or more instructions, the one or more instructions being suitable for being loaded by the processor and executing the above-mentioned switch control method for the Bluetooth headset.

[0029] On the other hand, the present invention provides a computer storage medium, characterized in that the computer storage medium stores one or more instructions, and the one or more instructions are suitable for being loaded by a processor and executing the above-mentioned switch control method for a Bluetooth headset.

[0030] It can be seen that the present invention improves the sensing speed by setting a laser reflection photoelectric switch; and calculates the current usage probability based on historical data and then adjusts the sensitivity of the switch, thereby reducing the possibility of misoperation, and determines whether the current headset is in a wearing state through the distance and angle between the target electronic device and the Bluetooth headset, and then determines the start and shut down state of the Bluetooth headset according to the wearing state, further reducing the situation of incorrect switching of the Bluetooth headset, thereby reducing the power consumption of the Bluetooth headset and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0032] Figure 1A The present invention is a schematic diagram of a reflective photoelectric switch for a Bluetooth headset provided in an embodiment of the present invention.

[0033] Figure 1B A switch control scene diagram for a Bluetooth headset provided by an embodiment of the present invention.

[0034] Figure 2 The present invention is a flowchart of a reflective photoelectric switch system for a Bluetooth headset provided by an embodiment of the present invention.

[0035] Figure 3 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0036] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0037] like Figure 1A As shown, Figure 1A and Figure 1BIt is a schematic diagram of a reflective photoelectric switch for a Bluetooth headset provided in an embodiment of the present application, which includes FPC101, a photoelectric sensor 102, and a filter 103; the photoelectric sensor 102 is located above the FPC101, and the filter 103 is located above the photoelectric sensor; the photoelectric sensor includes a housing, a laser emitting diode 1021 and a silicon photo transistor 1022, the laser emitting diode 1021 and the silicon photo transistor 1022 are packaged side by side in the housing, and the emitting end of the laser emitting diode 1021 and the receiving end of the silicon photo transistor 1022 face the filter 103; the laser emitting diode can emit laser through the emitting end of the laser emitting diode 1021 to pass through the filter 103, and the silicon photo transistor 1022 is used to receive the laser emitted by the laser emitting diode 1021 reflected by an object.

[0038] Based on the above description, the embodiment of the present invention proposes

[0039] A reflective photoelectric switch for a Bluetooth headset, the reflective photoelectric switch is arranged in the Bluetooth headset, the reflective photoelectric switch comprises an FPC, a photoelectric sensor, and a filter; the photoelectric sensor is located above the FPC, and the filter is located above the photoelectric sensor; the photoelectric sensor comprises a housing, a laser emitting diode and a silicon phototransistor, the laser emitting diode and the silicon phototransistor are packaged side by side in the housing, the transmitting end of the laser emitting diode and the receiving end of the silicon phototransistor face the filter; the laser emitting diode can emit laser through the transmitting end to pass through the filter, and the silicon phototransistor is used to receive the laser emitted by the laser emitting diode reflected by an object; the Bluetooth headset is provided with a processor, the processor is communicatively connected with the reflective photoelectric switch, and the reflective photoelectric switch can transmit the detected data signal to the processor; the Bluetooth headset is communicatively connected with a target electronic device, the Bluetooth headset can receive the usage probability sent by the target electronic device, and the processor can control the switch of the Bluetooth headset based on the data signal and the usage probability.

[0040] It can be seen that in the embodiment of the present application, a laser emitting diode and a silicon phototransistor are provided in the Bluetooth headset, which improves the sensing speed and thereby improves the response speed of the Bluetooth headset switch.

[0041] In a possible implementation manner, the Bluetooth headset and the target electronic device are provided with a UWB positioning module.

[0042] Specifically, a UWB transmitting module is provided in the Bluetooth headset, and a UWB receiving module is provided in the target electronic device. The specific UWB receiving module includes multiple receiving antennas. The target electronic device can calculate the distance between the Bluetooth headset and each receiving antenna based on the time points of the signals received by the multiple receiving antennas, and then determine the position and distance of the Bluetooth headset relative to the target electronic device.

[0043] On the other hand, the present invention provides a switch control method for a Bluetooth headset, wherein the Bluetooth headset comprises a left Bluetooth headset and a right Bluetooth headset, wherein the left Bluetooth headset and the right Bluetooth headset are both provided with a processor, a first position positioning module and the reflective photoelectric switch of the above aspect, wherein the left Bluetooth headset and the right Bluetooth headset are communicatively connected with a target electronic device, and the target electronic device is provided with a second position positioning module, such as Figure 2 As shown, the method includes:

[0044] Step S201: the target electronic device determines the Bluetooth headset usage probability based on historical data;

[0045] Step S202: The target electronic device sends the usage probability to the left Bluetooth headset and the right Bluetooth headset;

[0046] Step S203: the left Bluetooth headset and the right Bluetooth headset set the sensitivity of the reflective photoelectric switch based on the usage probability;

[0047] Step S204: when it is detected that the reflective photoelectric switch is in the on state: determining the position and distance of the left Bluetooth headset and the right Bluetooth headset relative to the target electronic device based on the first position positioning module and the second position positioning module;

[0048] Step S205: determining an angle based on the position and the distance, where the angle is an angle formed by a first connection line between the left Bluetooth headset and the target electronic device and a second connection line between the right Bluetooth headset and the target electronic device.

[0049] For details, see Figure 1B , Figure 1B A switch control scene diagram for a Bluetooth headset is provided in an embodiment of the present invention; it includes a left Bluetooth headset 104, a right Bluetooth headset 105 and a target electronic device 106, wherein a first connection line between the left Bluetooth headset 104 and the target electronic device 106 and a second connection line between the right Bluetooth headset 105 and the target electronic device 106 form an angle β.

[0050] Step S206: When the included angle is less than or equal to a preset angle, the Bluetooth headset is set to an activated state; when the included angle is greater than the preset angle, the state of the Bluetooth headset is determined based on preset conditions.

[0051] Optionally, the reflective photoelectric switch can output different voltage values ​​based on the intensity of the reflected light; the Bluetooth headset can set a voltage threshold, and when the Bluetooth headset is close to an object, the voltage output by the reflective photoelectric switch is greater than the voltage threshold, the Bluetooth headset is turned on; when the Bluetooth headset is away from the object, the voltage output by the reflective photoelectric switch is less than the voltage threshold, the Bluetooth headset is turned off; the Bluetooth headset can adjust the voltage threshold based on the usage probability, that is, when the usage probability is higher than the preset probability value, the sensitivity is increased, that is, the voltage threshold is lowered; when the usage probability is less than the preset probability value, the sensitivity is reduced, that is, the voltage threshold is increased.

[0052] Optionally, the preset angle can be set based on historical prior data. Specifically, the target electronic device is a mobile phone. When the user wears a left Bluetooth headset and a right Bluetooth headset, the closer the mobile phone is to the center of the face, the larger the angle formed by the line connecting the left Bluetooth headset and the right Bluetooth headset. The farther the mobile phone is from the center of the face, the larger the angle formed by the line connecting the left Bluetooth headset and the right Bluetooth headset. The corresponding angle can be determined based on the closest distance when the user wears the left Bluetooth headset and the right Bluetooth headset and uses the mobile phone. The angle is the preset angle. For example, when the user uses the mobile phone, the closest distance to the face is 8 cm, and the mobile phone is located in the center of the face. At this time, the corresponding angle is 80 degrees, and the preset angle is 80 degrees. When it is greater than 80 degrees, it is considered that the user is not wearing the left Bluetooth headset and the right Bluetooth headset at the same time, and the Bluetooth headset is set to the off state. When it is less than 80 degrees, it is considered that the user is wearing the left Bluetooth headset and the right Bluetooth headset at the same time, and the Bluetooth headset is set to the on state.

[0053] It can be seen that the present invention improves the sensing speed by setting a laser reflection photoelectric switch; and calculates the current usage probability based on historical data and then adjusts the sensitivity of the switch, thereby reducing the possibility of misoperation. The distance and angle between the target electronic device and the Bluetooth headset are used to determine whether the current headset is in a wearing state, and then the start and shut down state of the Bluetooth headset is determined according to the wearing state, thereby further reducing the possibility of incorrect switching of the Bluetooth headset.

[0054] In one possible implementation, the target electronic device determines the probability of using a Bluetooth headset based on historical data and environmental perception information, including: obtaining historical data, the historical data including the start time and total usage time of the Bluetooth headset in the past T periods, and the start time and total usage time of multiple applications in the electronic device; obtaining current data, the current data including the current time and the currently opened application, inputting the historical data and current data into an adaptive weight network using an attention mechanism for prediction, and outputting the probability of using the Bluetooth headset.

[0055] Optionally, after matching with the Bluetooth headset, the target electronic device can monitor the connection status and the time and market for each application to use the Bluetooth headset after the connection. The specific period can be set to 1 day, and T can be 7, that is, the target electronic device can perform probability calculation based on the usage time and usage duration of the application in the past week.

[0056] Optionally, the neural network can analyze the types and correlations of historically used applications and currently opened applications, and then comprehensively output the probability of using the Bluetooth headset at the current time point, and then adjust the sensitivity of the Bluetooth headset reflective photoelectric switch based on the probability.

[0057] In a possible implementation, the attention mechanism adaptive weight network includes an encoding network and a prediction network; the encoding network extracts context variables of the data; the prediction network generates a prediction result according to the context variables; the inputting of the historical data and the current data into the attention mechanism adaptive weight network for prediction, and outputting the probability of using the Bluetooth headset, specifically includes: inputting the historical data of the T period into the encoding network, adjusting the weights through the attention mechanism adaptive weight module, and obtaining the context variables C of the T period:

[0058]

[0059] Where T is the number of cycles, is the time attention value of time period t, is the hidden state of time period t;

[0060] The weights are calculated using the softmax function.

[0061] Score for attention,

[0062] , , are learnable parameters, To predict the hidden state of the network in time period T+2;

[0063] The context variable , the hidden state of time period T+2 , time period T+2 prediction network The output of is taken as input, and the prediction network output of time period T+3 is taken as the prediction output. The calculation steps of the prediction output are iterated until the future A matrix sequence of time periods; according to the future The matrix sequence of time periods obtains the Bluetooth headset usage probability.

[0064] It should be noted that in different cycles of headphone use, the time frequency of using headphones in different cycles is different. If one cycle is one day and T is 7, the usage frequency from Monday to Friday and Saturday and Sunday will be quite different. Therefore, some periodic data have different impacts on the prediction performance than other periodic data. Therefore, the attention mechanism is used to adaptively calculate the weights of the cycles, thereby reflecting the different impacts of different cycles on the prediction results and obtaining more accurate prediction results.

[0065] In a possible implementation, under the condition that the angle is greater than the preset angle, determining the state of the Bluetooth headset based on a preset condition includes: if the angle is greater than the preset angle, the electronic device records the positions of the left Bluetooth headset and the right Bluetooth headset in space within a first preset time period; if the position of the first Bluetooth headset in the space remains unchanged and the position of the second Bluetooth headset in the space changes within the first preset time period, setting the first Bluetooth headset to an off state and the second Bluetooth headset to an on state, the first Bluetooth headset being one of the left Bluetooth headset or the right Bluetooth headset, and the second Bluetooth headset being the other one of the left Bluetooth headset and the right Bluetooth headset relative to the first Bluetooth headset.

[0066] Optionally, the target electronic device can establish a spatial rectangular coordinate system, and calculate its own position changes in the spatial rectangular coordinate system in real time based on its own acceleration sensor and gyroscope, and calculate the positions of the left Bluetooth headset and the right Bluetooth headset in space based on the relative positions of the left Bluetooth headset and the right Bluetooth headset and the target electronic device.

[0067] It should be noted that the position change is specifically used to determine whether the Bluetooth headset is stationary within a first preset time period. For example, the first preset time period is 60 seconds. At the 1st second, the left Bluetooth headset is at position A, at the 30th second the left Bluetooth headset is at position B, and at the 60th second the left Bluetooth headset returns to position A, that is, there is a position change in the 60-second period. The Bluetooth headset can be set to the on state; if the left Bluetooth headset is always at position A within 60 seconds, the Bluetooth headset can be set to the off state.

[0068] In a possible implementation manner, the first position positioning module and the second position positioning module are matched UWB positioning modules.

[0069] In a possible implementation, under the condition that the angle is greater than the preset angle, the state of the Bluetooth headset is determined based on preset conditions, including: under the condition that the angle is greater than the preset angle: detecting the first height and the second height of the left Bluetooth headset and the right Bluetooth headset relative to the target electronic device, respectively; if the preset conditions are met within a second preset time period, setting the Bluetooth headset to an on state, otherwise setting the Bluetooth headset to an off state; the preset condition is: the height difference between the first height and the second height is less than a preset height difference value, and there is position fluctuation of the left Bluetooth headset and the right Bluetooth headset within the second preset time period.

[0070] It should be noted that there are situations where two people wear Bluetooth headsets. When the left Bluetooth headset and the right Bluetooth headset are worn by different people, the angle may be greater than the preset angle, and the headset needs to be started; when two people wear it, it is usually a scene of watching TV series together. In this scene, the people are usually at a similar height. Therefore, it is possible to determine whether two people are using it at the same time by monitoring the height difference; that is, if fluctuations are detected between the left Bluetooth headset and the right Bluetooth headset, indicating that the Bluetooth headset is not placed statically on an object, if the height difference is greater than the preset height difference value, that is, it is not a two-person wearing scenario, then the Bluetooth headset is set to the off state; if the height difference is less than the preset height difference value, that is, it is a two-person wearing scenario, then the Bluetooth headset is set to the started state.

[0071] The embodiment of the present invention also provides a computer storage medium (Memory), which is a memory device in an electronic device for storing programs and data. It is understandable that the computer storage medium here can include both built-in storage media in the electronic device and, of course, extended storage media supported by the electronic device. The computer storage medium provides a storage space, which stores the operating system of the electronic device. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer storage medium here can be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk storage; optionally, it can also be at least one computer storage medium located away from the aforementioned processor.

[0072] Figure 33 is a schematic diagram of the structure of a Bluetooth headset provided in an embodiment of the present application. The Bluetooth headset includes: at least one processor 301, such as a central processing unit (CPU), at least one memory 302, and at least one bus 303.

[0073] The memory 302 may store program instructions, and the processor 301 may be used to call the program instructions to execute a switch control method for a Bluetooth headset.

[0074] A person of ordinary skill in the art can understand that all or part of the steps in various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electrically-erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM), a solid state disk (SSD) or other optical disk storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0075] It should be noted that all steps of the embodiments of the present application are performed under legal and compliant conditions, that is, all steps of the embodiments of the present application are performed with authorization.

[0076] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.

Claims

1. A switch control method for a Bluetooth headset, characterized in that: The Bluetooth headset comprises a left Bluetooth headset and a right Bluetooth headset, the left Bluetooth headset and the right Bluetooth headset are both provided with a processor, a first position positioning module and a reflective photoelectric switch, the left Bluetooth headset and the right Bluetooth headset are communicatively connected with a target electronic device, and the target electronic device is provided with a second position positioning module, and the method comprises: The target electronic device determines the Bluetooth headset usage probability based on historical data; The target electronic device sends the usage probability to the left Bluetooth headset and the right Bluetooth headset; The left Bluetooth headset and the right Bluetooth headset set the sensitivity of the reflective photoelectric switch based on the usage probability; When it is detected that the reflective photoelectric switch is in the on state: Determine the position and distance of the left Bluetooth headset and the right Bluetooth headset relative to the target electronic device based on the first position positioning module and the second position positioning module; Determine an angle based on the position and the distance, where the angle is an angle formed by a first connection line between the left Bluetooth headset and the target electronic device and a second connection line between the right Bluetooth headset and the target electronic device; Under the condition that the included angle is less than or equal to a preset angle, setting the Bluetooth headset to an activated state; under the condition that the included angle is greater than the preset angle, determining the state of the Bluetooth headset based on a preset condition; The target electronic device determines the Bluetooth headset usage probability based on historical data, including: Acquire historical data, where the historical data includes the start time and total usage time of the Bluetooth headset in the past T cycles, and the start time and total usage time of multiple applications in the electronic device; Get current data, where the current data includes the current time and the currently opened application, input the historical data and the current data into an attention mechanism adaptive weight network for prediction, and output the probability of using the Bluetooth headset.

2. The method according to claim 1, characterized in that The attention mechanism adaptive weight network includes an encoding network and a prediction network; the encoding network extracts context variables of data; the prediction network generates prediction results according to the context variables; The inputting of the historical data and the current data into an attention mechanism adaptive weight network for prediction, and outputting the Bluetooth headset usage probability specifically includes: The historical data of the T periods are input into the encoding network, and the weights are adjusted through the attention mechanism adaptive weight module to obtain the context variables C of the T periods: ; Where T is the number of cycles, is the time attention value of time period t, is the hidden state of time period t; The attention value is calculated by the softmax function. ; Score for attention, ; , , are learnable parameters, To predict the hidden state of the network in time period T+2; The context variable , the hidden state of time period T+2 , time period T+2 prediction network The output of is taken as input, and the prediction network output of time period T+3 is taken as prediction output. Iterate the calculation steps of the prediction output until the future Matrix sequence of time periods; According to the future The matrix sequence of time periods obtains the Bluetooth headset usage probability.

3. The method according to claim 1, characterized in that The step of setting the Bluetooth headset to an off state under the condition that the angle is greater than the preset angle includes: If the angle is greater than the preset angle, the target electronic device records the positions of the left Bluetooth headset and the right Bluetooth headset in space within a first preset time period; If the position of the first Bluetooth headset in the space remains unchanged and the position of the second Bluetooth headset in the space changes within the first preset time period, the first Bluetooth headset is set to an off state and the second Bluetooth headset is set to an on state, the first Bluetooth headset is one of the left Bluetooth headset or the right Bluetooth headset, and the second Bluetooth headset is the other one of the left Bluetooth headset and the right Bluetooth headset relative to the first Bluetooth headset.

4. The method according to claim 3, characterized in that The first position positioning module and the second position positioning module are matched UWB positioning modules.

5. The method according to claim 4, characterized in that Under the condition that the angle is greater than the preset angle, determining the state of the Bluetooth headset based on a preset condition includes: Under the condition that the angle is greater than the preset angle: Detecting a first height and a second height of the left Bluetooth headset and the right Bluetooth headset relative to the target electronic device, respectively; If the preset condition is met within the second preset time period, the Bluetooth headset is set to an activated state, otherwise the Bluetooth headset is set to an inactivated state; The preset condition is: the height difference between the first height and the second height is less than a preset height difference value, and there is position fluctuation between the left Bluetooth headset and the right Bluetooth headset within the second preset time period.

6. A reflective photoelectric switch for a Bluetooth headset, characterized in that: Used to execute the switch control method for a Bluetooth headset according to any one of claims 1 to 5; the reflective photoelectric switch is arranged in the Bluetooth headset, and the reflective photoelectric switch includes an FPC, a photoelectric sensor, and a filter; The photoelectric sensor is located above the FPC, and the filter is located above the photoelectric sensor; The photoelectric sensor comprises a housing, a laser emitting diode and a silicon phototransistor, wherein the laser emitting diode and the silicon phototransistor are packaged side by side in the housing, and the emitting end of the laser emitting diode and the receiving end of the silicon phototransistor face the filter; The laser emitting diode can emit laser light through the emitting end to pass through the filter, and the silicon phototransistor is used to receive the laser light emitted by the laser emitting diode and reflected by the object; The Bluetooth headset is provided with a processor, the processor is communicatively connected with the reflective photoelectric switch, and the reflective photoelectric switch can transmit the detected data signal to the processor; The Bluetooth headset is communicatively connected to a target electronic device, and the Bluetooth headset can receive a usage probability sent by the target electronic device. The processor can control the switch of the Bluetooth headset based on the data signal and the usage probability.

7. The reflective photoelectric switch for a Bluetooth headset according to claim 6, characterized in that: The Bluetooth headset and the target electronic device are provided with UWB positioning modules.

8. A Bluetooth headset, characterized in that: include: a processor adapted to implement one or more instructions; as well as, A computer storage medium storing one or more instructions, wherein the one or more instructions are suitable for being loaded by the processor and executing the switch control method for a Bluetooth headset as described in any one of claims 1 to 5.

9. A computer storage medium, characterized in that The computer storage medium stores one or more instructions, and the one or more instructions are suitable for being loaded by a processor and executing the switch control method for a Bluetooth headset as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Search positioning method and device, electronic equipment and storage medium

    CN111970672A

  • Improved heart rate detection Bluetooth earphone

    CN212850942U