Earphone box control method and device for executing operation based on shielding state, and earphone box

By performing multiple occlusion detections in the earphone case and only executing operations when the sequence of occlusion state changes matches a predetermined state sequence, the problems of misoperation and misidentification of the earphone charging case are solved, improving user experience and energy efficiency.

CN120980394APending Publication Date: 2025-11-18SHENZHEN PHICOUSTIC SYST DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511045774.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-28
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

In the existing technology, the screen of the earphone charging case is easily misinterpreted as a single or double click operation when the user carries it in their clothing pocket, leading to abnormal wake-up and misoperation, increasing unnecessary power consumption, and affecting the user experience.

Method used

By performing multiple individual occlusion detections near the headphone box at multiple times, an occlusion state change sequence is obtained. The predetermined operation is executed only when the occlusion state change sequence matches the predetermined state sequence corresponding to the predetermined operation. Occlusion detection is performed using infrared, laser, ultrasonic, millimeter-wave radar or optical sensors to avoid false identification and misoperation.

Benefits of technology

It enables contactless scheduled operation execution, avoids misoperation and misidentification, saves energy, and improves the user's headphone experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120980394A_ABST
    Figure CN120980394A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of intelligent hardware, and provides an earphone box control method and device for executing operation based on a shielding state, and an earphone box. According to the embodiment of the invention, the preset state sequence corresponding to the preset operation is preset, so that the preset operation corresponding to the preset state sequence is executed only when the shielding state change sequence formed by a plurality of independent shielding states obtained by carrying out multiple times of independent shielding detection in a plurality of times accords with the preset state sequence; therefore, a technical scheme for executing the predetermined operation in a non-contact manner is provided, the technical problem that misoperation and misrecognition are easy to generate when a user performs simple single-click and double-click operations to control the earphone box in the prior art can be avoided, unnecessary power consumption caused by misoperation of the earphone box is avoided, energy is saved, and the user experience is improved. And the trouble brought to the user by the abnormal function of the earphone caused by misrecognition is solved, so that the earphone use experience of the user is improved. The earphone comprises a wireless earphone, a sports earphone, a high-end earphone, a Dolby earphone and the like.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of intelligent hardware, and particularly relates to an earphone box control method and device based on a shielding state and an earphone box. BACKGROUND

[0002] Currently, earphone charging boxes are generally used to provide charging functions for wireless Bluetooth earphones and wireless sports earphones. The earphone charging box can also be provided with a screen, a sensor and other modules to provide more interactive functions. For example, the screen on the earphone charging box can display earphone power, earphone charging box power, time and other information to help the user understand the current state of the earphone. The sensor in the earphone charging box can detect specific operations of the user on the earphone charging box to achieve specific functions. For example, when the user clicks or double-clicks the earphone charging box, the screen on the earphone charging box can be turned on to help the user understand the earphone power information. For another example, when the user clicks or double-clicks the earphone charging box, the hatch of the earphone charging box can be popped open to facilitate the user to take out the earphone. Screen wake-up refers to the process in which the earphone box controls the screen to visually turn off and on after the screen is turned off.

[0003] However, due to the small size of the screen of the earphone charging box, the user usually puts the earphone charging box into a clothes pocket when carrying it. The screen is easily misidentified as a single-click or double-click operation during contact with the clothes pocket, causing abnormal wake-up of the screen of the earphone charging box, and even further affecting the misoperation of the functions of the earphone charging box, which on the one hand causes trouble for the user to use the earphone, and on the other hand increases unnecessary power consumption. SUMMARY

[0004] The earphone box control method and device based on a shielding state and the earphone box provided by the embodiments of the present application can solve the technical problem that simple single-click and double-click operations of the user easily cause misoperation and misidentification of the earphone box in the prior art.

[0005] In a first aspect, the embodiments of the present application provide an earphone box control method based on a shielding state to perform a predetermined operation, which is applied to an earphone box, and the method comprises:

[0006] performing multiple separate shielding detections on whether there is a shielding object near the earphone box at multiple times to obtain multiple separate shielding states corresponding to the earphone box at the multiple times, wherein one separate shielding detection at one time obtains one separate shielding state, and the multiple separate shielding states constitute a shielding state change sequence embodying shielding state changes;

[0007] when the shielding state change sequence meets a predetermined state sequence corresponding to the predetermined operation, controlling the earphone box to perform the predetermined operation.

[0008] In a possible implementation manner of the first aspect, the individual blocking detection comprises:

[0009] controlling an infrared emission end in the earphone box to emit a plurality of infrared light beams;

[0010] controlling an infrared ranging module in the earphone box to determine the blocking state of each of the plurality of infrared light beams according to the size relationship between an actual blocking distance obtained by each of the plurality of infrared light beams and a first effective blocking distance threshold, wherein the actual blocking distance is determined based on the difference between the receiving time and the emission time and the speed of the infrared light beam;

[0011] determining the individual blocking state of the earphone box according to the blocking state of each of the plurality of infrared light beams.

[0012] In a possible implementation manner of the first aspect, each of the plurality of infrared light beams has a different digital signal code and constitutes a customized light beam group, and the individual blocking detection further comprises:

[0013] controlling an infrared receiving end in the earphone box to identify, according to the digital signal code, whether the plurality of infrared light beams reflected back by the blocking object are consistent with the customized light beam group, and if so, performing the step of determining the blocking state of each of the plurality of infrared light beams.

[0014] In a possible implementation manner of the first aspect, the individual blocking state of the earphone box comprises invalid blocking, effective blocking, and continuous movement of the blocking object, and the determining the individual blocking state of the earphone box according to the blocking state of each of the plurality of infrared light beams comprises:

[0015] if the blocking state of each of the plurality of light beams is no blocking object, determining that the individual blocking state of the earphone box is invalid blocking;

[0016] if the blocking state of each of the plurality of light beams is a blocking object, determining that the individual blocking state of the earphone box is effective blocking;

[0017] if the blocking state of at least one of the plurality of light beams is no blocking object and the blocking state of at least another light beam is a blocking object, determining that the individual blocking state of the earphone box is continuous movement of the blocking object.

[0018] In a possible implementation manner of the first aspect, the individual blocking detection comprises:

[0019] controlling a laser device in the earphone box to emit and receive a monochromatic laser beam;

[0020] A size relationship between an actual occlusion distance obtained according to the monochromatic laser beam measurement and a second effective occlusion distance threshold determines the individual occlusion state of the earphone case, wherein the actual occlusion distance is determined based on a time of flight.

[0021] In a possible implementation of the first aspect, the individual occlusion detection includes:

[0022] Controlling an ultrasonic device in the earphone case to emit and receive ultrasonic pulses;

[0023] A size relationship between an actual occlusion distance obtained according to the ultrasonic pulse measurement and a third effective occlusion distance threshold determines the individual occlusion state of the earphone case, wherein the actual occlusion distance is determined based on a time difference of echoes of the ultrasonic pulses.

[0024] In a possible implementation of the first aspect, the individual occlusion detection includes:

[0025] Controlling a millimeter wave radar in the earphone case to emit and receive millimeter waves;

[0026] A size relationship between an actual occlusion distance obtained according to the millimeter wave measurement and a fourth effective occlusion distance threshold determines the individual occlusion state of the earphone case, wherein the actual occlusion distance is determined based on a frequency change or a time difference of the millimeter waves.

[0027] In a possible implementation of the first aspect, the individual occlusion detection includes:

[0028] Controlling an optical sensor in the earphone case to obtain a plurality of images of an occlusion object;

[0029] Determining the individual occlusion state of the earphone case according to an image parallax of the plurality of images.

[0030] In a second aspect, an embodiment of the present application provides an earphone case control device for performing a predetermined operation based on an occlusion state, the device being applied in an earphone case, and the device comprising:

[0031] A first detection module configured to perform a plurality of individual occlusion detections on whether there is an occlusion object near the earphone case at a plurality of times, to obtain a plurality of individual occlusion states respectively corresponding to the plurality of times, wherein one individual occlusion detection at one time obtains one individual occlusion state, and the plurality of individual occlusion states constitute an occlusion state change sequence embodying occlusion state changes;

[0032] A second control module configured to control the earphone case to perform the predetermined operation when the occlusion state change sequence meets a predetermined state sequence corresponding to the predetermined operation.

[0033] In a third aspect, an earphone box is provided, including a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the earphone box implements the method according to any one of the first aspect.

[0034] In a fourth aspect, an electronic device is provided, including a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the electronic device implements the method according to any one of the first aspect.

[0035] In a fifth aspect, a computer readable storage medium is provided, storing a computer program. When the computer program is executed by a processor, the method according to any one of the first aspect is implemented.

[0036] In a sixth aspect, a computer program product is provided, including a computer program. When the computer program is executed, the method according to any one of the first aspect is executed.

[0037] The beneficial effects of the first aspect of the present application compared with the prior art are:

[0038] The embodiments of the present application provide a technical solution for executing a predetermined operation without contact by pre-setting a predetermined state sequence corresponding to a predetermined operation, so that the predetermined operation corresponding to the predetermined state sequence is executed only when the occlusion state change sequence formed by the multiple individual occlusion states obtained by multiple individual occlusion detections at multiple times conforms to the predetermined state sequence, thereby avoiding the technical problems of the prior art that the earphone box control is easily misoperated and misrecognized by simple single-click and double-click operations of the user, avoiding unnecessary power consumption caused by misoperation of the earphone box, saving energy, solving the problem that the abnormal function of the earphone caused by misrecognition brings trouble to the user, and improving the user's experience of using the earphone.

[0039] It can be understood that the beneficial effects of the second aspect to the sixth aspect can be referred to the related description in the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0041] Figure 1 is a flowchart of a method for controlling an earphone case based on an occlusion state according to an embodiment of the present application;

[0042] Figure 2 is a process diagram of multiple separate occlusion detections of whether there is an occlusion near the earphone case at multiple times according to an embodiment of the present application;

[0043] Figure 3 is a flowchart of a method for controlling an earphone case based on an occlusion state according to an embodiment of the present application;

[0044] Figure 4 is a structural diagram of an apparatus for controlling an earphone case based on an occlusion state according to an embodiment of the present application;

[0045] Figure 5 is a structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0046] In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular architectures, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application can be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known methods, devices, circuits, and

[0047] It will be understood that the term "includes," "including," "has," "having," "comprises," "comprising" or "contains," "containing" when used in this specification and in the following claims, specifies the presence of stated features, integers, steps, operations, elements, or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, or groups thereof.

[0048] It will also be understood that the term "and / or," when used in this specification and in the following claims, can be interpreted to mean one or more of the listed items can be present, alone or in combination, and that the combinations are included if any one or more of the listed items are present.

[0049] As used in this specification and in the claims, the term "if" can be interpreted as meaning "when," or "once," or "in response to a determination," or "in response to a detection," as appropriate, depending on the context. Similarly, the phrase "if it is determined" or "if [a described condition or event] is detected" can be interpreted as meaning "once it is determined" or "in response to the determination," or "once [the described condition or event] is detected," or "in response to the detection," as appropriate, depending on the context.

[0050] In addition, in the description of the present application and the appended claims, the terms "first", "second", "third", etc. are used only to distinguish descriptions, and cannot be understood as indicating or implying relative importance.

[0051] In the present application, the reference to "one embodiment" or "some embodiments" means that the specific features, structures or characteristics described in connection with the embodiment are included in one or more embodiments of the present application. Therefore, the statements "in one embodiment", "in some embodiments", "in other some embodiments", "in further some embodiments" and the like appearing in different places in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized. The terms "include", "contain", "have" and their variants mean "include but not limited to", unless otherwise specifically emphasized.

[0052] Figure 1 is a flowchart of a method for controlling an earphone case based on an occlusion state according to an embodiment of the present application.

[0053] S11, multiple separate occlusion detections are performed on whether there is an occlusion near the earphone case at multiple times, to obtain multiple separate occlusion states corresponding to the multiple times respectively, wherein one separate occlusion detection at one time obtains one separate occlusion state, and the multiple separate occlusion states constitute an occlusion state change sequence embodying occlusion state changes.

[0054] The earphone case refers to a device for accommodating earphones. Some earphone cases are configured with a charging interface, so that the earphones in the earphone case can be charged. Therefore, the earphone case with a charging function can also be called an earphone charging case. The earphones include but are not limited to Bluetooth earphones, wireless earphones, wireless Bluetooth earphones, open Bluetooth earphones, sports earphones, running earphones, running dedicated earphones, hanging earphones, hanging Bluetooth earphones, non-ear-in earphones, high-end earphones, AI earphones, smart earphones, AI smart earphones, Dolby earphones, Dolby earphones, Dolby Bluetooth earphones, Dolby Atmos earphones, etc.

[0055] In this way, whether there is an occlusion near the earphone box can be detected separately by setting a sensor. The sensor includes but is not limited to an infrared sensor, a laser sensor, an ultrasonic sensor, a millimeter wave radar sensor, an optical sensor, etc. For example, the infrared sensor, the laser sensor, the ultrasonic sensor, and the millimeter wave radar sensor can detect whether there is an occlusion near the earphone box by emitting and receiving corresponding light signals. If the time difference between the received light signal and the emitted light signal is less than a predetermined time, it means that the occlusion is very close, and it can be determined that the separate occlusion state of the earphone box is "there is an occlusion near". Conversely, if the time difference between the received light signal and the emitted light signal is greater than a predetermined time, or no light signal is reflected back by the receiving end, it means that the occlusion is far away, and it can be determined that the separate occlusion state of the earphone box is "there is no occlusion near". For another example, the optical sensor can detect whether there is an occlusion near the earphone box by obtaining an image near the earphone box. The above-mentioned sensors can be independently arranged in the earphone box, or can be integrated with the screen in the earphone box to be arranged in the earphone box.

[0056] The embodiment of the present application proposes that the earphone box can be detected multiple times at multiple times whether there is an occlusion near the earphone box, thereby obtaining multiple separate detection states corresponding to the earphone box at multiple times respectively. One separate occlusion detection at one time obtains one separate occlusion state. For example, in combination with the above-mentioned Figure 2 , Figure 2 The process of detecting multiple times at multiple times whether there is an occlusion near the earphone box is shown. The first separate occlusion detection is performed at 14:43:01 whether there is an occlusion near the earphone box, and the first separate occlusion state of the earphone box at this time is "there is an occlusion". The second separate occlusion detection is performed at 14:43:06 whether there is an occlusion near the earphone box, and the second separate occlusion state of the earphone box at this time is "there is no occlusion". The third separate occlusion detection is performed at 14:43:11 whether there is an occlusion near the earphone box, and the third separate occlusion state of the earphone box at this time is "there is an occlusion". The above-mentioned multiple separate occlusion states constitute an occlusion state change sequence embodying the change of the occlusion state, and in the previous example, the occlusion state change sequence constituted by the three separate occlusion states is "there is an occlusion, there is no occlusion, there is an occlusion", and the occlusion state change sequence embodies the change of the occlusion state near the earphone box.

[0057] S12, when the occlusion state change sequence meets a predetermined state sequence corresponding to a predetermined operation, controlling the earphone box to perform the predetermined operation.

[0058] In this case, the correspondence between the predetermined operation and the predetermined state sequence can be pre-set. For example, the predetermined state sequence 1 is "with an obstacle, without an obstacle, with an obstacle", and the predetermined operation 1 corresponding to the predetermined state sequence 1 is to light up the screen on the earphone box to wake up, so as to facilitate the user to understand the information related to the earphone, such as the earphone power and the like. For another example, the predetermined state sequence 2 is "with an obstacle, with an obstacle, with an obstacle, without an obstacle", and the predetermined operation 2 corresponding to the predetermined state sequence 2 is to pop up the hatch of the earphone box, so as to facilitate the user to take out the earphone.

[0059] When the obtained obstacle state change sequence in S11 matches the predetermined state sequence corresponding to a predetermined operation, the earphone box can be controlled to perform the predetermined operation. In the previous example, the obstacle state change sequence composed of three individual obstacle states is "with an obstacle, without an obstacle, with an obstacle", which matches the predetermined state sequence 1, and thus the earphone box can be controlled to perform the predetermined operation 1, i.e. to light up the screen to wake up.

[0060] In the prior art, since the screen size of the earphone charging box is small, the user usually puts the earphone charging box into the pocket when carrying it. The screen is easily misrecognized as a single click or double click operation during contact with the clothes pocket, causing the earphone charging box screen to wake up abnormally, and even further affecting the misoperation of the earphone charging box function. The embodiments of the present application pre-set the predetermined state sequence corresponding to the predetermined operation, so that the predetermined operation corresponding to the predetermined state sequence is only performed when the obstacle state change sequence composed of multiple individual obstacle states obtained by multiple single obstacle detections at multiple times matches the predetermined state sequence, thereby providing a technical solution for contactless execution of the predetermined operation, which can avoid the technical problems of the prior art that the user's simple single click and double click operation to control the earphone box is prone to misoperation and misrecognition, avoid unnecessary power consumption caused by misoperation of the earphone box, save energy, solve the disturbance caused by abnormal functions of the earphone caused by misrecognition, and thus improve the user's experience of using the earphone.

[0061] In one embodiment, the individual obstacle detection includes the following S211, S22, S23.

[0062] S211, control the infrared emission end in the earphone box to emit a plurality of infrared light beams.

[0063] The infrared sensor can include an infrared emission end, an infrared distance measuring module, etc.

[0064] The infrared emission end refers to an electronic device that converts electrical signals into specific wavelength infrared light beams and performs directional radiation, and its core function is to provide an optical signal source for an infrared communication, remote control or sensing system.

[0065] In the process of emitting multiple infrared light beams, the infrared emission end can continuously emit multiple infrared light beams in a time period, or can emit one light beam every interval. Both of the above-mentioned manners belong to the protection scope of the present application.

[0066] S22, determining the shielding state of each of the multiple infrared light beams according to the size relationship between the actual shielding distance measured by the infrared ranging module in the earphone box based on the multiple infrared light beams respectively and the first effective shielding distance threshold.

[0067] The infrared ranging refers to the principle that the infrared light beam is not diffused when propagating. The infrared light beam is emitted from the infrared emission end, reflected by the reflecting object, received by the infrared sensor, and then the actual shielding distance can be calculated according to the time from emission to reception and the propagation speed of the infrared light beam.

[0068] If an object is encountered, the multiple infrared light beams will be reflected back and received by the infrared sensor in the earphone box. When the multiple infrared light beams are received, the actual shielding distance of the object near the earphone box can be determined according to the difference between the reception time and the emission time and the speed of the infrared light beam. For example, the actual shielding distance can be determined based on the following calculation formula (1).

[0069] Actual shielding distance = (reception time - emission time) * speed of infrared light beam (1)

[0070] The speed of the infrared light beam can be the speed of light or other speed values.

[0071] If the actual shielding distance of the infrared light beam is less than the first effective shielding distance threshold, it means that the object is very close, and the shielding state of the infrared light beam is “with an object”. If the actual shielding distance of the infrared light beam is greater than the first effective shielding distance threshold, it means that the object is very far away, and the shielding state of the infrared light beam is “without an object”. The first effective shielding distance threshold can be set to any value in the range of 10 cm to 30 cm.

[0072] S23, determining the individual shielding state of the earphone box according to the shielding state of each of the multiple infrared light beams.

[0073] In this case, according to the blocking state of each of the plurality of infrared beams, the individual blocking state of the earphone box can be determined in various ways. For example, if the blocking state of all the infrared beams is "blocked", it is determined that the individual blocking state of the earphone box is "blocked". For another example, if the blocking state of all the infrared beams is "not blocked", it is determined that the individual blocking state of the earphone box is "not blocked". For another example, if the blocking state of part of the infrared beams is "blocked" and the blocking state of the other part of the infrared beams is "not blocked", the individual blocking state of the earphone box can be determined according to the blocking state of a larger number of infrared beams. For another example, if the number of infrared beams with the blocking state "blocked" is equal to the number of infrared beams with the blocking state "not blocked", the individual blocking state of the earphone box can be set to "uncertain", for example, or other states.

[0074] The embodiment of the present application can improve the accuracy of the individual blocking state of the earphone box by determining the individual blocking state of the earphone box according to the blocking state of each of the plurality of infrared beams, and provides a technical solution for performing a predetermined operation without contact, avoids the technical problem of inaccurate recognition caused by misidentification of user operation, and can reduce unnecessary power consumption caused by misoperation of the earphone box, save energy, solve the problem of user disturbance caused by abnormal function of the earphone caused by misidentification, and improve the user experience of using the earphone.

[0075] In one embodiment, each of the plurality of infrared beams has a different digital signal code and constitutes a customized beam group. After the step S211 in the above embodiment and before the step S22, the individual blocking detection further includes a step S212.

[0076] S212, controlling the infrared receiving end in the earphone box to identify whether the plurality of infrared beams reflected back by the blocking object are consistent with the customized beam group according to the digital signal code, and if so, performing the step of determining the blocking state of each of the plurality of infrared beams.

[0077] The infrared sensor can further include an infrared receiving end.

[0078] The infrared receiving end refers to an electronic device that converts infrared beam signals into electrical signals and performs demodulation and decoding, and its core function is to detect and identify specific infrared beams emitted by the paired infrared transmitting end, and to realize the conversion of optical signals to digital signal codes.

[0079] The plurality of infrared beams emitted by the infrared transmitting end can have different digital signal codes. The plurality of infrared beams with different digital signal codes can be, for example, infrared beam 1, infrared beam 2, and infrared beam 3, which constitute a customized beam group.

[0080] After the infrared emission end periodically emits the customized beam group (also known as customized triplet, beam triplet, etc.) of "infrared beam 1, infrared beam 2, infrared beam 3" as specified, the customized beam group encounters an obstruction and is reflected back to be received and processed by the infrared receiving end. The infrared receiving end can identify whether the multiple infrared beams reflected back by the obstruction are consistent with the customized beam group according to the digital signal coding. For example, if the multiple infrared beams reflected back by the obstruction are also "infrared beam 1, infrared beam 2, infrared beam 3" according to the digital signal coding, it is determined that the multiple infrared beams are consistent with the customized beam group. For another example, if the multiple infrared beams reflected back by the obstruction are "infrared beam 1, infrared beam 3" according to the digital signal coding, it is determined that the multiple infrared beams are inconsistent with the customized beam group. If the multiple infrared beams reflected back by the obstruction are consistent with the customized beam group, the step of determining the obstruction state of each of the multiple infrared beams is performed, that is, step S22.

[0081] The embodiment of the present application can further improve the accuracy of the individual obstruction state of the earphone box by emitting a customized beam group composed of multiple infrared beams with different digital signal coding from the infrared emission end, and identifying whether the multiple infrared beams reflected by the obstruction are consistent with the customized beam group according to the digital signal coding by the infrared receiving end. A technical solution for performing a predetermined operation without contact is provided, which avoids the technical problem of inaccurate identification caused by misidentification of user operation, and can reduce unnecessary power consumption caused by misoperation of the earphone box, save energy, solve the problem of user disturbance caused by abnormal functions of the earphone due to misidentification, and thus improve the user experience of using the earphone.

[0082] In one embodiment, the individual obstruction state of the earphone box includes invalid obstruction, valid obstruction, and continuous movement of the obstruction. In the above embodiment S23, determining the individual obstruction state of the earphone box according to the obstruction state of each of the multiple infrared beams includes S231, S232, and S233.

[0083] S231, if the obstruction state of each of the multiple beams is no obstruction, it is determined that the individual obstruction state of the earphone box is invalid obstruction.

[0084] For example, if the obstruction state of each of the multiple beams is no obstruction without setting the customized beam group, it is determined that the individual obstruction state of the earphone box is invalid obstruction.

[0085] For another example, if the obstruction state of each of the infrared beams 1, 2, and 3 is no obstruction after setting the customized beam group, for example, the customized beam group is "infrared beam 1, infrared beam 2, infrared beam 3", it is determined that the individual obstruction state of the earphone box is invalid obstruction.

[0086] S232, if the blocking states of the plurality of light beams are all blocked, determining that the individual blocking state of the earphone case is valid blocking.

[0087] For example, if the blocking states of the plurality of light beams are all blocked without setting the customized light beam group, it is determined that the individual blocking state of the earphone case is valid blocking.

[0088] For example, if the blocking states of the plurality of light beams are all blocked without setting the customized light beam group, it is determined that the individual blocking state of the earphone case is valid blocking.

[0089] S233, if the blocking state of at least one light beam of the plurality of light beams is unblocked and the blocking state of at least another light beam is blocked, determining that the individual blocking state of the earphone case is continuous blocking of the blocking object.

[0090] For example, if the blocking state of at least one light beam of the plurality of light beams is unblocked and the blocking state of at least another light beam is blocked without setting the customized light beam group, it is determined that the individual blocking state of the earphone case is continuous blocking of the blocking object.

[0091] For example, if the blocking state of at least one light beam of the plurality of light beams is unblocked and the blocking state of at least another light beam is blocked without setting the customized light beam group, it is determined that the individual blocking state of the earphone case is continuous blocking of the blocking object.

[0092] The present application embodiment can further improve the flexibility of the individual blocking state of the earphone case by determining three different individual blocking states of the earphone case according to the blocking states of the plurality of light beams, and further improve the accuracy of performing the predetermined operation, avoid the technical problem of inaccurate recognition caused by misrecognition of the user operation, and reduce unnecessary power consumption caused by misoperation of the earphone case, save energy, solve the problem of user disturbance caused by abnormal function of the earphone caused by misrecognition, and improve the user experience of using the earphone.

[0093] Figure 3 FIG. 1 is a flowchart of a method for controlling an earphone case based on a blocking state according to an application embodiment.

[0094] S31, multiple separate blocking detections are performed on whether there is an obstacle near the earphone case at multiple times, and multiple separate blocking states of the earphone case corresponding to the multiple times are obtained, wherein one separate blocking detection at one time obtains one separate blocking state, and the multiple separate blocking states constitute a blocking state change sequence reflecting changes in the blocking state.

[0095] First, define a customized beam group composed of infrared beams 1, 2, and 3 with different digital signal encodings.

[0096] Next, the infrared transmitting end on the earphone charging case periodically transmits a customized beam group composed of infrared beams 1, 2, and 3. The customized beam triplet will be reflected back when encountering an obstacle and be received and processed by the infrared receiving end. The infrared receiving end identifies the customized beam group customized by the transmitting end according to the digital signal encoding. The infrared ranging software module identifies whether the customized beam group encounters an effective block according to the beam transmission time, return time, and first effective blocking distance threshold S, and the specific calculation method is the same as or similar to that in the foregoing embodiment. The separate blocking state can be defined to include the following three states. State 1 is "no obstacle within the first effective blocking distance threshold S". The determination method of state 1 is that infrared beams 1, 2, and 3 all encounter invalid blocking. State 2 is "there is an obstacle within the first effective blocking distance threshold S". The determination method of state 2 is that infrared beams 1, 2, and 3 all encounter effective blocking. State 3 is "the obstacle within the first effective blocking distance threshold S is continuously moving". The determination method of state 3 is that at least one of the three infrared beams 1, 2, and 3 encounters effective blocking, and at least one other encounters invalid blocking.

[0097] The infrared ranging software module analyzes the return time and state of the customized beam triplet, identifies the state of the obstacle in front of the earphone case, and determines the multiple separate blocking states of the earphone case corresponding to the multiple times. In the first separate blocking detection, the separate blocking state of the earphone case is determined to be "state 1: no obstacle". In the second separate blocking detection, the separate blocking state of the earphone case is determined to be "state 2: there is an obstacle". In the third separate blocking detection, the separate blocking state of the earphone case is determined to be "state 3: the obstacle is continuously moving". In the fourth separate blocking detection, the separate blocking state of the earphone case is determined to be "state 1: no obstacle". The multiple separate blocking states constitute a blocking state change sequence reflecting changes in the blocking state, and the blocking state change sequence is "state 1 (for t1 time) -> state 2 (for t2 time) -> state 3 (for t3 time) -> state 1 (for t1 time)".

[0098] S32, when the sequence of the shielding state changes conforms to the sequence of the predetermined state corresponding to the predetermined operation, controlling the earphone case to perform the predetermined operation.

[0099] When the identified sequence of shielding state changes embodying shielding state changes conforms to the sequence of the predetermined state corresponding to the screen lighting operation, it is considered that the user issues the predetermined operation of waking up and lighting the screen. After the infrared ranging software module completes the identification of the operation of waking up and lighting the screen, it notifies the system UI (User Interface, referred to as UI) to light the screen, that is, to light the screen. The system UI refers to a software module related to the screen display on the earphone case.

[0100] In one embodiment, the separate shielding detection includes the following S41 and S42.

[0101] S41, controlling the laser device in the earphone case to emit and receive a monochromatic laser beam.

[0102] S42, determining the separate shielding state of the earphone case according to the size relationship between the actual shielding distance obtained from the monochromatic laser beam measurement and the second effective shielding distance threshold, wherein the actual shielding distance is determined based on the time of flight.

[0103] The laser device can emit and receive a monochromatic laser beam. The laser device can also be referred to as a laser sensor. The laser device or the earphone case can also determine the actual shielding distance by calculating the time of flight of the monochromatic laser beam. For example, the actual shielding distance is determined based on the product of the time of flight and the speed of the monochromatic laser beam. If the actual shielding distance is less than the second effective shielding distance threshold, it can be understood that the shielding object is close to the earphone case, and the separate shielding state of the earphone case is determined to be "with shielding object". If the actual shielding distance is greater than the second effective distance threshold, it can be understood that the shielding object is far away from the earphone case, and the separate shielding state of the earphone case is determined to be "without shielding object". The second effective shielding distance threshold can be set to any value in the range of 10 cm to 30 cm, for example.

[0104] The embodiments of the present application can determine the separate shielding state of the earphone case according to the actual shielding distance obtained from the monochromatic laser beam measurement, which can improve the accuracy of the separate shielding state of the earphone case, provide a non-contact technical solution for performing a predetermined operation, avoid the technical problem of inaccurate identification caused by misidentification of user operation, and reduce unnecessary power consumption caused by misoperation of the earphone case, save energy, solve the problem of user disturbance caused by abnormal function of the earphone caused by misidentification, and thus improve the user experience of using the earphone.

[0105] In one embodiment, the separate shielding detection includes the following S51 and S52.

[0106] S51, control the ultrasonic device in the earphone case to emit and receive ultrasonic pulses.

[0107] S52, determine the individual shielding state of the earphone case according to the size relationship between the actual shielding distance obtained from the ultrasonic pulse measurement and the third effective shielding distance threshold, wherein the actual shielding distance is determined based on the echo time difference of the ultrasonic pulse.

[0108] The ultrasonic device can emit and receive ultrasonic pulses. The ultrasonic device can also be referred to as an ultrasonic sensor. The ultrasonic device or the earphone case can also determine the actual shielding distance by calculating the echo time of the ultrasonic pulse. For example, the actual shielding distance is determined based on the product of the echo time and the speed of the ultrasonic pulse. If the actual shielding distance is less than the third effective shielding distance threshold, it can be understood that the shielding object is close to the earphone case, and the individual shielding state of the earphone case is determined to be "with shielding object". If the actual shielding distance is greater than the third effective distance threshold, it can be understood that the shielding object is far from the earphone case, and the individual shielding state of the earphone case is determined to be "without shielding object". The third effective shielding distance threshold can be set to any value in the range of 10 cm to 30 cm, for example.

[0109] The embodiments of the present application can determine the individual shielding state of the earphone case according to the actual shielding distance obtained from the ultrasonic pulse measurement, which can improve the accuracy of the individual shielding state of the earphone case, provide a contactless technical solution for performing predetermined operations, avoid the technical problem of inaccurate recognition caused by misrecognition of user operations, and reduce unnecessary power consumption caused by misoperation of the earphone case, save energy, solve the problem of user disturbance caused by abnormal functions of the earphone due to misrecognition, and improve the user experience of using the earphone.

[0110] In one embodiment, the individual shielding detection includes the following S61 and S62.

[0111] S61, control the millimeter wave radar in the earphone case to emit and receive millimeter waves.

[0112] S62, determine the individual shielding state of the earphone case according to the size relationship between the actual shielding distance obtained from the millimeter wave measurement and the fourth effective shielding distance threshold, wherein the actual shielding distance is determined based on the frequency change or time difference of the millimeter wave.

[0113] The millimeter wave radar can emit and receive millimeter waves (the frequency may be, for example, 24 GHz, 60 GHz). The millimeter wave radar or the earphone box can also determine the actual blocking distance by the frequency change or time difference of the millimeter wave. For example, the time difference between the receiving time and the transmitting time is determined. The actual blocking distance is determined by the product of the time difference and the speed of the millimeter wave. If the actual blocking distance is less than the fourth effective blocking distance threshold, it can be understood that the blocking object is close to the earphone box, and the individual blocking state of the earphone box is determined to be “with blocking object”. If the actual blocking distance is greater than the fourth effective distance threshold, it can be understood that the blocking object is far away from the earphone box, and the individual blocking state of the earphone box is determined to be “without blocking object”. The fourth effective blocking distance threshold may be set to any value in the range of 10 cm to 30 cm, for example.

[0114] The actual blocking distance obtained according to the millimeter wave measurement is used to determine the individual blocking state of the earphone box in the embodiments of the present application, which can improve the accuracy of the individual blocking state of the earphone box, provide a technical solution for performing a predetermined operation in a contactless manner, avoid the technical problem of inaccurate recognition caused by misrecognition of user operation, and reduce unnecessary power consumption caused by misoperation of the earphone box, save energy, solve the problem that misrecognition causes the earphone to abnormally function and causes trouble to the user, and thus improve the user's experience of using the earphone.

[0115] In one embodiment, the individual blocking detection is as follows S71 and S72.

[0116] S71, controlling an optical sensor in the earphone box to obtain a plurality of images of the blocking object.

[0117] S72, determining the individual blocking state of the earphone box according to the image parallax of the plurality of images.

[0118] The plurality of images of the blocking object can be obtained by one optical sensor at different times. In addition, a plurality of optical sensors can also be arranged at different positions of the earphone box to obtain a plurality of images about the blocking object at different positions. The actual blocking distance between the earphone box and the blocking object can be determined by the image parallax of the plurality of obtained images. If the actual blocking distance is less than the fifth effective blocking distance threshold, it can be understood that the blocking object is close to the earphone box, and the individual blocking state of the earphone box is determined to be “with blocking object”. If the actual blocking distance is greater than the fifth effective distance threshold, it can be understood that the blocking object is far away from the earphone box, and the individual blocking state of the earphone box is determined to be “without blocking object”. The fifth effective blocking distance threshold may be set to any value in the range of 10 cm to 30 cm, for example.

[0119] The embodiment of the application can determine the individual shielding state of the earphone box according to the image parallax, improve the accuracy of the individual shielding state of the earphone box, provide a technical solution for performing a predetermined operation in a contactless manner, avoid the technical problem of inaccurate recognition caused by misrecognition of user operation, and reduce unnecessary power consumption caused by misoperation of the earphone box, save energy, solve the problem that misrecognition causes abnormal functions of the earphone to disturb users, and thus improve the user experience of using the earphone.

[0120] Figure 4 Figure 1 is a structural schematic diagram of an earphone box control device for performing an operation based on a shielding state according to an embodiment of the application.

[0121] As shown in Figure 4 Figure 1, the earphone box control device 4 (referred to as device 4) for performing an operation based on a shielding state is applied to an earphone box, and the device 4 includes a first detection module 41 and a second control module 42.

[0122] The first detection module 41 is configured to perform multiple individual shielding detections on whether there is a shielding object near the earphone box at multiple times, and obtain multiple individual shielding states of the earphone box corresponding to the multiple times respectively, wherein one individual shielding detection at one time obtains one individual shielding state, and the multiple individual shielding states constitute a shielding state change sequence reflecting changes in the shielding state.

[0123] The second control module 42 is configured to control the earphone box to perform a predetermined operation when the shielding state change sequence meets a predetermined state sequence corresponding to the predetermined operation.

[0124] Another embodiment of the application discloses the device 4. This embodiment is based on the above Figure 4 The individual shielding detection includes:

[0125] controlling an infrared emission end in the earphone box to emit multiple infrared light beams;

[0126] controlling an infrared distance measurement module in the earphone box to determine the shielding state of each of the multiple infrared light beams according to the size relationship between an actual shielding distance obtained by measuring the multiple infrared light beams respectively and a first effective shielding distance threshold, wherein the actual shielding distance is determined based on the difference between the receiving time and the emission time and the speed of the infrared light beam;

[0127] determining the individual shielding state of the earphone box according to the shielding state of each of the multiple infrared light beams.

[0128] Another embodiment of the application discloses the device 4. This embodiment is based on the above Figure 4On the basis of the corresponding embodiment, the plurality of infrared light beams respectively have different digital signal encodings and constitute a customized light beam group, and the separate shielding detection further includes:

[0129] The infrared receiving end in the earphone box is controlled to identify whether the plurality of infrared light beams reflected back by the shielding object are consistent with the customized light beam group according to the digital signal encoding, and if so, the step of determining the shielding state of the plurality of infrared light beams respectively is performed.

[0130] Another embodiment of the present application discloses device 4. This embodiment is based on the above-mentioned Figure 4 On the basis of the corresponding embodiment, the separate shielding state of the earphone box includes invalid shielding, valid shielding, and continuous movement of the shielding object, and the second control module 42 is used to:

[0131] If the shielding state of the plurality of light beams respectively is all no shielding object, it is determined that the separate shielding state of the earphone box is invalid shielding;

[0132] If the shielding state of the plurality of light beams respectively is all shielding object, it is determined that the separate shielding state of the earphone box is valid shielding;

[0133] If the shielding state of at least one light beam of the plurality of light beams is no shielding object and the shielding state of at least another light beam is shielding object, it is determined that the separate shielding state of the earphone box is continuous movement of the shielding object.

[0134] Another embodiment of the present application discloses device 4. This embodiment is based on the above-mentioned Figure 4 On the basis of the corresponding embodiment, the separate shielding detection includes:

[0135] The laser device in the earphone box is controlled to emit and receive a monochromatic laser beam;

[0136] The size relationship between an actual shielding distance obtained according to the monochromatic laser beam and a second effective shielding distance threshold value is used to determine the separate shielding state of the earphone box, wherein the actual shielding distance is determined based on the time of flight.

[0137] Another embodiment of the present application discloses device 4. This embodiment is based on the above-mentioned Figure 4 On the basis of the corresponding embodiment, the separate shielding detection includes:

[0138] The ultrasonic device in the earphone box is controlled to emit and receive an ultrasonic pulse;

[0139] The size relationship between an actual shielding distance obtained according to the ultrasonic pulse and a third effective shielding distance threshold value is used to determine the separate shielding state of the earphone box, wherein the actual shielding distance is determined based on the echo time difference of the ultrasonic pulse.

[0140] Another embodiment of the present application discloses an apparatus 4. This embodiment is based on the above-mentioned Figure 4 On the basis of the corresponding embodiment, the individual occlusion detection comprises:

[0141] controlling the millimeter wave radar in the earphone box to transmit and receive millimeter waves;

[0142] determining the individual occlusion state of the earphone box according to the size relationship between the actual occlusion distance obtained according to the millimeter wave measurement and the fourth effective occlusion distance threshold, the actual occlusion distance being determined based on the frequency change or time difference of the millimeter wave.

[0143] Another embodiment of the present application discloses an apparatus 4. This embodiment is based on the above-mentioned Figure 5 On the basis of the corresponding embodiment, the individual occlusion detection comprises:

[0144] controlling the optical sensor in the earphone box to obtain a plurality of images of the occlusion;

[0145] determining the individual occlusion state of the earphone box according to the image parallax of the plurality of images.

[0146] It should be noted that the information interaction, execution process and the like between the above-mentioned apparatuses / units are based on the same concept as the method embodiments of the present application, and the specific functions and technical effects brought by them can be referred to the method embodiments part, which will not be described here.

[0147] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be realized in the form of hardware or software function unit. In addition, the specific names of each functional unit and module are only for easy distinction, and do not limit the protection scope of the present application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the foregoing method embodiments, which will not be described here.

[0148] The present application also provides an earphone box, which comprises at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor implements the steps in any of the above method embodiments when executing the computer program.

[0149] The embodiments of the present application further provide an electronic device, which comprises at least one processor 50, a memory 51, and a computer program 52 stored in the memory 51 and executable on the at least one processor 50, wherein the processor 50 implements the steps in any of the above method embodiments when executing the computer program 52. ​ The embodiments of the present application further provide an electronic device, which comprises at least one processor 50, a memory 51, and a computer program 52 stored in the memory 51 and executable on the at least one processor 50, wherein the processor 50 implements the steps in any of the above method embodiments when executing the computer program 52.

[0150] The embodiments of the present application further provide a computer readable storage medium, which stores a computer program, wherein the computer program is executed by a processor to implement the steps in any of the above method embodiments.

[0151] The embodiments of the present application provide a computer program product, which, when executed on a mobile terminal, enables the mobile terminal to implement the steps in any of the above method embodiments.

[0152] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the present application implements all or part of the processes in the above embodiments, which can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer readable storage medium, and the computer program, when executed by a processor, can implement the steps in any of the above method embodiments. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms. The computer readable medium at least includes any entity or device capable of carrying the computer program code to the earphone box / electronic device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium. For example, U disk, mobile hard disk, magnetic disk or optical disk, etc. In some jurisdictions, according to legislation and patent practice, the computer readable medium cannot be an electrical carrier signal and a telecommunication signal.

[0153] In the above embodiments, the description of each embodiment has its own focus, and the parts not described or recorded in detail in a certain embodiment can be referred to the relevant description of other embodiments.

[0154] Those skilled in the art can understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0155] In the embodiments provided by the present application, it should be understood that the disclosed apparatus / equipment and method can be implemented in other ways. For example, the apparatus / equipment embodiments described above are merely schematic. The division of the modules or units is merely a logical function division. There can be another division manner in actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or in other forms.

[0156] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e. they can be located in one place, or distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.

[0157] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalent ones; and these modifications or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.

Claims

1. A headphone box control method based on occlusion state for performing operations, characterized in that, The method is applied to an earphone case, and the method includes: Multiple individual occlusion detections are performed at multiple times to determine whether there are obstructions near the headphone box, thereby obtaining multiple individual occlusion states of the headphone box at the multiple times. Each individual occlusion detection at one time yields an individual occlusion state, and the multiple individual occlusion states constitute an occlusion state change sequence that reflects the change of occlusion state. When the sequence of changes in the occlusion state matches the predetermined state sequence corresponding to the predetermined operation, the earphone box is controlled to perform the predetermined operation.

2. The method as described in claim 1, characterized in that, The individual occlusion detection includes: Control the infrared transmitter in the earphone box to emit multiple infrared beams; The infrared ranging module in the earphone box determines the blocking state of the multiple infrared beams based on the relationship between the actual blocking distance measured by the multiple infrared beams and the first effective blocking distance threshold. The actual blocking distance is determined based on the difference between the receiving time and the transmitting time, as well as the speed of the infrared beam. The individual blocking state of the headphone box is determined based on the blocking states of the multiple infrared beams.

3. The method as described in claim 2, characterized in that, The multiple infrared beams each have different digital signal codes and constitute a customized beam group, and the individual occlusion detection further includes: The infrared receiver in the headphone box is controlled to identify whether the multiple infrared beams reflected back by the obstructed object are consistent with the customized beam group according to the digital signal encoding. If they are consistent, the step of determining the obstruction state of the multiple infrared beams is performed.

4. The method as described in claim 2 or 3, characterized in that, The individual blocking states of the earphone case include invalid blocking, effective blocking, and continuous movement of the blocking object. Determining the individual blocking state of the earphone case based on the blocking states of the multiple infrared beams includes: If the blocking states of the multiple light beams are all unobstructed, the individual blocking state of the headphone box is determined to be invalid blocking; If the blocking states of the multiple light beams are all obstructed, then the individual blocking state of the headphone box is determined to be an effective blockage; If at least one of the multiple beams is in an unobstructed state and at least another beam is in an obstructed state, then the individual obstruction state of the headphone box is determined to be continuous movement of the obstruction.

5. The method as described in claim 1, characterized in that, The individual occlusion detection includes: Control the laser device in the headphone box to emit and receive monochromatic laser beams; The individual blocking state of the headphone box is determined based on the relationship between the actual blocking distance measured by the monochromatic laser beam and the second effective blocking distance threshold, wherein the actual blocking distance is determined based on the time of flight.

6. The method as described in claim 1, characterized in that, The individual occlusion detection includes: Control the ultrasonic device in the earphone box to emit and receive ultrasonic pulses. The individual blocking state of the headphone box is determined based on the relationship between the actual blocking distance obtained by the ultrasonic pulse measurement and the third effective blocking distance threshold, wherein the actual blocking distance is determined based on the echo time difference of the ultrasonic pulse.

7. The method as described in claim 1, characterized in that, The individual occlusion detection includes: Control the millimeter-wave radar in the earphone box to transmit and receive millimeter waves; The individual blocking state of the headphone box is determined based on the relationship between the actual blocking distance obtained from the millimeter wave measurement and the fourth effective blocking distance threshold. The actual blocking distance is determined based on the frequency change or time difference of the millimeter wave.

8. The method as described in claim 1, characterized in that, The individual occlusion detection includes: The optical sensor in the headphone case is controlled to obtain multiple images of the obstruction; Based on the image parallax of the multiple images, the individual occlusion state of the headphone box is determined.

9. A headphone case control device that performs operations based on an obstructed state, characterized in that, The device is used in an earphone case, and the device includes: The first detection module is used to perform multiple individual occlusion detections at multiple times to determine whether there is an obstruction near the headphone box, and obtain multiple individual occlusion states of the headphone box at the multiple times. Each individual occlusion detection at one time yields an individual occlusion state, and the multiple individual occlusion states constitute an occlusion state change sequence that reflects the change of occlusion state. The second control module is used to control the earphone box to perform the predetermined operation when the sequence of changes in the occlusion state matches the predetermined state sequence corresponding to the predetermined operation.

10. An earphone case, characterized in that, The device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the headphone case causes the headphone case to perform the method as described in any one of claims 1-8.