Control method and device of earphone charging box, charging box and storage medium

By detecting the magnetic induction intensity of the charging case and controlling the state of the earphones entering and leaving the charging case according to a preset threshold, the problem of corrosion of the pogopin connector of lidless TWS earphones in humid environments is solved, achieving higher charging efficiency and data transmission reliability.

CN121792913APending Publication Date: 2026-04-03GUANGDONG XIAOTIANCAI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

The pogopin connector of existing open-back TWS earbuds is prone to corrosion in humid environments, which leads to a decrease in charging efficiency and data transmission reliability. Moreover, existing solutions cannot fundamentally solve the corrosion problem caused by long-term charging.

Method used

By detecting the magnetic induction intensity of the charging case, the state of the earphones entering and leaving the charging case is determined according to the preset magnetic induction intensity threshold. This controls whether the charging case and earphones are powered on, avoiding prolonged energization and reducing power consumption to minimize corrosion.

Benefits of technology

It effectively reduces the power consumption of the charging case, reduces corrosion problems caused by long-term charging, and improves charging efficiency and data transmission reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121792913A_ABST
    Figure CN121792913A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an earphone charging box control method and device, a charging box and a storage medium, and is used for controlling whether the charging box and an earphone are in a power-on state or not according to the state that the earphone enters and exits the charging box, so that the charging box cannot be in a power-on state for a long time, the power consumption of the charging box can be reduced, and the charging efficiency is improved. The problem of corrosion caused by long-term electrification of the charging box can be solved to a certain extent. The method is applied to the charging box. The method comprises the steps that the current magnetic induction intensity of the charging box is detected; according to a preset magnetic induction intensity threshold value and the current magnetic induction intensity, determining a charging box access state of the earphone; and controlling whether the charging box and the earphone are in a power-on state or not according to the state of the earphone entering and exiting the charging box.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of headphone charging, and more particularly to a control method, device, charging case, and storage medium for a headphone charging case. Background Technology

[0002] Currently, true wireless stereo (TWS) earbuds without lids primarily detect whether the earbuds are in or out of the charging case by using a conductive connector (pogopin) with a charge level. When the pogopin remains charged, in humid environments, a micro-battery effect may form between metal components or at the interface between metal and non-metal parts, accelerating oxidation-reduction reactions and leading to electrochemical corrosion. Especially at contact points, the presence of electrolyte media (such as water vapor, sweat, or dust mixtures) will exacerbate the corrosion rate of the metal materials. As the pogopin corrodes, the metal layer at the contact surface may be gradually eroded, resulting in a reduced contact area and increased contact resistance. This not only affects charging efficiency and data transmission reliability but also impacts the earbuds' detection of being in and out of the charging case. Although some solutions have been developed to improve this issue, such as optimizing materials and adding waterproof coatings, these methods cannot fundamentally solve the corrosion problem caused by the long-term charge level of the pogopin. Summary of the Invention

[0003] This application provides a control method, device, charging case, and storage medium for an earphone charging case. The method controls whether the charging case and earphone are powered on based on the state of the earphone entering and leaving the charging case. Therefore, the charging case will not be in a powered state for a long time, thereby reducing the power consumption of the charging case and solving the corrosion problem caused by the charging case being powered on for a certain extent.

[0004] The first aspect of this application provides a control method for an earphone charging case. The method is applied to the charging case and may include: detecting the current magnetic induction intensity of the charging case; determining the state of the earphone entering or leaving the charging case based on a preset magnetic induction intensity threshold and the current magnetic induction intensity; and controlling whether the charging case and the earphone are powered on based on the state of the earphone entering or leaving the charging case.

[0005] Optionally, in some possible implementations, determining the state of the earphones entering or leaving the charging case based on a preset magnetic induction intensity threshold and the current magnetic induction intensity may include: determining the detection range of the current magnetic induction intensity based on a preset magnetic induction intensity threshold and the current magnetic induction intensity; and determining the state of the earphones entering or leaving the charging case based on the detection range of the current magnetic induction intensity.

[0006] The detection interval of the current magnetic induction intensity includes a first detection interval, a second detection interval, and a third detection interval. The first detection interval is the detection interval where the electromagnetic induction intensity is less than or equal to a preset first preset threshold. The second detection interval is the detection interval where the electromagnetic induction intensity is greater than the first preset threshold and less than or equal to a preset second preset threshold. The third detection interval is the detection interval where the electromagnetic induction intensity is greater than the second preset threshold.

[0007] Optionally, in some possible implementations, when the charging case periodically acquires the magnetic induction intensity of the charging case, the current magnetic induction intensity is the magnetic induction intensity of the charging case acquired in the current period. The step of determining the detection interval of the current magnetic induction intensity based on a preset magnetic induction intensity threshold and the current magnetic induction intensity may include: when an interrupt signal is obtained based on a preset interrupt type, determining the detection interval of the current magnetic induction intensity based on a preset magnetic induction intensity threshold and the acquired current magnetic induction intensity.

[0008] The preset interrupt types include interrupt types triggered within a threshold range, or interrupt types triggered outside a threshold range; the interrupt types triggered within a threshold range are used to trigger the generation of an interrupt signal when the detection interval corresponding to the magnetic induction intensity of the previous cycle and the magnetic induction intensity of the current cycle of the charging box changes from the first detection interval to the second detection interval, or from the third detection interval to the second detection interval.

[0009] The threshold-out-of-range trigger interrupt type is used to trigger the generation of an interrupt signal when the detection interval corresponding to the magnetic induction intensity of the previous cycle and the magnetic induction intensity of the current cycle of the charging box changes from the second detection interval to the first detection interval, or changes from the second detection interval to the third detection interval.

[0010] Optionally, in some possible implementations, when the preset interrupt type is triggered within a threshold range; when an interrupt signal is obtained based on the preset interrupt type, determining the detection interval of the current magnetic induction intensity according to the preset magnetic induction intensity threshold and the obtained current magnetic induction intensity may include: when the interrupt signal is detected, determining the detection interval of the current magnetic induction intensity as the second detection interval.

[0011] Determining the state of the earphones entering and leaving the charging case based on the detection range of the current magnetic induction intensity may include: determining, based on the second detection range, that the state of the earphones entering and leaving the charging case is a single earphone in the charging case.

[0012] Optionally, in some possible implementations, after determining that the state of the earphone entering and leaving the charging case is that only one earphone is in the charging case, the method may further include: turning on the electrical detection switch, performing electrical detection, and obtaining the electrical detection result; if the electrical detection result indicates that the left earphone is in the charging case, determining that the state of the single earphone in the charging case is that the left earphone is in the charging case; or, if the electrical detection result indicates that the right earphone is in the charging case, determining that the state of the single earphone in the charging case is that the right earphone is in the charging case.

[0013] The step of controlling whether the charging case and earphones are powered on based on the state of the earphones entering and leaving the charging case may include: controlling the charging case and left earphones to be powered on based on the state of the left earphone being in the charging case; or, controlling the charging case and right earphones to be powered on based on the state of the right earphone being in the charging case.

[0014] Optionally, in some possible implementations, when the preset interrupt type is an interrupt type triggered outside the threshold range; when an interrupt signal is obtained based on the preset interrupt type, determining the detection interval of the current magnetic induction intensity according to the preset magnetic induction intensity threshold and the obtained current magnetic induction intensity may include: when the interrupt signal is detected, determining the detection interval of the current magnetic induction intensity as the first detection interval, or the third detection interval;

[0015] Determining the state of the earphones in and out of the charging case based on the detection range of the current magnetic induction intensity may include: determining, based on the first detection range or the third detection range, that the state of the earphones in and out of the charging case is either that the left and right earphones are not in the charging case, or that the left and right earphones are in the charging case.

[0016] Optionally, in some possible implementations, determining the state of the earphones entering and leaving the charging case as either the left or right earphones not in the charging case, or the left or right earphones in the charging case, based on the first detection interval or the third detection interval, may include: determining the state of the earphones entering and leaving the charging case as either the left or right earphones not in the charging case when the current magnetic induction intensity is less than or equal to the first preset threshold, wherein the current magnetic induction intensity less than or equal to the first preset threshold corresponds to the first detection interval; or determining the state of the earphones entering and leaving the charging case as either the left or right earphones in the charging case when the current magnetic induction intensity is greater than the second preset threshold, wherein the current magnetic induction intensity greater than the second preset threshold corresponds to the third detection interval;

[0017] The step of controlling whether the charging case and earphones are powered on based on the state of the earphones entering and leaving the charging case can include: controlling the charging case and earphones to be de-powered based on the state of the left and right earphones not being in the charging case; or, controlling the charging case and earphones to be powered on based on the state of the left and right earphones being in the charging case.

[0018] Optionally, in some possible implementations, the method may further include charging the earphones while the charging case and earphones are powered on.

[0019] Optionally, in some possible implementations, charging the earphones while the charging case and earphones are powered on may include: detecting whether the earphones are fully charged during the charging process; and controlling the charging case and earphones to be de-powered when the earphones are fully charged.

[0020] Optionally, in some possible implementations, detecting the current magnetic flux density of the charging case may include: detecting the current magnetic flux density of the charging case via a Hall sensor.

[0021] Optionally, in some possible implementations, controlling whether the charging case and earphones are powered on based on the state of the earphones entering and leaving the charging case may include: when the state of the earphones entering and leaving the charging case is that only one earphone is in the charging case, or both earphones are in the charging case, controlling whether the charging case and earphones are powered on based on whether the charging case and the earphones are communicating.

[0022] Optionally, in some possible implementations, controlling whether the charging case and the earphone are in a powered-on state based on whether the charging case and the earphone are communicating may include: controlling the charging case and the earphone to be powered on when a communication command is detected, so as to communicate with the earphone according to the communication command; and controlling the charging case and the earphone to be in a de-powered state when the communication command is not detected.

[0023] Optionally, in some possible implementations, the charging case is provided with a conductive connector, which controls whether the charging case and the earphones are powered on.

[0024] A second aspect of this application provides a control device for an earphone charging case, the device being applied to the charging case, the device comprising:

[0025] A detection module is used to detect the current magnetic induction intensity of the charging box;

[0026] The determination module is used to determine the state of the earphones entering or leaving the charging case based on a preset magnetic induction intensity threshold and the current magnetic induction intensity.

[0027] The control module is used to control whether the charging case and the earphones are powered on based on the state of the earphones entering and leaving the charging case.

[0028] A third aspect of this application provides a terminal device, a memory, a processor, and a controller; the memory stores a computer program executable on the processor; and a charging box is used to implement the method described in the first aspect of this application when executing the computer program.

[0029] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect of this application.

[0030] The fifth aspect of this application provides a chip including a computer program that, when executed by a processor, implements the method described in the first aspect of this application.

[0031] Another aspect of this application discloses a computer program product that, when run on a computer, causes the computer to execute the method described in the first aspect of this application.

[0032] Another aspect of this application discloses an application publishing platform for publishing computer program products, wherein when the computer program product is run on a computer, the computer executes the method described in the first aspect of this application.

[0033] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:

[0034] In this embodiment, the current magnetic induction intensity of the charging case is detected; the state of the earphones entering and leaving the charging case is determined based on a preset magnetic induction intensity threshold and the current magnetic induction intensity; and the charging case and earphones are controlled to be powered on based on the state of the earphones entering and leaving the charging case. This method controls whether the charging case and earphones are powered on based on the state of the earphones entering and leaving the charging case, thus preventing the charging case from being continuously powered, reducing power consumption, and to some extent solving the corrosion problem caused by prolonged power supply to the charging case. Attached Figure Description

[0035] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments and the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application, and other drawings can be obtained based on these drawings.

[0036] Figure 1 This is a schematic diagram of one embodiment of the control method for the earphone charging case in this application.

[0037] Figure 2A This is a schematic diagram of the earphones and charging case in an embodiment of this application;

[0038] Figure 2B This is a schematic diagram of the earphones and charging case in an embodiment of this application;

[0039] Figure 2C This is a schematic diagram of a charging box including a Hall sensor in an embodiment of this application;

[0040] Figure 2D This is a schematic diagram of an earphone including a Hall sensor in an embodiment of this application;

[0041] Figure 2E This is a schematic diagram showing the inclusion of magnets in the earphones and charging case in an embodiment of this application;

[0042] Figure 2F This is another schematic diagram showing the inclusion of magnets in the earphones and charging case in the embodiments of this application;

[0043] Figure 2G This is another schematic diagram showing the inclusion of magnets in the earphones and charging case in the embodiments of this application;

[0044] Figure 2H This is a schematic diagram of the magnetic induction intensity threshold of the linear Hall sensor in an embodiment of this application;

[0045] Figure 3 This is a schematic diagram of another embodiment of the control method for the earphone charging case in this application;

[0046] Figure 4 This is a schematic diagram of one embodiment of the control device for the earphone charging case in this application.

[0047] Figure 5 This is a schematic diagram of one embodiment of the charging box in this application.

[0048] Figure 6 This is a schematic diagram of one embodiment of the charging box in this application. Detailed Implementation

[0049] This application provides a control method, device, charging case, and storage medium for an earphone charging case. The method controls whether the charging case and earphone are powered on based on the state of the earphone entering and leaving the charging case. Therefore, the charging case will not be in a powered state for a long time, thereby reducing the power consumption of the charging case and solving the corrosion problem caused by the charging case being powered on for a certain extent.

[0050] To enable those skilled in the art to better understand the present application, the technical solutions of the embodiments of the present application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. All embodiments based on the present application should fall within the scope of protection of the present application.

[0051] The following is a brief explanation of some of the terms used in this application:

[0052] Pogo pins are precision connectors widely used in electronic devices, especially in mobile and communication equipment, and can be referred to as conductive connectors. They provide a reliable electronic connection method with good operability and reliability. The pogo pin interface defines the size, shape, electrical performance, and connection method. It typically consists of a thin metal lead, with one end being the plug and the other the socket; this design aims to achieve convenient insertion and removal and a stable connection. The shape of the pogo pin interface is usually cylindrical or conical to provide better positioning and guiding performance. In terms of electrical performance, pogo pins typically have low resistance, high current carrying capacity, and good transmission characteristics to ensure stable and reliable electrical signal transmission. The connection method can be spring contact or ball contact, both of which provide good contact performance and stability. Overall, pogo pins are an important electronic connection technology.

[0053] In portable devices such as true wireless stereo (TWS) earbuds, pogo pin connectors are used to establish the electrical connection between the earbuds and the charging case, including charging and data transfer. Due to their small size and high reliability, pogo pins are ideal for these applications. However, pogo pin connectors may face corrosion issues in humid environments, which can affect connection quality and device functionality. To address this issue, measures can be taken such as using corrosion-resistant materials, adding waterproof coatings, and optimizing the design to reduce the risk of corrosion under prolonged electrical conditions. However, these methods cannot fundamentally solve the corrosion problem caused by prolonged electrical exposure.

[0054] This application provides a control method for an earphone charging case. Based on the state of the earphone entering and leaving the charging case, the method controls whether the charging case and the earphone are in a powered state. Therefore, the charging case will not be in a powered state for a long time, thereby reducing the power consumption of the charging case and solving the corrosion problem caused by the charging case being powered for a certain extent.

[0055] The technical solution of this application will be further described below by way of embodiments, such as... Figure 1 The diagram shown is a schematic representation of an embodiment of the control method for an earphone charging case in this application. The method is applied to the charging case and may include:

[0056] 101. Detect the current magnetic induction intensity of the charging box.

[0057] In some possible implementations, the earphones are true wireless stereo (TWS) earphones. TWS earphones refer to earphones without traditional connecting wires, including Bluetooth earphones, infrared earphones, etc.

[0058] In some possible implementations, the charging case is a lidless charging case. The charging case can also be called a charging compartment.

[0059] For example, the lidless charging case can be a regular TWS earphone charging case, such as... Figure 2A The diagram shown is a schematic representation of the earphones and charging case in an embodiment of this application. The open-top charging case can also be a watch or other open-top TWS earphone storage case (which can charge the earphones), meaning the watch can be understood as the earphone charging case. Figure 2B The diagram shown is a schematic representation of the earphones and charging case in an embodiment of this application. This embodiment of the application does not impose any specific limitations.

[0060] In some possible implementations, detecting the current magnetic flux density of the charging case may include: detecting the current magnetic flux density of the charging case via a Hall sensor.

[0061] In this technical solution, the current magnetic induction intensity of the charging case can be detected by a Hall sensor. Hall sensors typically have low power consumption, which is very important for charging cases that need to remain in standby mode for a long time.

[0062] In some possible implementations, the Hall sensor is a linear sensor. For example... Figure 2C The image shown is a schematic diagram of a charging box including a Hall sensor in an embodiment of this application. Figure 2C As shown, the charging case includes a Hall sensor.

[0063] In this technical solution, the linear Hall sensor, also known as the information Hall sensor, outputs an analog signal. Its output voltage is proportional to the detected magnetic field strength, providing accurate measurement of the magnetic field strength.

[0064] In some possible implementations, the earphones include a Hall sensor, and the method may further include: the earphones detecting whether they are in or out of the charging case using the Hall sensor; and the earphones controlling whether the corresponding earphones are powered on based on the state of being in or out of the charging case. Figure 2D The image shown is a schematic diagram of an earphone including a Hall sensor in an embodiment of this application.

[0065] In this technical solution, the earphones also include a Hall sensor. The earphones can detect whether they are in or out of the charging case based on the Hall sensor, and then control whether the corresponding earphones are powered on based on the status of the earphones in or out of the charging case, which is convenient for users.

[0066] In some possible implementations, the earphones control whether to power on based on their state when they are in or out of the charging case. This can include: controlling both earphones to be in a power-off state when both earphones are in the charging case; controlling the left earphone to be in a power-off state and the right earphone to be in a power-on state when the left earphone is in the charging case; controlling the right earphone to be in a power-off state and the left earphone to be in a power-on state when the right earphone is in the charging case; and controlling both earphones to be in a power-on state when neither earphone is in the charging case.

[0067] In this technical solution, the power-on status of the earbuds can be controlled based on their state when they are in or out of the charging case. When the earbuds are in the charging case, they generally require charging, so they can be kept off to save power. When the earbuds are not in the charging case, users are more likely to use them, so they can be kept on for immediate use, improving the user experience. It should be noted that even when the earbuds are in the charging case, they can still be kept on as needed; this application does not impose specific limitations on this.

[0068] In some possible implementations, the left earphone further includes a first magnet (magnet 1), the right earphone includes a second magnet (magnet 2), and the charging case includes a third magnet (magnet 3) and a fourth magnet (magnet 4). Figure 2E The image shown is a schematic diagram of the earphones and charging case including magnets in an embodiment of this application.

[0069] When the left earphone is placed in the charging case, the first magnet and the third magnet correspond, wherein the S pole of the first magnet corresponds to the N pole of the third magnet, and the N pole of the first magnet corresponds to the S pole of the third magnet.

[0070] When the right earphone is placed in the charging case, the second magnet and the fourth magnet correspond, wherein the S pole of the second magnet corresponds to the N pole of the fourth magnet, and the N pole of the second magnet corresponds to the S pole of the fourth magnet.

[0071] In this technical solution, since both the earphones and the charging case contain magnets, the earphones can be magnetically attached to the charging case when the earphones are placed inside, thus preventing the earphones from falling out of the charging case.

[0072] In some possible implementations, the left earphone further includes a fifth magnet (magnet 5), and the right earphone further includes a sixth magnet (magnet 6); the charging case includes a seventh magnet (magnet 7) and an eighth magnet (magnet 8); as... Figure 2F The diagram shown is another schematic showing the inclusion of magnets in the earphones and charging case in an embodiment of this application.

[0073] When the left earphone is placed in the charging case, the fifth magnet and the seventh magnet correspond, wherein the S pole of the fifth magnet corresponds to the N pole of the seventh magnet, and the N pole of the fifth magnet corresponds to the S pole of the seventh magnet;

[0074] When the right earphone is placed in the charging case, the sixth magnet and the eighth magnet correspond, wherein the S pole of the sixth magnet corresponds to the N pole of the eighth magnet, and the N pole of the sixth magnet corresponds to the S pole of the eighth magnet.

[0075] In this technical solution, since magnets are included in different parts of both the earphones and the charging case, the earphones can be magnetically attached to the charging case when the earphones are placed inside, thus preventing the earphones from falling out of the charging case.

[0076] In some possible implementations, the charging case includes a ninth magnet (magnet 9) and a tenth magnet (magnet 10); such as Figure 2G The diagram shown is another schematic showing the inclusion of magnets in the earphones and charging case in an embodiment of this application.

[0077] When the left earphone is placed in the charging case, the first magnet and the ninth magnet correspond, wherein the S pole of the first magnet corresponds to the N pole of the ninth magnet, and the S pole of the ninth magnet corresponds to the N pole of the third magnet;

[0078] When the right earphone is placed in the charging case, the second magnet and the tenth magnet correspond, wherein the S pole of the second magnet corresponds to the N pole of the tenth magnet, and the S pole of the tenth magnet corresponds to the N pole of the fourth magnet.

[0079] In this technical solution, since different parts of the earphones and the charging case include magnets, the earphones can be magnetically attached to the charging case when the earphones are placed inside, thus preventing the earphones from falling out of the charging case.

[0080] 102. Determine the state of the earphones entering or leaving the charging case based on the preset magnetic induction intensity threshold and the current magnetic induction intensity.

[0081] The states of the earbuds in and out of the charging case can include: left earbud in the charging case, right earbud in the charging case, both earbuds in the charging case (also known as both earbuds in the charging case), and neither earbud in the charging case (also known as both earbuds not in the charging case). Among these, the states of left earbud in the charging case and right earbud in the charging case can be summarized as single earbud in the charging case.

[0082] If the left earbud is in the charging case, it means the right earbud is not in the charging case. You can take the right earbud out of the charging case, leaving only the left earbud in the charging case.

[0083] If the right earbud is in the charging case, it means the left earbud is not in the charging case. You can take the left earbud out of the charging case, leaving only the right earbud in the charging case.

[0084] The left and right earbuds are in the charging case, meaning they are both inside and can be removed.

[0085] If neither the left nor right earbud is in the charging case, it means that neither the left nor right earbud is inside the charging case. You can take both earbuds out of the charging case.

[0086] In some possible implementations, determining the state of the earphones entering and leaving the charging case based on a preset magnetic induction intensity threshold and the current magnetic induction intensity may include: determining that the state of the earphones entering and leaving the charging case is that neither the left nor right earphone is in the charging case when the current magnetic induction intensity is less than or equal to a first preset threshold; determining that the state of the earphones entering and leaving the charging case is that only one earphone is in the charging case when the current magnetic induction intensity is greater than the first preset threshold and less than or equal to a second preset threshold; and determining that the state of the earphones entering and leaving the charging case is that both the left and right earphones are in the charging case when the current magnetic induction intensity is greater than the second preset threshold.

[0087] In this technical solution, the preset magnetic induction intensity threshold includes a first preset threshold and a second preset threshold. The current magnetic induction intensity can be directly compared with the first preset threshold and the second preset threshold to determine the state of the earphone entering or leaving the charging case, which can improve the efficiency of determining the state of the earphone entering or leaving the charging case.

[0088] To reduce power consumption and enable the detection of the earphones entering and leaving the charging case even when the processor of the charging case is in a sleep state, the linear Hall sensor can notify the processor of the change in the state of the earphones entering and leaving the charging case through an interrupt. The interrupt types of the linear Hall sensor (abbreviated as INT_TYP in this application) are divided into an interrupt type triggered within the threshold range and an interrupt type triggered outside the threshold range. As Figure 2H shown, it is a schematic diagram of the magnetic induction intensity threshold of the linear Hall sensor in an embodiment of this application. The abscissa is the magnetic induction intensity threshold of the linear Hall sensor (abbreviated as DATA in this invention), LTH is the set low threshold for interrupt triggering, which can also be simply referred to as the first preset threshold, and HTH is the set high threshold for interrupt triggering, which can also be simply referred to as the second preset threshold.

[0089] When the interrupt type INT_TYP of the linear Hall sensor is set to the interrupt type triggered within the threshold range, the interrupt is triggered when the current magnetic induction intensity detected by the Hall sensor satisfies LTH < DATA ≤ HTH; when the interrupt type INT_TYP of the linear Hall sensor is set to the interrupt type triggered outside the threshold range, the interrupt is triggered when the current magnetic induction intensity detected by the Hall sensor satisfies DATA ≤ LTH or DATA > HTH.

[0090] In some possible implementation manners, the low threshold LTH for interrupt triggering and the high threshold HTH for interrupt triggering are determined according to the historical big data of the states of the earphones entering and leaving the charging case measured on the production line during production. Optionally, the low threshold LTH for interrupt triggering and the high threshold HTH for interrupt triggering can be updated according to the historical big data of the states of the earphones entering and leaving the charging case measured. That is, LTH is determined according to the magnetic induction intensity data corresponding to the measured detection state 1 (the state where the left and right earphones are not in the charging case), HTH is determined according to the magnetic induction intensity data of the measured detection state 3 (the state where the left and right earphones are in the charging case), and at the same time, it is determined whether the magnetic induction intensity data of the measured detection state 2 (the state where a single earphone is in the charging case) is within the detection interval 2 (i.e., LTH~HTH).

[0091] According to the measured historical big data (i.e., the magnetic induction intensity corresponding to different states of the earphones entering and leaving the charging case), the magnetic induction intensity of the linear Hall sensor corresponding to the four states of the earphones entering and leaving the charging case can be divided into three detection intervals, that is Figure 2H the detection intervals corresponding to the three detection states shown, which are detection interval 1, detection interval 2, and detection interval 3 respectively.

[0092] When neither earbud is in the charging case, the detection state is 1, and the detection range corresponding to the magnetic induction intensity of the linear Hall sensor is detection range 1. When only the left earbud is in the charging case or only the right earbud is in the charging case, the detection state is 2, and the detection range corresponding to the magnetic induction intensity of the linear Hall sensor is detection range 2. When both earbuds are in the charging case, the detection state is 3, and the detection range corresponding to the magnetic induction intensity of the linear Hall sensor is detection range 3.

[0093] In conjunction with the embodiments of this application Figures 2E-2G The description of the magnets included in the earphones and charging case shows that because both the earphones and the charging case contain magnets, the distance between the earphones and the charging case will affect the change of the magnetic field.

[0094] When the earbuds are not in the charging case, the distance between them is relatively far. Therefore, theoretically, the change in the magnetic field is relatively small. Thus, the magnetic field strength detected by the Hall sensor is the weakest detection range, 1.

[0095] When the earphones are in or out of the charging case, with either the left or right earphone in the charging case, it means that the distance between the left or right earphone and the charging case is relatively far, while the distance between the right earphone and the charging case is very close. Therefore, theoretically, the change in magnetic field is closer to the middle. Thus, the magnetic induction intensity detected by the Hall sensor is in the detection range of moderate magnetic induction intensity, 2.

[0096] When the earbuds are in or out of the charging case, with both earbuds inside, the distance between the earbuds and the charging case is very close. Therefore, theoretically, the change in magnetic field is very large at this time. Thus, the magnetic induction intensity detected by the Hall sensor is the detection range 3 where the magnetic induction intensity is strongest.

[0097] In some possible implementations, determining the state of the earphones entering or leaving the charging case based on a preset magnetic induction intensity threshold and the current magnetic induction intensity may include: determining the detection range of the current magnetic induction intensity based on the preset magnetic induction intensity threshold and the current magnetic induction intensity; and determining the state of the earphones entering or leaving the charging case based on the detection range of the current magnetic induction intensity.

[0098] The detection interval of the current magnetic induction intensity includes a first detection interval, a second detection interval, and a third detection interval. The first detection interval is the detection interval where the electromagnetic induction intensity is less than or equal to a preset first preset threshold. The second detection interval is the detection interval where the electromagnetic induction intensity is greater than the first preset threshold and less than or equal to a preset second preset threshold. The third detection interval is the detection interval where the electromagnetic induction intensity is greater than the second preset threshold.

[0099] In this technical solution, the detection range of the current magnetic induction intensity can be determined first based on a preset magnetic induction intensity threshold and the current magnetic induction intensity; then, the state of the earphone entering or leaving the charging case can be determined based on the detection range of the current magnetic induction intensity. This provides another way to determine the state of the earphone entering or leaving the charging case and improves the feasibility of the solution.

[0100] In some possible implementations, when the charging case periodically acquires the magnetic induction intensity of the charging case, the current magnetic induction intensity is the magnetic induction intensity of the charging case acquired in the current period. The step of determining the detection interval of the current magnetic induction intensity based on a preset magnetic induction intensity threshold and the current magnetic induction intensity may include: when an interrupt signal is obtained based on a preset interrupt type, determining the detection interval of the current magnetic induction intensity based on a preset magnetic induction intensity threshold and the acquired current magnetic induction intensity.

[0101] The preset interrupt types include interrupt types triggered within a threshold range, or interrupt types triggered outside a threshold range; the interrupt types triggered within a threshold range are used to trigger the generation of an interrupt signal when the detection interval corresponding to the magnetic induction intensity of the previous cycle and the magnetic induction intensity of the current cycle of the charging box changes from the first detection interval to the second detection interval, or from the third detection interval to the second detection interval.

[0102] The threshold-out-of-range trigger interrupt type is used to trigger the generation of an interrupt signal when the detection interval corresponding to the magnetic induction intensity of the previous cycle and the magnetic induction intensity of the current cycle of the charging box changes from the second detection interval to the first detection interval, or changes from the second detection interval to the third detection interval.

[0103] For example, the charging case can periodically detect and acquire the magnetic induction intensity DATA of the charging case using a linear Hall sensor. For instance, the magnetic induction intensity acquired in cycle T1 is DATA1, the magnetic induction intensity acquired in cycle T2 is DATA2, and the current cycle is cycle T2.

[0104] If the interrupt type is triggered within the preset interrupt type threshold range, and if DATA1 is in the first or third detection interval during cycle T1, and DATA2 is in the second detection interval during cycle T2, that is, from cycle T1 to cycle T2, the detection interval where DATA is located changes from the first or third detection interval to the second detection interval, then the linear Hall sensor will be triggered to generate an interrupt signal to notify the processor in the charging case that the state of the earphone entering or leaving the charging case has changed and the state of the earphone entering or leaving the charging case needs to be detected.

[0105] If the preset interrupt type includes the interrupt type triggered outside the threshold range, and if DATA1 is in the second detection interval in cycle T1, and DATA2 is in the first or third detection interval in cycle T2, that is, from cycle T1 to cycle T2, the detection interval where DATA is located changes from the second detection interval to the first or third detection interval, then the linear Hall sensor will be triggered to generate an interrupt signal to notify the processor in the charging case that the state of the earphone entering or leaving the charging case has changed and the state of the earphone entering or leaving the charging case needs to be detected.

[0106] In this technical solution, when an interrupt signal is obtained based on a preset interrupt type, the detection range of the current magnetic induction intensity is determined according to the preset magnetic induction intensity threshold and the obtained current magnetic induction intensity. This provides a basis for determining the state of the earphone entering or leaving the charging case based on the detection range of the current magnetic induction intensity.

[0107] 103. Control whether the charging case and the earphones are powered on based on the state of the earphones entering and leaving the charging case.

[0108] The following explains the preset interrupt types as either interrupts triggered within the threshold range or interrupts triggered outside the threshold range:

[0109] 1. The preset interrupt type is the interrupt type triggered within the threshold range.

[0110] When an interrupt signal is obtained based on a preset interrupt type, the detection interval of the current magnetic induction intensity is determined according to a preset magnetic induction intensity threshold and the obtained current magnetic induction intensity. This may include: when the interrupt signal is detected, determining the detection interval of the current magnetic induction intensity as the second detection interval.

[0111] Determining the state of the earphones entering and leaving the charging case based on the detection range of the current magnetic induction intensity may include: determining, based on the second detection range, that the state of the earphones entering and leaving the charging case is a single earphone in the charging case.

[0112] Exemplarily, the current magnetic induction intensity of the current cycle detected by the Hall sensor is DATA2, and the magnetic induction intensity of the previous cycle of the current cycle is DATA1. When DATA1 satisfies DATA1 ≤ LTH, or DATA1 > HTH and DATA2 satisfies LTH < DATA2 ≤ HTH, the Hall sensor interrupt will be triggered, that is, an interrupt signal will be generated. When the interrupt signal of the Hall sensor is detected, it is determined that the detection interval where the current magnetic induction intensity is located is the second detection interval; according to the second detection interval, it is determined that the state of the earphone entering or leaving the charging case is the state where a single earphone is in the charging case.

[0113] In this technical solution, the triggering of the Hall sensor interrupt is specifically described. If the preset interrupt type includes the interrupt type triggered within the threshold range, the current magnetic induction intensity is detected by the Hall sensor. When the interrupt signal of the Hall sensor is detected, it is determined that the detection interval where the current magnetic induction intensity is located is the second detection interval, that is, the detection interval 2 mentioned above; further, according to the second detection interval, it can be determined that the state of the earphone entering or leaving the charging case is the state where a single earphone is in the charging case, which can narrow the options for judging the state of the earphone entering or leaving the charging case and improve the accuracy of determining the state of the earphone entering or leaving the charging case.

[0114] In some possible implementation manners, after determining that the state of the earphone entering or leaving the charging case is the state where a single earphone is in the charging case, the method may further include: turning on the electrical detection switch to perform electrical detection and obtaining an electrical detection result; when the electrical detection result indicates that the left earphone is in the charging case, determining that the state where a single earphone is in the charging case is the state where the left earphone is in the charging case; or when the electrical detection result indicates that the right earphone is in the charging case, determining that the state where a single earphone is in the charging case is the state where the right earphone is in the charging case.

[0115] Controlling whether the charging case and the earphone are in an energized state according to the state of the earphone entering or leaving the charging case may include: controlling the charging case and the left earphone to be in an energized state according to the state where the left earphone is in the charging case; or controlling the charging case and the right earphone to be in an energized state according to the state where the right earphone is in the charging case.​​Understandably, the preset interrupt types include interrupt types triggered within the threshold range. When an interrupt signal is detected, the state of the earphones entering and leaving the charging case can be determined as a single earphone in the charging case, i.e., detection state 2 mentioned above, based on the interrupt types triggered within the threshold range. Since a single earphone in the charging case can include both the left and right earphones, it is necessary to further determine whether the earphones are in the charging case with the left or right earphone. Therefore, based on the single earphone in the charging case state, the power detection switch can be turned on to perform power detection and obtain the power detection result. If the power detection result is that only the left earphone is in the charging case, then the earphone entering and leaving the charging case state corresponding to detection state 2 is a state where only the left earphone is in the charging case; if the power detection result is that only the right earphone is in the charging case, then the earphone entering and leaving the charging case state corresponding to detection state 2 is a state where only the right earphone is in the charging case.

[0117] In some possible implementations, electrical detection can be voltage detection, current detection, or resistance detection, and the embodiments of this application do not specifically limit it.

[0118] For example, an electrical detection switch can determine which earbud is in the charging case by detecting changes in voltage. For instance, if the earbud is not in the charging case, the detected voltage is a first voltage (e.g., 3.8V); if the earbud is in the charging case, the detected voltage is a second voltage (e.g., 3V). Therefore, by observing the changes in the first and second voltages, it is possible to determine which earbud is in the charging case.

[0119] In this technical solution, by activating the electrical detection switch, electrical detection can be performed to more accurately determine whether the earphones are in or out of the charging case, specifically whether the left or right earphone is in the charging case. This improves the accuracy of determining the earphones' presence or absence. Whichever earphone is in the charging case controls the charging case and that earphone to be powered on. For example, if the left earphone is in the charging case, the charging case and the left earphone are powered on; if the right earphone is in the charging case, the charging case and the right earphone are powered on. Therefore, it is possible to accurately control which earphone is powered on, thereby partially solving the problem of detection failure caused by electrochemical corrosion due to prolonged charging of the charging case.

[0120] In some possible implementations, after determining that the detection interval of the current magnetic induction intensity is the second detection interval upon detecting the interrupt signal, the method may further include: switching the preset interrupt type from an interrupt type triggered within the threshold range to an interrupt type triggered outside the threshold range.

[0121] In this technical solution, when an interrupt signal of the Hall sensor is detected, the interrupt type needs to be switched to an interrupt type triggered outside the threshold range to detect the state where both earphones are not in the charging case, or the state where both earphones are in the charging case.

[0122] 2. The preset interrupt type is an interrupt type triggered outside the threshold range

[0123] When an interrupt signal is obtained based on the preset interrupt type, according to the preset magnetic induction intensity threshold and the acquired current magnetic induction intensity, determining the detection interval where the current magnetic induction intensity is located may include: when the interrupt signal is detected, determining that the detection interval where the current magnetic induction intensity is located is the first detection interval, or the third detection interval;

[0124] Determining the state of the earphone entering or leaving the charging case according to the detection interval where the current magnetic induction intensity is located may include: according to the first detection interval, or the third detection interval, determining that the state of the earphone entering or leaving the charging case is that the left and right earphones are not in the charging case, or the left and right earphones are in the charging case.

[0125] Exemplarily, the current magnetic induction intensity DATA2 of the current cycle is detected by the Hall sensor, and the magnetic induction intensity of the previous cycle of the current cycle is DATA1. When DATA1 satisfies LTH < DATA1 ≤ HTH and DATA2 satisfies DATA2 ≤ LTH, or DATA2 > HTH, the Hall sensor interrupt will be triggered, that is, an interrupt signal is generated. When the interrupt signal of the Hall sensor is detected, determining that the detection interval where the current magnetic induction intensity is located is the first detection interval or the third detection interval; according to the first detection interval, or the third detection interval, determining that the state of the earphone entering or leaving the charging case is that the left and right earphones are not in the charging case, or the left and right earphones are in the charging case.

[0126] In this technical solution, a specific description is made for triggering the Hall sensor interrupt. If the preset interrupt type includes the interrupt type triggered outside the threshold range, the current magnetic induction intensity is detected by the Hall sensor. When the interrupt signal of the Hall sensor is detected, determining that the detection interval where the current magnetic induction intensity is located is the first detection interval (i.e., the detection interval 1 mentioned above), or the third detection interval (i.e., the detection interval 3 mentioned above); further, according to the first detection interval or the third detection interval, determining that the state of the earphone entering or leaving the charging case is that the left and right earphones are not in the charging case, or the left and right earphones are in the charging case, can narrow the options for judging the state of the earphone entering or leaving the charging case and improve the accuracy of determining the state of the earphone entering or leaving the charging case.

[0127] In some possible implementations, determining the state of the earphones entering and leaving the charging case as either the left or right earphones are not in the charging case, or the left and right earphones are in the charging case, based on the first detection interval or the third detection interval, may include: determining that the state of the earphones entering and leaving the charging case is either the left or right earphones are not in the charging case when the current magnetic induction intensity is less than or equal to the first preset threshold, wherein the current magnetic induction intensity less than or equal to the first preset threshold corresponds to the first detection interval; or determining that the state of the earphones entering and leaving the charging case is either the left or right earphones are in the charging case when the current magnetic induction intensity is greater than the second preset threshold, wherein the current magnetic induction intensity greater than the second preset threshold corresponds to the third detection interval.

[0128] The step of controlling whether the charging case and earphones are powered on based on the state of the earphones entering and leaving the charging case can include: controlling the charging case and earphones to be de-powered based on the state of the left and right earphones not being in the charging case; or, controlling the charging case and earphones to be powered on based on the state of the left and right earphones being in the charging case.

[0129] It is understandable that the preset interrupt types include the interrupt type triggered outside the threshold range. When an interrupt is detected, the state of the earphones entering and leaving the charging case can be determined based on the interrupt type triggered outside the threshold range: either the left and right earphones are in the charging case (i.e., detection state 3 mentioned above), or the left and right earphones are not in the charging case (i.e., detection state 1 mentioned above). Therefore, it is necessary to further determine whether the state of the earphones entering and leaving the charging case is that the left and right earphones are in the charging case or not. This can be achieved by using the Hall sensor to obtain the current magnetic induction intensity; if the current magnetic induction intensity is less than or equal to the first preset threshold (LTH), the state of the earphones entering and leaving the charging case is determined to be that the left and right earphones are not in the charging case; or, if the current magnetic induction intensity is greater than the second preset threshold (HTH), the state of the earphones entering and leaving the charging case is determined to be that the left and right earphones are in the charging case. The current magnetic induction intensity DATA1 can be used to determine the status of the earphones in and out of the charging case. When DATA1≤LTH, the status of the earphones in and out of the charging case is that neither earphone is in the charging case; when DATA1>HTH, the status of the earphones in and out of the charging case is that both earphones are in the charging case.

[0130] In this technical solution, by comparing the current magnetic induction intensity with a first preset threshold and a second preset threshold, the system can more accurately determine whether the earphones are in or out of the charging case, thus improving the accuracy of this determination. If both earphones are in the charging case, both the charging case and the earphones are powered on; if neither earphone is in the charging case, both are de-powered. Therefore, this solution can, to some extent, address the problem of detection failure caused by electrochemical corrosion resulting from prolonged charging of the charging case.

[0131] In some possible implementations, after determining the detection interval of the current magnetic induction intensity as the first detection interval or the third detection interval upon detecting the interrupt signal, the method may further include: switching the preset interrupt type from an interrupt type triggered outside the threshold range to an interrupt type triggered within the threshold range.

[0132] In this technical solution, when an interrupt signal from the Hall sensor is detected, the interrupt type needs to be switched to a threshold-triggered interrupt type to detect the status of a single earphone in the charging case.

[0133] In some possible implementations, the charging case is provided with a conductive connector that controls whether the charging case and the earphones are powered on.

[0134] In this technical solution, the conductive connector can be a pogo pin. Communication and charging between the charging case and the earphone are achieved through the conductive connector pogo pin. By controlling whether the charging case and the right earphone are powered on through the conductive connector, the problem of electrochemical corrosion caused by prolonged energization of the conductive connector in the charging case, which leads to malfunction of the detection status, can be solved to some extent.

[0135] In some possible implementations, the preset interrupt type is either pre-set at the factory or determined based on the detected initial magnetic induction intensity during the charging box's power-on initialization.

[0136] In this technical solution, the preset interrupt type can be pre-set during production on the production line, i.e., determined before the charging box leaves the factory, or it can be determined after the charging box leaves the factory, when the user needs to initialize it every time the charging box is turned off and on again during use, based on the detected initialization magnetic induction intensity, thus improving the feasibility of the solution.

[0137] In some possible implementation manners, when the initialized magnetic induction intensity is greater than the first preset threshold and less than or equal to the second preset threshold, the set interrupt type is the out-of-threshold-range trigger interrupt type; when the initialized magnetic induction intensity is less than or equal to the first preset threshold or greater than the second preset threshold, the set interrupt type is the in-threshold-range trigger interrupt type.

[0138] Exemplarily, according to the production line production, that is, before leaving the factory, and each time when initializing the linear Hall sensor after power-off and then power-on, detect the initialized magnetic induction intensity DATA0 of the linear Hall sensor, and make a comparison and judgment based on DATA0 with the interrupt trigger low threshold LTH and the interrupt trigger high threshold HTH to set the interrupt type as the preset interrupt type.

[0139] When DATA0 is in the range of LTH < DATA0 ≤ HTH, that is, at this time the state of the earphone entering or leaving the charging case is detection state 2, set the interrupt type as the out-of-threshold-range trigger interrupt type (that is, when the detection state changes from detection state 2 to detection state 1 or detection state 3, an interrupt will be triggered), as the preset interrupt type.

[0140] When DATA0 is in the range of DATA0 ≤ LTH or DATA0 > HTH, that is, at this time the state of the earphone entering or leaving the charging case is detection state 1 or detection state 3, set the interrupt type as the in-threshold-range trigger interrupt type (that is, when the detection state changes from detection state 1 or detection state 3 to detection state 2, an interrupt will be triggered), as the preset interrupt type.

[0141] In this technical solution, the preset interrupt type is described in detail. In different situations, the preset interrupt type is also different, so that the interrupt of the Hall sensor can be accurately triggered to generate an interrupt signal. For the interrupt trigger low threshold LTH and the interrupt trigger high threshold HTH, they can be determined according to a large number of historical measured data of detection state 1 and detection state 3 before leaving the factory.

[0142] In one possible implementation manner, the method may further include: updating the first preset threshold and the second preset threshold to obtain the updated first preset threshold and second preset threshold.

[0143] In this technical solution, the first preset threshold and the second preset threshold are not fixed and can be updated according to the actual situation, so as to improve the accuracy of determining the state of the earphone entering or leaving the charging case.

[0144] In one possible implementation, updating the first preset threshold and the second preset threshold to obtain updated first preset threshold and second preset threshold may include: updating the first preset threshold and the second preset threshold based on at least one of historical usage duration, historical usage count, historical temperature of the charging case, and historical accuracy in determining the state of the earphone entering and leaving the charging case, to obtain updated first preset threshold and second preset threshold.

[0145] In this technical solution, as the charging case is used, the first preset threshold and the second preset threshold can be adaptively adjusted according to the aging degree of the charging case, that is, according to some historical usage parameters of the charging case, such as: historical usage time, historical usage count, historical temperature of the charging case, and historical accuracy of determining the state of the earphone entering and leaving the charging case, to obtain an updated first preset threshold and second preset threshold, thereby improving the accuracy of determining the state of the earphone entering and leaving the charging case.

[0146] In one possible implementation, updating the first preset threshold and the second preset threshold based on at least one of historical usage duration, historical usage count, historical charging case temperature, and historical accuracy in determining the earphone's entry and exit from the charging case, to obtain updated first and second preset thresholds, includes: determining a first target step size based on at least one of historical usage duration, historical usage count, historical charging case temperature, and historical accuracy in determining the earphone's entry and exit from the charging case, and a first mapping table; obtaining the updated first preset threshold based on the first target step size and the first preset threshold; and further refining the process based on historical usage duration, historical usage count, historical charging case temperature, and historical accuracy in determining the earphone's entry and exit from the charging case, as well as the accuracy in historical accuracy in determining the earphone's entry and exit from the charging case. The first mapping table includes at least one of the following: the accuracy rate of determining the state of the earphone entering and leaving the charging case; and a second mapping table. A second target step size is determined, and an updated second preset threshold is obtained based on the second target step size and the second preset threshold. The first mapping table includes a correspondence between at least one of the following: usage time, number of uses, historical temperature of the charging case, and the accuracy rate of determining the state of the earphone entering and leaving the charging case, and at least one first step size, where the at least one first step size includes the first target step size. The second mapping table includes a correspondence between at least one of the following: usage time, number of uses, historical temperature of the charging case, and the accuracy rate of determining the state of the earphone entering and leaving the charging case, and at least one second step size, where the at least one second step size includes the second target step size.

[0147] In this technical solution, the first preset threshold can be updated based on at least one of the following: historical usage time, historical usage count, historical charging case temperature, and historical accuracy in determining the earphone's entry and exit from the charging case, with at least one step length for updating the first preset threshold. Similarly, the second preset threshold can be updated based on at least one of the following: historical usage time, historical usage count, historical charging case temperature, and historical accuracy in determining the earphone's entry and exit from the charging case, with at least one second step length for updating the second preset threshold. This provides a specific implementation method for updating the first and second preset thresholds, improving the feasibility of the solution.

[0148] In one possible implementation, determining a first target step size based on at least one of historical usage duration, historical usage count, historical charging case temperature, and historical accuracy in determining the earphone's entry and exit from the charging case, and a first mapping table; obtaining an updated first preset threshold based on the first target step size and the first preset threshold, may include: determining a first target sub-step size based on the historical usage duration and the first mapping table; determining a second target sub-step size based on the historical usage count and the first mapping table; determining a third target sub-step size based on the historical charging case temperature and the first mapping table; determining a fourth target sub-step size based on the historical accuracy in determining the earphone's entry and exit from the charging case and the first mapping table; summing at least one of the first, second, third, and fourth target sub-step sizes as the first target step size; and summing the first target step size and the first preset threshold to obtain the updated first preset threshold.

[0149] The step of determining a second target step size based on at least one of the following: historical usage duration, historical usage frequency, historical charging case temperature, and historical accuracy in determining the earphone's state of entering and leaving the charging case, and a second mapping table; and obtaining an updated second preset threshold based on the second target step size and a second preset threshold, may include: determining a fifth target sub-step size based on the historical usage duration and the second mapping table; determining a sixth target sub-step size based on the historical usage frequency and the second mapping table; determining a seventh target sub-step size based on the historical charging case temperature and the second mapping table; determining an eighth target sub-step size based on the historical accuracy in determining the earphone's state of entering and leaving the charging case and the second mapping table; summing at least one of the fifth, sixth, seventh, and eighth target sub-step sizes as the second target step size; and summing the second target step size and the second preset threshold to obtain the updated second preset threshold.

[0150] For example, the first target sub-step size corresponding to the historical usage duration and the first preset threshold is A1, the second target sub-step size corresponding to the historical usage count and the first preset threshold is B1, the third target sub-step size corresponding to the historical charging case temperature and the first preset threshold is C1, and the fourth target sub-step size corresponding to the historical accuracy of determining the earphone's entry and exit from the charging case and the first preset threshold is D1. Then, the first target step size is A1+B1+C1+D1, and the finally updated first preset threshold is determined as first target step size + first preset threshold = A1+B1+C1+D1+LTH.

[0151] The fifth target sub-step size corresponding to the historical usage duration and the second preset threshold is A2; the sixth target sub-step size corresponding to the historical usage count and the second preset threshold is B2; the seventh target sub-step size corresponding to the historical charging case temperature and the second preset threshold is C2; and the eighth target sub-step size corresponding to the historical accuracy of determining the earphone's entry and exit from the charging case and the second preset threshold is D2. Therefore, the second target step size is A2 + B2 + C2 + D2. Finally, the updated second preset threshold is determined as second target step size + second preset threshold = A2 + B2 + C2 + D2 + HTH.

[0152] This technical solution provides a detailed explanation of how to obtain the first target step size and how to obtain the second target step size. Furthermore, it provides specific explanations of how to obtain the updated first preset threshold based on the first target step size and the first preset threshold, and how to obtain the updated second preset threshold based on the second target step size and the second preset threshold. This improves the feasibility of the solution and the reliability of updating the first and second preset thresholds.

[0153] In TWS earbuds, the technology of using a linear Hall effect sensor to notify the processor of changes in the earbuds' status when they are in or out of the charging case via an interrupt is an energy-efficient and effective solution. This method allows the earbuds to detect their presence and position in the charging case via the Hall effect sensor without continuously waking up the processor inside the charging case. The Hall effect sensor utilizes the Hall effect to detect changes in magnetic fields. When the earbuds are placed in the charging case, the magnet inside the earbuds generates a magnetic field. The Hall effect sensor detects changes in this magnetic field, specifically changes in magnetic induction intensity, thus determining whether the earbuds are in the charging case. The Hall effect sensor is configured to generate an interrupt signal when it detects a change in the magnetic field. This interrupt signal wakes up the processor, which can then read the state of the Hall effect sensor to determine whether the earbuds are in the charging case.

[0154] Because the processor in the charging case remains in a dormant state most of the time, only waking up when the Hall sensor detects a change in magnetic field and triggers an interrupt, this design helps reduce overall power consumption. Although the processor in the charging case is in a dormant state, the Hall sensor's interrupt mechanism ensures real-time response to changes in the earbuds' status when they are removed from the charging case, allowing users to use them immediately upon taking them out. This technology is particularly suitable for TWS earbuds, as users often need to quickly remove the earbuds from the charging case and start using them without waiting for the device to boot up.

[0155] In this technical solution, the interrupt mechanism of the Hall sensor is used, which can significantly reduce power consumption compared with the traditional continuous detection method, while maintaining real-time monitoring of the status of the earphones entering and leaving the charging case.

[0156] In this embodiment, the current magnetic induction intensity of the charging case is detected; the state of the earphones entering and leaving the charging case is determined based on a preset magnetic induction intensity threshold and the current magnetic induction intensity; and the charging case and earphones are controlled to be powered on based on the state of the earphones entering and leaving the charging case. This method controls whether the charging case and earphones are powered on based on the state of the earphones entering and leaving the charging case, thus preventing the charging case from being continuously powered, reducing power consumption, and to some extent solving the corrosion problem caused by prolonged power supply to the charging case.

[0157] like Figure 3 The diagram shown is a schematic representation of another embodiment of the control method for the earphone charging case in this application. The method is applied to the charging case and may include:

[0158] 301. Detect the current magnetic induction intensity of the charging box.

[0159] 302. Determine the state of the earphones entering or leaving the charging case based on the preset magnetic induction intensity threshold and the current magnetic induction intensity.

[0160] 303. Control whether the charging case and the earphones are powered on based on the state of the earphones entering and leaving the charging case.

[0161] It should be noted that, in the embodiments of this application, steps 301-303 are the same as those described above. Figure 1 Steps 101-103 in the illustrated embodiment are similar and will not be repeated here.

[0162] 304. With the charging case and earphones powered on, charge the earphones.

[0163] For example, the left earbud is charged when the charging case and the left earbud are powered on; the right earbud is charged when the charging case and the right earbud are powered on; and both earbuds are charged when the charging case and both earbuds are powered on.

[0164] In this technical solution, when the charging case and the earphones are powered on, the charging case can be used to transmit current or signals to the earphones. The current can be used to charge the earphones, and the signal can be used to communicate with the earphones.

[0165] In some possible implementations, charging the earphones while the charging case and earphones are powered on may include: detecting whether the earphones are fully charged during the charging process; and controlling the charging case and earphones to be de-powered when the earphones are fully charged.

[0166] For example, during the charging process of the left earbud, it is detected whether the left earbud is fully charged; if the left earbud is fully charged, the charging case and the left earbud are controlled to be in a non-powered state; if the left earbud is not fully charged, the charging case and the left earbud are controlled to be in a powered state, that is, to continue charging the left earbud.

[0167] During the charging process of the right earbud, the system detects whether the right earbud is fully charged. If the right earbud is fully charged, the system controls the charging case and the right earbud to be in a de-powered state. If the right earbud is not fully charged, the system controls the charging case and the right earbud to be in a powered state, that is, to continue charging the right earbud.

[0168] During the charging process of the left and right earbuds, the system detects whether the left and right earbuds are fully charged. When the left and right earbuds are fully charged, the system controls the charging case and the left and right earbuds to be in a non-powered state. When the left and right earbuds are not fully charged, the system controls the charging case and the left and right earbuds to be in a powered state, that is, to continue charging the left and right earbuds.

[0169] In this technical solution, during the charging process of the earphones, it is possible to detect whether the earphones are fully charged. If the earphones are not fully charged, the charging case and the earphones can be kept powered on, that is, the earphones can continue to be charged. If the earphones are fully charged, the charging case and the left and right earphones are kept de-powered, that is, the earphones are not charged. This solves to some extent the problem of electrochemical corrosion caused by the conductive connectors being energized for a long time, which leads to the failure of the detection status.

[0170] In some possible implementations, controlling whether the charging case and earphones are powered on based on the earphones' state of entering and leaving the charging case may include: when the earphones' state of entering and leaving the charging case is either a single earphone in the charging case or both earphones in the charging case, controlling whether the charging case and earphones are powered on based on whether the charging case and earphones are communicating.

[0171] In this technical solution, when the earphones are in the charging case in either single earphone or both earphones are in the charging case, the charging case and earphones can be controlled to be powered on based on whether the charging case and earphones are communicating. The charging case will not be powered on for a long time, thereby reducing the power consumption of the charging case and solving the corrosion problem caused by the charging case being powered on for a certain extent.

[0172] In some possible implementations, controlling whether the charging case and the earphone are in a powered-on state based on whether the charging case and the earphone are communicating may include: controlling the charging case and the earphone to be powered on when a communication command is detected, so as to communicate with the earphone according to the communication command; and controlling the charging case and the earphone to be in a de-powered state when the communication command is not detected.

[0173] For example, the communication commands may include, but are not limited to: commands to detect the current remaining battery power of the headphones, pairing commands to pair with the headphones via Bluetooth, commands to detect the current temperature of the headphones, and commands to read the headphone address.

[0174] If the charging case detects a command indicating the earbuds' remaining battery level, it can power on both the charging case and the earbuds, and then check the earbuds' remaining battery level. If the charging case detects a pairing command to pair with the earbuds via Bluetooth, it can power on both the charging case and the earbuds, and then pair via Bluetooth. If the charging case detects a command to check the earbuds' current temperature, it can power on both the charging case and the earbuds, and then check the earbuds' current temperature. If the charging case detects a command to read the earbuds' address, it can power on both the charging case and the earbuds, and then read the earbuds' address. For example, the two read earbud addresses can be used to determine if they are a pair.

[0175] In this technical solution, if a communication command is detected, indicating that the charging case and earphones need to communicate, then the charging case and earphones are controlled to be powered on. The communication command is used to instruct communication with the earphones. If no communication command is detected, indicating that the charging case and earphones do not need to communicate, then the charging case and earphones are controlled to be de-powered. Therefore, the charging case and earphones are only powered on when there is a communication requirement, and de-powered when there is no communication requirement. Thus, the charging case will not be continuously powered, thereby reducing power consumption and mitigating corrosion problems caused by prolonged power consumption.

[0176] In some possible implementations, when the earphones are in the charging case in either the single earphone state or the left and right earphone states, controlling whether the charging case and earphones are powered on based on whether the charging case and earphones are communicating may include:

[0177] When the left earbud is in the charging case, and a communication command is detected, the charging case and the left earbud are powered on so that they can communicate with the left earbud according to the communication command.

[0178] When the right earbud is in the charging case, and a communication command is detected, the charging case and the right earbud are powered on so that they can communicate with the right earbud according to the communication command.

[0179] When the left and right earbuds are in the charging case, and a communication command is detected, the charging case and the left and right earbuds are powered on to communicate with the left and right earbuds according to the communication command.

[0180] In this technical solution, when different earbuds are in the charging case, after detecting a communication command, the charging case and the corresponding earbuds can be powered on to communicate with the earbuds in the charging case according to the communication command, thus ensuring a high success rate of communication.

[0181] In some possible implementations, after the communication between the charging case and the earphones ends, the charging case and earphones are controlled to be in a non-powered state.

[0182] In this technical solution, when the earphones are in the charging case and the charging case needs to communicate with the earphones, both the charging case and the earphones are controlled to be in a powered-on state. After the communication ends, both the charging case and the earphones are controlled to be in a de-powered state. The charging case will not be in a powered-on state for a long time, thereby reducing the power consumption of the charging case and solving the corrosion problem caused by the charging case being powered on for a certain extent.

[0183] In this embodiment, the current magnetic induction intensity of the charging case is detected; the state of the earphones entering and leaving the charging case is determined based on a preset magnetic induction intensity threshold and the current magnetic induction intensity; and the charging case and earphones are controlled to be powered on based on the earphones' state of entering and leaving the charging case. This method controls whether the charging case and earphones are powered on based on the earphones' state of entering and leaving the charging case, thus preventing the charging case from being continuously charged, reducing power consumption and mitigating corrosion caused by prolonged charging. When the charging case and earphones are powered on, the earphones are charged to ensure sufficient battery power for user use.

[0184] like Figure 4 The diagram shown is a schematic representation of an embodiment of the control device for the earphone charging case in this application. The device is applied to the charging case and includes:

[0185] The detection module 401 is used to detect the current magnetic induction intensity of the charging box;

[0186] The determining module 402 is used to determine the state of the earphone entering or leaving the charging case based on a preset magnetic induction intensity threshold and the current magnetic induction intensity.

[0187] The control module 403 is used to control whether the charging case and the earphones are in a powered state according to the state of the earphones entering and leaving the charging case.

[0188] Optionally, in some embodiments of this application, the determining module 402 is specifically used to determine the detection range of the current magnetic induction intensity based on a preset magnetic induction intensity threshold and the current magnetic induction intensity; and to determine the state of the earphone entering or leaving the charging case based on the detection range of the current magnetic induction intensity.

[0189] The detection interval of the current magnetic induction intensity includes a first detection interval, a second detection interval, and a third detection interval. The first detection interval is the detection interval where the electromagnetic induction intensity is less than or equal to a first preset threshold. The second detection interval is the detection interval where the electromagnetic induction intensity is greater than the first preset threshold and less than or equal to a second preset threshold. The third detection interval is the detection interval where the electromagnetic induction intensity is greater than the second preset threshold.

[0190] Optionally, in some embodiments of this application, when the charging box periodically acquires the magnetic induction intensity of the charging box, the current magnetic induction intensity is the magnetic induction intensity of the charging box acquired in the current period. The determining module 402 is specifically used to determine the detection interval of the current magnetic induction intensity based on a preset magnetic induction intensity threshold and the acquired current magnetic induction intensity when an interrupt signal is obtained based on a preset interrupt type.

[0191] The preset interrupt types include interrupt types triggered within a threshold range, or interrupt types triggered outside a threshold range; the interrupt types triggered within a threshold range are used to trigger the generation of an interrupt signal when the detection interval corresponding to the magnetic induction intensity of the previous cycle and the magnetic induction intensity of the current cycle of the charging box changes from the first detection interval to the second detection interval, or from the third detection interval to the second detection interval.

[0192] The threshold-out-of-range trigger interrupt type is used to trigger the generation of an interrupt signal when the detection interval corresponding to the magnetic induction intensity of the previous cycle and the magnetic induction intensity of the current cycle of the charging box changes from the second detection interval to the first detection interval, or changes from the second detection interval to the third detection interval.

[0193] Optionally, in some embodiments of this application, when the preset interrupt type is an interrupt type triggered within a threshold range; when an interrupt signal is obtained based on the preset interrupt type, the determining module 402 is specifically used to determine the detection interval where the current magnetic induction intensity is located as the second detection interval when the interrupt signal is detected; and to determine the state of the earphone entering and leaving the charging case as a single earphone in the charging case state based on the second detection interval.

[0194] Optionally, in some embodiments of this application, after determining that the earphone is in the charging case as a single earphone in the charging case, the device further includes:

[0195] The activation module 404 is used to activate the electrical detection switch, perform electrical detection, and obtain the electrical detection result.

[0196] The determining module 402 is specifically used to determine, when the electrical detection result indicates that the left earphone is in the charging case, that the single earphone is in the charging case state as the left earphone is in the charging case state; or,

[0197] The determination module 402 is specifically used to determine the state of the single earphone in the charging case as the right earphone is in the charging case when the electrical detection result indicates that the right earphone is in the charging case.

[0198] Control module 403 is specifically used to control the charging case and the left earphone to be in a powered-on state based on the left earphone's state in the charging case; or,

[0199] The control module 403 is specifically used to control the charging case and the right earphone to be in a powered state according to the state of the right earphone in the charging case.

[0200] Optionally, in some embodiments of this application, when the preset interrupt type is an interrupt type triggered outside the threshold range; when an interrupt signal is obtained based on the preset interrupt type,

[0201] The determining module 402 is specifically used to determine, when the interrupt signal is detected, the detection interval where the current magnetic induction intensity is located is the first detection interval or the third detection interval; and to determine, based on the first detection interval or the third detection interval, the state of the earphones entering and leaving the charging case is either that the left and right earphones are not in the charging case or that the left and right earphones are in the charging case.

[0202] Optionally, in some embodiments of this application, the determining module 402 is specifically used to determine, when the current magnetic induction intensity is less than or equal to the first preset threshold, that the state of the earphones entering and leaving the charging case is that the left and right earphones are not in the charging case, and the current magnetic induction intensity is less than or equal to the first preset threshold, which corresponds to the first detection interval; and to determine, when the current magnetic induction intensity is greater than the second preset threshold, that the state of the earphones entering and leaving the charging case is that the left and right earphones are in the charging case, and the current magnetic induction intensity is greater than the second preset threshold, which corresponds to the third detection interval.

[0203] Control module 403 is specifically used to control the charging case and the left and right earbuds to be in a de-powered state when the left and right earbuds are not in the charging case; or,

[0204] The control module 403 is specifically used to control the charging case and the left and right earbuds to be in a powered state according to the state of the left and right earbuds in the charging case.

[0205] Optionally, in some embodiments of this application, the apparatus further includes:

[0206] The charging module 405 is used to charge the earphones when the charging case and earphones are powered on.

[0207] Optionally, in some embodiments of this application,

[0208] The detection module 401 is also used to detect whether the earphone is fully charged during the charging process;

[0209] The control module 403 is also used to control the charging case and the earphones to be in a non-powered state when the earphones are fully charged.

[0210] Optionally, in some embodiments of this application, the detection module 401 is specifically used to detect the current magnetic induction intensity of the charging box via a Hall sensor.

[0211] Optionally, in some embodiments of this application, the control module 403 is specifically used to control whether the charging case and the earphones are in a powered-on state, depending on whether the charging case and the earphones are communicating, when the state of the earphones entering and leaving the charging case is either a single earphone in the charging case state or both earphones are in the charging case state.

[0212] Optionally, in some embodiments of this application, the control module 403 is specifically used to control the charging case and earphones to be in a powered-on state when a communication command is detected, so as to communicate with the earphones according to the communication command; and to control the charging case and earphones to be in a de-powered state when the communication command is not detected.

[0213] Optionally, in some embodiments of this application, the charging case is provided with a conductive connector, which controls whether the charging case and the earphones are in a powered state.

[0214] like Figure 5 The diagram shown is a schematic representation of one embodiment of the charging box in this application, which may include, as follows: Figure 4 The control device for the earphone charging case shown.

[0215] like Figure 6 The diagram shown is a schematic representation of one embodiment of the charging box in this application. The charging box includes:

[0216] The memory 601, the processor 602, and the controller 603;

[0217] The memory 601 stores a computer program that can run on the processor 602;

[0218] The processor 602 is used to detect the current magnetic induction intensity of the charging case; and determine the state of the earphone entering or leaving the charging case based on the preset magnetic induction intensity threshold and the current magnetic induction intensity.

[0219] The controller 603 is used to control whether the charging case and the earphones are in a powered state based on the state of the earphones entering and leaving the charging case.

[0220] Optionally, in some embodiments of this application, the processor 602 is specifically configured to determine the detection range of the current magnetic induction intensity based on a preset magnetic induction intensity threshold and the current magnetic induction intensity; and to determine the state of the earphone entering or leaving the charging case based on the detection range of the current magnetic induction intensity.

[0221] The detection interval of the current magnetic induction intensity includes a first detection interval, a second detection interval, and a third detection interval. The first detection interval is the detection interval where the electromagnetic induction intensity is less than or equal to a first preset threshold. The second detection interval is the detection interval where the electromagnetic induction intensity is greater than the first preset threshold and less than or equal to a second preset threshold. The third detection interval is the detection interval where the electromagnetic induction intensity is greater than the second preset threshold.

[0222] Optionally, in some embodiments of this application, when the charging box periodically acquires the magnetic induction intensity of the charging box, the current magnetic induction intensity is the magnetic induction intensity of the charging box acquired in the current period. The processor 602 is specifically used to determine the detection interval of the current magnetic induction intensity based on a preset magnetic induction intensity threshold and the acquired current magnetic induction intensity when an interrupt signal is obtained based on a preset interrupt type.

[0223] The preset interrupt types include interrupt types triggered within a threshold range, or interrupt types triggered outside a threshold range; the interrupt types triggered within a threshold range are used to trigger the generation of an interrupt signal when the detection interval corresponding to the magnetic induction intensity of the previous cycle and the magnetic induction intensity of the current cycle of the charging box changes from the first detection interval to the second detection interval, or from the third detection interval to the second detection interval.

[0224] The threshold-out-of-range trigger interrupt type is used to trigger the generation of an interrupt signal when the detection interval corresponding to the magnetic induction intensity of the previous cycle and the magnetic induction intensity of the current cycle of the charging box changes from the second detection interval to the first detection interval, or changes from the second detection interval to the third detection interval.

[0225] Optionally, in some embodiments of this application, when the preset interrupt type is an interrupt type triggered within a threshold range; when an interrupt signal is obtained based on the preset interrupt type, the processor 602 is specifically used to determine, upon detecting the interrupt signal, that the detection interval of the current magnetic induction intensity is the second detection interval; and to determine, based on the second detection interval, that the state of the earphone entering and leaving the charging case is a single earphone in the charging case state.

[0226] Optionally, in some embodiments of this application, after determining that the state of the earphone entering and leaving the charging case is that the single earphone is in the charging case, the controller 603 is used to turn on the electrical detection switch, perform electrical detection, and obtain the electrical detection result.

[0227] Processor 602 is specifically configured to, when the electrical detection result indicates that the left earbud is in the charging case, determine that the single earbud is in the charging case state as the left earbud is in the charging case state; or,

[0228] The processor 602 is specifically configured to determine, when the electrical detection result indicates that the right earphone is in the charging case, that the single earphone is in the charging case state as the right earphone is in the charging case state;

[0229] Controller 603 is specifically used to control the charging case and the left earphone to be in a powered-on state based on the left earphone's state in the charging case; or,

[0230] The controller 603 is specifically used to control the charging case and the right earphone to be in a powered state based on the state of the right earphone in the charging case.

[0231] Optionally, in some embodiments of this application, when the preset interrupt type is an interrupt type triggered outside the threshold range; when an interrupt signal is obtained based on the preset interrupt type,

[0232] The processor 602 is specifically configured to, upon detecting the interrupt signal, determine the detection interval of the current magnetic induction intensity as the first detection interval or the third detection interval; and, based on the first detection interval or the third detection interval, determine the state of the earphones entering or leaving the charging case as either the left and right earphones being in the charging case or the left and right earphones not being in the charging case.

[0233] Optionally, in some embodiments of this application, the processor 602 is specifically configured to, when the current magnetic induction intensity is less than or equal to the first preset threshold, determine that the state of the earphones entering or leaving the charging case is that the left and right earphones are in the charging case, wherein the current magnetic induction intensity is less than or equal to the first preset threshold and corresponds to the first detection interval; and when the current magnetic induction intensity is greater than the second preset threshold, determine that the state of the earphones entering or leaving the charging case is that the left and right earphones are not in the charging case, wherein the current magnetic induction intensity is greater than the second preset threshold and corresponds to the third detection interval;

[0234] Controller 603 is specifically used to control the charging case and the left and right earbuds to be powered on when the left and right earbuds are not in the charging case state; or,

[0235] The controller 603 is specifically used to control the charging case and the left and right earbuds to be in a non-powered state based on the state of the left and right earbuds in the charging case.

[0236] Optionally, in some embodiments of this application, the controller 603 is used to charge the earphones when the charging case and earphones are in a powered state.

[0237] Optionally, in some embodiments of this application, the processor 602 is further configured to detect whether the earphone is fully charged during the charging process;

[0238] The controller 603 is also configured to control the charging case and the earphones to be in a non-powered state when the earphones are fully charged.

[0239] Optionally, in some embodiments of this application, the processor 602 is specifically configured to detect the current magnetic induction intensity of the charging box via a Hall sensor.

[0240] Optionally, in some embodiments of this application, the controller 603 is specifically used to control whether the charging case and the earphones are in a powered-on state, depending on whether the charging case and the earphones are communicating, when the earphones are in the charging case state of either a single earphone in the charging case or both earphones in the charging case.

[0241] Optionally, in some embodiments of this application, the controller 603 is specifically configured to control the charging case and earphones to be powered on when a communication command is detected, so as to communicate with the earphones according to the communication command; and to control the charging case and earphones to be de-powered when the communication command is not detected.

[0242] Optionally, in some embodiments of this application, the charging case is provided with a conductive connector, which controls whether the charging case and the earphones are in a powered state.

[0243] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

[0244] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0245] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0246] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0247] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0248] If the integrated unit is implemented as 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 this application, in essence, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0249] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A control method for an earphone charging case, characterized in that, The method is applied to a charging case, and the method includes: Detect the current magnetic field strength of the charging case; The state of the earphones entering and leaving the charging case is determined based on the preset magnetic induction intensity threshold and the current magnetic induction intensity. Based on the state of the earphones entering and leaving the charging case, control whether the charging case and earphones are in a powered state.

2. The method according to claim 1, characterized in that, The step of determining the state of the earphones entering and leaving the charging case based on a preset magnetic induction intensity threshold and the current magnetic induction intensity includes: The detection range of the current magnetic induction intensity is determined based on the preset magnetic induction intensity threshold and the current magnetic induction intensity. The state of the earphones entering or leaving the charging case is determined based on the detection range of the current magnetic induction intensity. The detection interval of the current magnetic induction intensity includes a first detection interval, a second detection interval, and a third detection interval. The first detection interval is the detection interval where the electromagnetic induction intensity is less than or equal to a first preset threshold. The second detection interval is the detection interval where the electromagnetic induction intensity is greater than the first preset threshold and less than or equal to a second preset threshold. The third detection interval is the detection interval where the electromagnetic induction intensity is greater than the second preset threshold.

3. The method according to claim 2, characterized in that, When the charging case periodically acquires the magnetic induction intensity of the charging case, the current magnetic induction intensity is the magnetic induction intensity of the charging case acquired in the current period. Determining the detection interval of the current magnetic induction intensity based on a preset magnetic induction intensity threshold and the current magnetic induction intensity includes: When an interrupt signal is obtained based on a preset interrupt type, the detection range of the current magnetic induction intensity is determined according to the preset magnetic induction intensity threshold and the obtained current magnetic induction intensity. The preset interrupt types include interrupt types triggered within a threshold range, or interrupt types triggered outside a threshold range; the interrupt types triggered within a threshold range are used to trigger the generation of an interrupt signal when the detection interval corresponding to the magnetic induction intensity of the previous cycle and the magnetic induction intensity of the current cycle of the charging box changes from the first detection interval to the second detection interval, or from the third detection interval to the second detection interval. The threshold-out-of-range trigger interrupt type is used to trigger the generation of an interrupt signal when the detection interval corresponding to the magnetic induction intensity of the previous cycle and the magnetic induction intensity of the current cycle of the charging box changes from the second detection interval to the first detection interval, or changes from the second detection interval to the third detection interval.

4. The method according to claim 3, characterized in that, When the preset interrupt type is triggered within a threshold range; when an interrupt signal is obtained based on the preset interrupt type, the detection interval of the current magnetic induction intensity is determined according to the preset magnetic induction intensity threshold and the acquired current magnetic induction intensity, including: Upon detecting the interruption signal, the detection interval in which the current magnetic induction intensity is located is determined to be the second detection interval; The step of determining the state of the earphones entering or leaving the charging case based on the detection range of the current magnetic induction intensity includes: Based on the second detection range, the state of the earphone entering and leaving the charging case is determined to be a single earphone in the charging case.

5. The method according to claim 4, characterized in that, After determining that the earphone's state in and out of the charging case is that only one earphone is in the charging case, the method further includes: Turn on the electrical detection switch to perform electrical testing and obtain the electrical detection results; If the electrical detection result indicates that the left earbud is in the charging case, then the state of the single earbud in the charging case is determined to be the state of the left earbud in the charging case; or, If the electrical detection result indicates that the right earphone is in the charging case, then the state of the single earphone in the charging case is determined to be the state of the right earphone in the charging case. The step of controlling whether the charging case and earphones are powered on based on the state of the earphones entering and leaving the charging case includes: Based on the left earphone's state in the charging case, control the charging case and the left earphone to be powered on; or, Based on the right earphone's state in the charging case, control the charging case and the right earphone to be powered on.

6. The method according to claim 3, characterized in that, When the preset interrupt type is an interrupt type triggered outside the threshold range; when an interrupt signal is obtained based on the preset interrupt type, the detection interval of the current magnetic induction intensity is determined according to the preset magnetic induction intensity threshold and the obtained current magnetic induction intensity, including: If the interruption signal is detected, the detection interval in which the current magnetic induction intensity is located is determined to be either the first detection interval or the third detection interval; The step of determining the state of the earphones entering or leaving the charging case based on the detection range of the current magnetic induction intensity includes: Based on the first detection interval or the third detection interval, the state of the earphones entering and leaving the charging case is determined to be either the left and right earphones not in the charging case, or the left and right earphones in the charging case.

7. The method according to claim 6, characterized in that, The step of determining, based on the first detection interval or the third detection interval, the state of the earphones entering and leaving the charging case as either the left or right earphones not in the charging case, or the left or right earphones in the charging case, includes: When the current magnetic induction intensity is less than or equal to the first preset threshold, the state of the earphones entering and leaving the charging case is determined to be that the left and right earphones are not in the charging case. The current magnetic induction intensity being less than or equal to the first preset threshold corresponds to the first detection interval. When the current magnetic induction intensity is greater than the second preset threshold, the state of the earphones entering and leaving the charging case is determined to be that the left and right earphones are in the charging case. The current magnetic induction intensity being greater than the second preset threshold corresponds to the third detection interval. The step of controlling whether the charging case and earphones are powered on based on the state of the earphones entering and leaving the charging case includes: Based on the fact that the left and right earbuds are not in the charging case, control the charging case and the left and right earbuds to be in a de-powered state; or... Based on the state of the left and right earbuds in the charging case, the charging case and the left and right earbuds are controlled to be powered on.

8. The method according to any one of claims 1-7, characterized in that, The method further includes: The earphones are charged while the charging case and earphones are powered on.

9. The method according to claim 8, characterized in that, The step of charging the earphones while the charging case and earphones are powered on includes: During the charging process of the earphones, it is detected whether the earphones are fully charged; When the earphones are fully charged, the charging case and the earphones are kept in a non-powered state.

10. The method according to any one of claims 1-6, characterized in that, The detection of the current magnetic field strength of the charging case includes: The current magnetic field strength of the charging case is detected by a Hall sensor.

11. The method according to any one of claims 1-6, characterized in that, The step of controlling whether the charging case and earphones are powered on based on the state of the earphones entering and leaving the charging case includes: When the earphones are in or out of the charging case, either one earphone is in the charging case or both earphones are in the charging case, the charging case and earphones are controlled to be powered on depending on whether the charging case and the earphones are communicating.

12. The method according to claim 11, characterized in that, The step of controlling whether the charging case and the earphones are in a powered-on state based on whether the charging case and the earphones are communicating includes: Upon detecting a communication command, the charging case and earphones are powered on to communicate with the earphones according to the communication command. If the communication command is not detected, the charging case and earphones are controlled to be in a non-powered state.

13. The method according to any one of claims 1-7, characterized in that, The charging case is equipped with a conductive connector, which controls whether the charging case and the earphones are powered on.

14. A control device for an earphone charging case, the device being applied to the charging case, the device comprising: A detection module is used to detect the current magnetic induction intensity of the charging box; The determination module is used to determine the state of the earphones entering or leaving the charging case based on a preset magnetic induction intensity threshold and the current magnetic induction intensity. The control module is used to control whether the charging case and the earphones are powered on based on the state of the earphones entering and leaving the charging case.

15. A charging case, characterized in that, include: Memory and processor, as well as controller; The memory stores computer programs that can run on the processor; The charging box is used to implement the steps of the method according to any one of claims 1 to 13 when executing the computer program.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-13.