Detection method, electronic equipment and readable storage medium
Patent Information
- Application Number
- CN202280090028.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-27
- Publication Date
- 2024-09-06
AI Technical Summary
There is a problem of misjudgment in the detection of the entry and exit box between existing wireless earphones and the charging box. The detection accuracy may be affected by external electromagnetic environment interference caused by poor metal contact contact or abnormal working of the charging box.
By setting magnets and Hall sensors on the charging box, and setting magnetic sensors on the wireless earphones, the state switching of the magnetic sensor and the electrical connection between the power receiving terminal and the power supply terminal are detected, and the state of the wireless earphones entering and exiting the box and the charging box are determined based on the signal strength. working status.
It improves the success rate of wireless headset entry and exit box detection, avoids misjudgments caused by external electromagnetic environment interference, poor metal contact contact and abnormal working of the charging box, and achieves more accurate status judgment.
Smart Images

Figure CN118614079A
Abstract
Description
A detection method, electronic device and readable storage medium
Technical field
[0001] The present application relates to the technical field of portable listening devices, and in particular to a detection method, an electronic device, and a readable storage medium. [Background Technology]
[0002] As wireless earbuds become increasingly intelligent and portable, their use is increasing with charging cases. These pairs allow users to enjoy a longer battery life and a more intelligent experience, by storing the earbuds in the case and charging them via metal contacts.
[0003] In the prior art, wireless earphones detect whether the wireless earphones are entering or exiting the box by judging whether an electrical connection is established between the metal contacts between the wireless earphones and the charging box. However, this has many defects. For example, poor contact between the metal contacts between the charging box and the wireless earphones may lead to misjudgment of the entry and exit status of the wireless earphones; or, abnormal working status of the charging box may lead to misjudgment of the entry and exit status of the wireless earphones.
[0004] [Summary of the invention]
[0005] This application provides at least one detection method, electronic device, and readable storage medium to accurately determine the status of wireless headphones and their corresponding charging box.
[0006] In a first aspect, the present application provides a detection method for detecting the status of a wireless headset and a charging box, wherein the charging box is provided with a magnet and the wireless headset is provided with a magnetic sensor. The detection method includes:
[0007] detecting whether a detection signal of the magnetic sensor switches from a first state to a second state;
[0008] Check whether the power receiving terminal of the wireless headset is electrically connected to the power supply terminal of the charging box.
[0009] Optionally, the method further comprises:
[0010] In response to the detection signal being switched to the second state and the power receiving terminal being electrically connected to the power supply terminal, an entry indication signal is generated to indicate that the wireless headset has been placed in the charging box.
[0011] Optionally, the method further comprises:
[0012] In response to the detection signal being switched to the second state and the power receiving terminal being not electrically connected to the power supply terminal, it is detected whether the detection signal maintains the second state.
[0013] Optionally, the method further comprises:
[0014] In response to the detection signal not maintaining the second state, a non-box indication signal is generated to indicate that the wireless headset is not placed in the charging box.
[0015] Optionally, the method further comprises:
[0016] In response to detecting that the detection signal maintains the second state, a first fault indication signal is generated.
[0017] Optionally, the step of detecting whether the detection signal of the magnetic sensor switches from the first state to the second state includes:
[0018] Detecting whether the signal strength of the detection signal is greater than or equal to a preset strength threshold;
[0019] In response to the signal strength being greater than or equal to the strength threshold, the detection signal is determined to be in the second state, and in response to the signal strength being less than the strength threshold, the detection signal is determined to be in the first state.
[0020] Optionally, the method further comprises:
[0021] In response to the first fault indication signal, detecting whether a wireless connection can be established between the wireless headset and the charging box;
[0022] In response to a wireless connection being established between the wireless headset and the charging box, generating a third fault indication signal;
[0023] In response to a failure to establish a wireless connection between the wireless headset and the charging box, a fourth fault indication signal is generated.
[0024] Optionally, the magnetic sensor is a Hall sensor.
[0025] A second aspect of the present application provides an electronic device, comprising a memory and a processor coupled to each other, wherein the processor is configured to execute program instructions stored in the memory to implement the above-mentioned detection method.
[0026] A third aspect of the present application provides a computer-readable storage medium having program instructions stored thereon, which implement the above-mentioned detection method when the program instructions are executed by a processor.
[0027] The beneficial effects of the present application are as follows: Different from the prior art, the present application obtains a detection signal from a magnetic sensor provided on the wireless headset through the first processor of the wireless headset, and determines whether the detection signal switches from a first state to a second state. At the same time, the first processor determines whether the power receiving terminal of the wireless headset is electrically connected to the power supply terminal of the charging box. When the first processor determines that the detection signal switches from the first state to the second state and the power receiving terminal is electrically connected to the power supply terminal, it generates an entry indication signal for indicating that the wireless headset has been placed in the charging box; when the first processor determines that the detection signal switches to the second state and the power receiving terminal is not electrically connected to the power supply terminal, it further detects whether the detection signal maintains the second state. If the detection signal maintains the second state, it generates a first fault indication signal. If the detection signal does not maintain the second state, it generates a non-entry indication signal for indicating that the wireless headset has not been placed in the charging box. This application combines the state switching judgment of the detection signal of the magnetic sensor with the judgment of whether the power receiving terminal of the wireless headset is electrically connected to the power supply terminal of the charging box to judge the entry and exit status of the wireless headset and the working status of the charging box, so as to avoid interference caused by external electromagnetic environment interference, poor contact of metal contacts between the wireless headset and the charging box, abnormal operation of the charging box, etc., thereby improving the success rate of wireless headset entry and exit detection.
[0028] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application.
Brief Description of the Drawings
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0030] FIG1 is a schematic flow chart of an embodiment of a detection method of the present application;
[0031] FIG2 is a schematic diagram of the specific process of step S11 in FIG1 ;
[0032] FIG3 is a schematic diagram of a framework of an electronic device according to an embodiment of the present application;
[0033] FIG4 is a schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. [Specific implementation method]
[0034] In order to enable those skilled in the art to better understand the technical solutions of the present application, the detection method, electronic device, and readable storage medium provided by the present application are further described in detail below in conjunction with the accompanying drawings and specific embodiments. It will be understood that the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts are within the scope of protection of the present application.
[0035] The terms "first," "second," and the like in this application are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements, but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0036] Wireless headphones can be used in conjunction with electronic devices such as mobile phones, laptops, watches, etc. to process the electronic devices' audio services such as media and calls, as well as some other data services. The premise for the use of wireless headphones in conjunction with the above-mentioned electronic devices to provide users with various services is that the wireless headphones are taken out of the headphone box by the user. Among them, when the wireless headphones are taken out of the headphone box by the user, the wireless functions (such as Bluetooth function and wearing detection function, etc.) need to be detected in time. Similarly, when the wireless headphones are placed in the headphone box, the entry of the wireless headphones into the box needs to be detected in time so that the above functions of the wireless headphones can be turned off in time to save the power of the wireless headphones. It can be seen that the entry and exit detection of wireless headphones is particularly important for wireless headphones.
[0037] The present application provides a method for detecting the status of wireless earphones and a charging box. Specifically, by combining the state switching judgment of the detection signal of the magnetic sensor with the judgment of whether the power receiving terminal of the wireless earphone is electrically connected to the power supply terminal of the charging box, the method can determine the entry and exit status of the wireless earphones and the working status of the charging box, thereby avoiding interference caused by external electromagnetic environment interference, poor contact between the metal contacts of the wireless earphones and the charging box, abnormal operation of the charging box, and other scenarios, thereby improving the success rate of wireless earphone entry and exit detection.
[0038] Among them, the charging box that needs to be detected in this application is provided with a second processor, a magnet and a power supply terminal, and the second processor is electrically connected to the power supply terminal. The wireless headset that needs to be detected in this application is provided with a first processor, a magnetic sensor and a power receiving terminal, and the first processor is electrically connected to the magnetic sensor and the power receiving terminal respectively. Optionally, the magnetic sensor in this embodiment is specifically a Hall sensor. Among them, the magnetic sensor is used to generate a detection signal based on the magnetic field detected around the wireless headset, and the first processor is used to receive the detection signal of the magnetic sensor and determine whether the detection signal is switched from the first state to the second state.
[0039] Specifically, when the wireless headset is not placed in the charging box, the detection signal of the magnetic sensor is in a first state; when the wireless headset is placed in the charging box, the magnet of the charging box changes the magnetic field around the wireless headset, and the detection signal of the magnetic sensor switches from the first state to the second state.
[0040] Specifically, when the wireless headset is placed in the charging box, the power receiving terminal and the power supply terminal are in contact to achieve electrical connection. Specifically, the first processor can determine whether the power receiving terminal and the power supply terminal are electrically connected by detecting whether the current flowing through the power receiving terminal is greater than the threshold current; or, the first processor can also send an inquiry message to the second processor through the power receiving terminal and the power supply terminal, and then determine whether the power receiving terminal and the power supply terminal are electrically connected based on the reply of the second processor.
[0041] Please refer to Figure 1, which is a flow chart of an embodiment of the detection method of the present application. Specifically, the detection method of this embodiment may include the following steps:
[0042] Step S11: The detection signal of the magnetic sensor switches from the first state to the second state.
[0043] The magnetic sensor of this embodiment detects changes in the magnetic field surrounding the wireless headset and generates corresponding detection signals in different states. Therefore, when the first processor of this embodiment detects that the detection signal switches from the first state to the second state, it determines that the magnetic field surrounding the wireless headset has changed. This change may be caused by a variety of reasons, and further determination of the cause of the magnetic field change is required.
[0044] The specific process of detecting whether the detection signal of the magnetic sensor switches from the first state to the second state is shown in FIG2 , which is a schematic diagram of the specific flow of step S11 in FIG1 . Specifically, the following steps are included:
[0045] Step S111: Detect whether the signal strength of the detection signal is greater than or equal to a preset strength threshold.
[0046] A magnetic sensor is a device that converts magnetic signals into electrical signals. When the magnetic field around the magnetic sensor changes, the strength of the generated electrical signal also changes. Therefore, by comparing the strength of the detection signal generated by the magnetic sensor with a preset strength threshold, it is possible to determine whether the detection signal has generated a state switch. Alternatively, the signal strength of the detection signal can be specifically measured as a voltage amplitude or a current amplitude.
[0047] Specifically, a strength threshold can be pre-set. This strength threshold needs to be slightly greater than the signal strength of the detection signal generated by the wireless headset when it is out of the box, that is, when the magnetic sensor is not interfered with by other magnetic fields. If the signal strength of the detection signal is determined to be greater than or equal to the strength threshold, step S112 is executed. If the signal strength of the detection signal is determined to be less than the strength threshold, step S113 is executed.
[0048] Step S112: In response to the signal strength being greater than or equal to the strength threshold, determining that the detection signal is in the second state.
[0049] Among them, when the first processor detects that the signal strength is greater than or equal to the strength threshold, it can be determined that the detection signal has switched states, and new magnetic field interference has appeared in the magnetic field around the wireless headset. At this time, the detection signal is in the second state.
[0050] Step S113: In response to the signal strength being less than the strength threshold, determining that the detection signal is in the first state.
[0051] When the wireless earphones are not placed in the charging box, the magnetic field around the wireless earphones can be considered as an unchanging stable magnetic field. When the first processor detects that the signal strength is less than the strength threshold, it determines that the detection signal has not switched states and that the detection signal is in the stable first state.
[0052] Step S12: Detect whether the power receiving terminal of the wireless headset is electrically connected to the power supply terminal of the charging box.
[0053] Among them, when the first processor determines that the detection signal switches from the first state to the second state, it further detects whether the power receiving terminal of the wireless headset is electrically connected to the power supply terminal of the charging box.
[0054] Specifically, when the wireless headset is placed in the charging box, the power receiving terminal is in contact with the power supply terminal, so that the wireless headset and the charging box form a circuit. The first processor can detect the current value on the circuit. When it is determined that the current value is greater than the current threshold, it can be determined that the power receiving terminal of the wireless headset is electrically connected to the power supply terminal of the charging box.
[0055] Alternatively, the wireless headset may also be equipped with a current-to-voltage conversion device between the first processor and the power receiving terminal to convert the current value in the circuit into a voltage value. The first processor may detect the voltage value, and when it is determined that the voltage value is greater than the voltage threshold, it may be determined that the power receiving terminal of the wireless headset is electrically connected to the power supply terminal of the charging box.
[0056] Alternatively, the first processor may also send an inquiry message to the second processor through the power receiving terminal and the power supply terminal. When the second processor sends a reply message to the first processor through the power receiving terminal and the power supply terminal, it can be determined that the power receiving terminal of the wireless headset is electrically connected to the power supply terminal of the charging box.
[0057] Optionally, when the first processor determines that the power receiving terminal is electrically connected to the power supply terminal of the charging box, step S13 is executed; when the first processor determines that the power receiving terminal is not electrically connected to the power supply terminal of the charging box, step S14 is executed.
[0058] Step S13: In response to the power receiving terminal being electrically connected to the power supply terminal, generating an entry indication signal for indicating that the wireless headset has been placed in the charging box.
[0059] Among them, the first processor determines according to step S11 that the detection signal has switched from the first state to the second state, and determines according to step S12 that the power receiving terminal is electrically connected to the power supply terminal, then the first processor determines that the wireless headset has been placed in the charging box, and generates an entry indication signal for indicating that the wireless headset has been placed in the charging box.
[0060] Step S14 : In response to the detection signal being switched to the second state and the power receiving terminal being not electrically connected to the power supply terminal, detecting whether the detection signal maintains the second state.
[0061] The first processor determines according to step S11 that the detection signal has switched from the first state to the second state, and determines according to step S12 that the power receiving terminal is not electrically connected to the power supply terminal. At this time, the first processor needs to further determine whether the detection signal remains in the second state.
[0062] Specifically, the first processor once again obtains the detection signal through the magnetic sensor, and compares the detection signal obtained from this detection with the detection signal detected for the first time. Through the secondary judgment of the detection signal, it is determined whether the failure of the power receiving terminal to be electrically connected to the power supply terminal is caused by the abnormal working state of the charging box.
[0063] Optionally, when the first processor determines that the detection signal maintains the second state, step S15 is executed; when the first processor determines that the detection signal does not maintain the second state, step S16 is executed.
[0064] Step S15: In response to the detection signal maintaining the second state, a first fault indication signal is generated.
[0065] When the first processor determines through secondary determination of the detection signal that the detection signal remains in the second state, it generates a first fault indication signal indicating that the charging box is in an abnormal operating state. Specifically, the first fault indication signal may indicate poor contact between the metal contacts of the wireless headset and the charging box, which may be due to an abnormality in the power receiving terminal of the wireless headset, an abnormality in the power supply terminal of the charging box, or abnormal contact between the power receiving terminal and the power supply terminal.
[0066] Step S16: In response to the detection signal not maintaining the second state, generating a non-box indication signal for indicating that the wireless headset is not placed in the charging box.
[0067] Among them, when the first processor determines through secondary judgment of the detection signal that the detection signal does not maintain the second state, it generates a non-box indication signal for indicating that the wireless headset is not placed in the charging box.
[0068] Specifically, in response to a non-box indication signal indicating that the wireless headset is not placed in the charging box, the first processor determines that the wireless headset is in an out-of-box state. Simultaneously, the first processor may also determine that the detection signal state switch is caused by the wireless headset receiving external electromagnetic interference. Optionally, when the first processor determines that the wireless headset has received external electromagnetic interference, the wireless headset and the charging box can still maintain normal communication.
[0069] The detection method provided in the embodiment of the present application combines the state switching judgment of the detection signal of the magnetic sensor with the judgment of whether the power receiving terminal of the wireless headset is electrically connected to the power supply terminal of the charging box, so as to accurately judge the entry and exit status of the wireless headset and the working status of the charging box, so as to avoid interference caused by external electromagnetic environment interference, poor contact of metal contacts between the wireless headset and the charging box, abnormal operation of the charging box, etc., thereby improving the success rate of wireless headset entry and exit detection.
[0070] Optionally, in another embodiment, the first processor may also execute step S11 and step S12 simultaneously, and after the first processor determines that the detection signal has switched from the first state to the second state, and the power receiving terminal of the wireless headset is electrically connected to the power supply terminal of the charging box, and generates an entry indication signal indicating that the wireless headset has been placed in the charging box, it directly executes steps S21-S23 described below.
[0071] Step S21: controlling the charging box to charge the wireless headset in response to the box insertion indication signal.
[0072] Among them, the first processor can transmit the box entry indication signal to the second processor through the electrically connected power receiving terminal and power supply terminal, so as to control the charging box to charge the wireless headset through the second processor.
[0073] Step S22: After the charging box charges the wireless headset for a predetermined time, detecting whether the detection signal is in the second state.
[0074] Among them, since the wireless earphones are placed in the charging box, the magnets in the charging box continue to affect the magnetic field around the wireless earphones, and the energy of the magnet affecting the magnetic field remains unchanged, that is, after the detection signal switches from the first state to the second state, it always maintains the second state unchanged.
[0075] Therefore, after the charging box charges the wireless headset for a predetermined time, the first processor detects whether the detection signal is in the second state. If it is detected that the detection signal still remains in the second state, it is determined that the charging box and the wireless headset are both in normal working state; if it is detected that the detection signal is not in the second state, step S23 is further executed.
[0076] Step S23: In response to the detection signal not being in the second state, generating a second fault indication signal.
[0077] Among them, since the charging box has been charging the wireless headset for a period of time, it can be determined that there is no abnormality in the electrical connection between the charging box and the wireless headset, and the second processor of the charging box can normally recognize the box entry indication signal output by the first processor of the wireless headset. Therefore, when the first processor detects that the detection signal is not in the second state, it proves that the detection signal detected by the first processor is abnormal, and generates a second fault indication signal. Specifically, the second fault indication signal may indicate that there is a processing abnormality in the first processor or an abnormality in the magnetic sensor, resulting in an abnormal detection signal.
[0078] Optionally, in another embodiment, the first processor may also execute step S11 and step S12 simultaneously, and after the first processor determines that the detection signal has switched from the first state to the second state, and the power receiving terminal of the wireless headset is electrically connected to the power supply terminal of the charging box, and generates an entry indication signal indicating that the wireless headset has been placed in the charging box, it directly executes steps S31-S32 described below.
[0079] Step S31: Sending power query information.
[0080] Among them, after receiving the box insertion indication signal, the second processor further sends power query information to the first processor, and determines the current power level of the wireless headset according to the reply information of the first processor.
[0081] Optionally, when it is determined that the current battery level of the wireless headset is not fully charged, step S32 is executed; and when it is determined that the current battery level of the wireless headset is fully charged, step S33 is executed.
[0082] Step S32: In response to the wireless headset being not fully charged, controlling the charging box to charge the wireless headset.
[0083] When the second processor determines that the current power level of the wireless headset is not fully charged, it indicates that the wireless headset needs to be charged, and the second processor controls the charging component to charge the wireless headset.
[0084] Step S33: In response to the wireless headset being fully charged, controlling the charging box to stop charging.
[0085] When the second processor determines that the current power level of the wireless headset is fully charged, it proves that the wireless headset does not need to be charged, and the second processor controls the charging component to stop working.
[0086] Optionally, in another embodiment, after the first processor generates the first fault indication signal, this embodiment may further execute the following steps S41 and S42, or steps S41 and S43, to further determine the cause of the abnormality of the charging box.
[0087] Step S41: In response to the first fault indication signal, detecting whether a wireless connection can be established between the wireless headset and the charging box.
[0088] In which, in response to the first fault indication signal, it is further detected whether a wireless connection can be established between the wireless headset and the charging box. Specifically, the first processor sends a first communication message to the second processor based on the wireless network, and further determines whether the second communication message replied by the second processor based on the first communication message is received.
[0089] Step S42: In response to the wireless connection being established between the wireless headset and the charging box, a third fault indication signal is generated.
[0090] When the first processor receives the second communication information replied by the second processor based on the first communication information, it determines that a wireless connection can be established between the wireless headset and the charging box, and generates a third fault indication signal. Specifically, the third fault indication signal may indicate that the charging box is in a low-power state.
[0091] Furthermore, the first processor also generates third communication information based on the second communication information, and sends the third communication information and the third fault indication signal to the second processor, so that the second processor confirms the establishment of a wireless connection between the wireless headset and the charging box based on the third communication information; and controls the relevant indicator lights of the charging box to light up based on the third fault indication signal to alert the user of the abnormal working status of the charging box.
[0092] Step S43: In response to the inability to establish a wireless connection between the wireless headset and the charging box, a fourth fault indication signal is generated.
[0093] When the first processor does not receive the second communication message that the second processor responds to based on the first communication message, it determines that a wireless connection cannot be established between the wireless headset and the charging box, and generates a fourth fault indication signal. Specifically, the fourth fault indication signal may indicate that the second processor program of the charging box is confused.
[0094] The present application also provides an electronic device, please refer to Figure 3, which is a schematic diagram of the framework of an embodiment of the electronic device of the present application. As shown in Figure 3, the electronic device 80 includes a memory 81 and a processor 82 coupled to each other, and the processor 82 is used to execute the program instructions stored in the memory 81 to implement the steps in any of the above detection method embodiments. In a specific implementation scenario, the electronic device 80 may include but is not limited to: a microcomputer, a server, and in addition, the electronic device 80 may also include a mobile device such as a laptop computer and a tablet computer, which is not limited here.
[0095] Specifically, the processor 82 is used to control itself and the memory 81 to implement the steps in any of the above-mentioned detection method embodiments. The processor 82 can also be called a CPU (Central Processing Unit). The processor 82 may be an integrated circuit chip with signal processing capabilities. The processor 82 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 82 can be implemented by an integrated circuit chip.
[0096] The present application also provides a computer-readable storage medium. FIG4 is a schematic diagram of a framework of an embodiment of the computer-readable storage medium of the present application. As shown in FIG4 , the computer-readable storage medium 90 stores program instructions 91 executable by a processor, and the program instructions 91 are used to implement the steps of any of the above-mentioned detection method embodiments.
[0097] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.
[0098] The above description of the various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced with each other and will not be repeated herein for the sake of brevity.
[0099] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation methods described above are only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0100] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0101] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0102] The above are merely embodiments of the present application and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A detection method for detecting the status of a wireless headset and a charging box, wherein the charging box is provided with a magnet and the wireless headset is provided with a magnetic sensor, characterized in that: The detection method comprises: detecting whether a detection signal of the magnetic sensor switches from a first state to a second state; Detect whether the power receiving terminal of the wireless headset is electrically connected to the power supply terminal of the charging box.
2. The detection method according to claim 1, wherein The method further comprises: In response to the detection signal being switched to the second state and the power receiving terminal being electrically connected to the power supply terminal, an entry indication signal is generated to indicate that the wireless headset has been placed in the charging box.
3. The detection method according to claim 1, wherein The method further comprises: In response to the detection signal being switched to the second state and the power receiving terminal being not electrically connected to the power supply terminal, it is detected whether the detection signal maintains the second state.
4. The detection method according to claim 3, characterized in that The method further comprises: In response to the detection signal not maintaining the second state, a non-in-box indication signal is generated to indicate that the charging box is not placed in the charging box.
5. The detection method according to claim 3, characterized in that The method further comprises: In response to the detection signal maintaining the second state, a first fault indication signal is generated.
6. The detection method according to claim 1, characterized in that The step of detecting whether the detection signal of the magnetic sensor switches from the first state to the second state includes: Detecting whether the signal strength of the detection signal is greater than or equal to a preset strength threshold; In response to the signal strength being greater than or equal to the strength threshold, it is determined that the detection signal is in the second state; in response to the signal strength being less than the strength threshold, it is determined that the detection signal is in the first state.
7. The detection method according to claim 5, characterized in that The method further comprises: In response to the first fault indication signal, detecting whether a wireless connection can be established between the wireless headset and the charging box; In response to a wireless connection being established between the wireless headset and the charging box, generating a third fault indication signal; In response to a failure to establish a wireless connection between the wireless headset and the charging box, a fourth fault indication signal is generated.
8. The detection method according to claim 1, wherein The magnetic sensor is a Hall sensor.
9. An electronic device, characterized in that: The device comprises a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the detection method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the detection method according to any one of claims 1 to 8 can be implemented.
