Earphone control method, device, earphone, and storage medium

By sampling voltage sequences from capacitors in TWS earphones and determining operating states with reference voltages, the method improves detection sensitivity and reduces hardware overhead for in-ear state and pressure input detection.

JP2024537512AActive Publication Date: 2024-10-10YICHIP MICROELECTRONICS (HANGZHOU) CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
JP2024525977
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-10-28
Filing Date
2022-10-25
Publication Date
2024-10-10
Estimated Expiration
2042-10-25

AI Technical Summary

Technical Problem

TWS earphones have low detection sensitivity to touch operations and are prone to false detections due to environmental changes and erroneous touches, requiring two separate detection paths for in-ear status and pressure input, leading to high hardware overhead.

Method used

Sequentially sample first and second voltage sequences from capacitors at different positions in the earphone based on a preset sampling period, determine operating states using reference voltages, and control the earphone to execute commands based on the detected states, reducing hardware overhead and improving detection sensitivity.

Benefits of technology

Enhances detection sensitivity to in-ear state and pressure input while minimizing hardware requirements by using a single detection path, reducing false detections and hardware costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024537512000001_ABST
    Figure 2024537512000001_ABST
Patent Text Reader

Abstract

The present application discloses an earphone control method, device, earphone, and storage medium, which include: sequentially collecting a first voltage sequence corresponding to a first capacitor in a target earphone and a second voltage sequence corresponding to a second capacitor in the target earphone based on a preset sampling period; determining a first operating state of the target earphone based on the first voltage sequence and a first reference voltage, determining an in-ear state of the target earphone based on the first operating state; determining a second operating state of the target earphone based on the second voltage sequence and the second reference voltage, determining a pressure sense input operation performed by a user on the target earphone based on the second operating state; and controlling the target earphone to execute a corresponding operation command according to the determined in-ear state and the pressure sense input operation.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This application claims priority to a Chinese patent application bearing application number 202111258842.3, filed with the China Patent Office on October 28, 2021, the entire contents of which are incorporated herein by reference.

[0002] The embodiments of the present application relate to the technical field of data processing, for example, to an earphone control method, device, earphone, and storage medium. [Background technology]

[0003] In recent years, true wireless stereo (TWS) earphones have been widely used, and when the TWS earphones are not in use or have been used, they are generally placed in a charging case to replenish the power of the TWS earphones. In the process of using the earphones by a user, the TWS earphones usually detect the ear-insertion state and the pressure sensory input that the user has performed on the earphones.

[0004] A TWS earphone usually detects the in-ear state and pressure input according to the user's touch on the earphone. The user's touch operation on the earphone will cause a change in the parasitic capacitance of the earphone, so the TWS earphone can detect the change in capacitance to realize the detection of the touch operation. When the user performs a touch operation on the earphone, the capacitance becomes larger and the charging speed of the capacitor becomes slower, so that the voltage value of the capacitor becomes smaller within the same charging time. Conversely, when the user performs a release operation on the earphone, the capacitance becomes smaller and the charging speed of the capacitor becomes faster, so that the voltage value of the capacitor becomes larger within the same charging time. The TWS earphone in the related art can determine whether the user performs a touch operation or a release operation on the earphone by sampling the voltage value of the capacitor through an analog-to-digital converter (ADC) and determining the voltage value.

[0005] However, in the related art, TWS earphones have low detection sensitivity for touch operations and are prone to false detection due to environmental changes such as temperature and humidity, as well as false touches. In addition, the TWS earphones in the related art require two different touch detection paths to respectively realize the functions of detecting the ear insertion state and detecting pressure input, resulting in large hardware overhead. Summary of the Invention [Problem to be solved by the invention]

[0006] The embodiments of the present application provide an earphone control method, device, earphone, and storage medium that can improve the earphone detection sensitivity for the ear insertion state and pressure sense input, and reduce hardware overhead in the earphone detection process. [Means for solving the problem]

[0007] The embodiment of the present application is Sequentially sampling a first voltage sequence corresponding to a first capacitor in a target earphone and a second voltage sequence corresponding to a second capacitor in the target earphone based on a preset sampling period, the first capacitor and the second capacitor being respectively disposed at different positions in the target earphone; Determine a first operating state of the target earphone based on the first voltage sequence and a first preset reference voltage, and determine an in-ear state of the target earphone based on the first operating state; Determine a second operating state of the target earphone based on the second voltage sequence and a second preset reference voltage, and determine a pressure sense input operation performed by a user on the target earphone based on the second operating state; and controlling the target earphone in response to the ear insertion state and the determination result of the pressure sense input operation so as to execute an operation command that matches the determination result. A method for controlling an earphone is provided.

[0008] The embodiment of the present application is A voltage sequence acquisition module configured to sequentially acquire a first voltage sequence corresponding to a first capacitor in a target earphone and a second voltage sequence corresponding to a second capacitor in the target earphone based on a preset sampling period, the first capacitor and the second capacitor being respectively disposed at different positions in the target earphone; an in-ear state determination module configured to determine a first operating state of the target earphone based on the first voltage sequence and a preset first reference voltage, and determine an in-ear state of the target earphone based on the first operating state; a pressure sense input determination module configured to determine a second operating state of the target earphone based on the second voltage sequence and a second preset reference voltage, and to determine a pressure sense input operation performed by a user on the target earphone based on the second operating state; and a command execution module configured to control the target earphone to execute an operation command corresponding to the determined result of the pressure sense input operation and the earphone insertion state. A control device for the earphone is also provided.

[0009] The embodiment of the present application is one or more processors; a storage device configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors further provide an earphone that executes the earphone control method according to any embodiment of the present application.

[0010] An embodiment of the present application further provides a computer-readable storage medium having stored thereon a computer program that, when executed by a processor, realizes the earphone control method according to any embodiment of the present application. [Brief description of the drawings]

[0011] [Figure 1a]4 is a flowchart of a control method for earphones according to the first embodiment of the present application. [Figure 1b] FIG. 2 is a schematic diagram of a time sequence of a voltage sequence collection process in Example 1 of the present application. [Diagram 2] 11 is a flowchart of a control method for earphones according to a second embodiment of the present application. [Figure 3a] 13 is a flowchart of a control method for earphones according to a third embodiment of the present application. [Figure 3b] FIG. 11 is a schematic diagram of a preset difference value interval in the third embodiment of the present application. [Figure 3c] FIG. 11 is a diagram of a scene in which the earphone control method according to the third embodiment of the present application is applied. [Figure 4] FIG. 11 is a structural diagram of a control device for an earphone according to a fourth embodiment of the present invention. [Diagram 5] FIG. 11 is a structural schematic diagram of an earphone according to a fifth embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0012] The present application will be described below with reference to the drawings and examples. It is understood that the specific examples described here are merely for the purpose of interpreting the present application and do not limit the present application. For convenience of explanation, the drawings show only parts related to the present invention, not all structures.

[0013] Example 1 FIG. 1a is a flowchart of a method for controlling an earphone according to a first embodiment of the present application, the method being applicable to controlling an operation mode of an earphone, the method being executable by a control device of the earphone, the device being implemented in software and / or hardware, and generally being integrated into a wireless earphone, the method for controlling the earphone includes the following steps:

[0014] In step 110, a first voltage sequence corresponding to a first capacitor in a target earphone and a second voltage sequence corresponding to a second capacitor are sequentially collected based on a preset sampling period, and the first capacitor and the second capacitor are respectively disposed at different positions in the target earphone.

[0015] In this step, the first capacitor may be a capacitor located inside the target earphone, and the second capacitor may be a capacitor located outside the target earphone. In this case, a first voltage sequence corresponding to the first capacitor and a second voltage sequence corresponding to the second capacitor can be sequentially collected according to a preset sampling period by using a time division multiplexing method. Each of the first voltage sequence and the second voltage sequence may include a plurality of voltage values.

[0016] 1b is a schematic diagram of a time sequence of a voltage sequence acquisition process according to Example 1 of the present application, and as shown in FIG. 1b, a plurality of first voltage sequences and a plurality of second voltage sequences can be acquired based on a preset sampling period. In one sampling period, a first voltage sequence that may include a plurality of voltage values ​​corresponding to a first capacitor can be acquired using a channel 1, and a second voltage sequence that may include a plurality of voltage values ​​corresponding to a second capacitor can be acquired using a channel 2.

[0017] In step 120, a first operating state of the target earphone is determined based on the first voltage sequence and a preset first reference voltage, and an in-ear state of the target earphone is determined based on the first operating state.

[0018] In this step, the first reference voltage may be a voltage preset value corresponding to a first capacitor, and is used to detect the in-ear state of the target earphone. Preferably, the voltage values ​​in a plurality of consecutive first voltage sequences are compared with a preset first reference voltage, and the first working state of the target earphone is determined according to the comparison result.

[0019] In one embodiment, the method can take an average value for a plurality of voltage values ​​included in each first voltage sequence to obtain a plurality of average values ​​corresponding to a plurality of first voltage sequences, calculate a difference value between the first reference voltage and each average value, and determine whether N consecutive difference values ​​are all greater than a preset touch threshold, and if N consecutive difference values ​​are all greater than the preset touch threshold, the first operating state of the target earphone can be determined to be a touch state, and if N consecutive difference values ​​have difference values ​​less than or equal to the preset touch threshold, the first operating state of the target earphone can be determined to be a non-touch state, where N can be a preset value greater than 1.

[0020] In this step, if the first operating state of the target earphone is a touch state, it can be determined that the in-ear state of the target earphone is a worn state; if the first operating state of the target earphone is a non-touch state, it can be determined that the in-ear state of the target earphone is a non-worn state.

[0021] In step 130, a second operating state of the target earphone is determined based on the second voltage sequence and a second preset reference voltage, and a pressure sense input operation performed by a user on the target earphone is determined based on the second operating state.

[0022] In this step, the second reference voltage may be a voltage preset value corresponding to a second capacitor, and is used to detect whether a user performs a pressure-sense input operation on the target earphone. Preferably, the voltage values ​​in a plurality of consecutive second voltage sequences can be compared with a preset second reference voltage, and a second working state of the target earphone can be determined according to the comparison result.

[0023] In one embodiment, an average value can be taken for a plurality of voltage values ​​included in each second voltage sequence to obtain a plurality of average values ​​corresponding to a plurality of second voltage sequences, a difference value between the second reference voltage and each average value can be calculated, and it can be determined whether N consecutive difference values ​​are all greater than a preset touch threshold, and if N consecutive difference values ​​are all greater than the preset touch threshold, the second operating state of the target earphone can be determined to be a touch state, and if N consecutive difference values ​​have difference values ​​less than or equal to the preset touch threshold, the second operating state of the target earphone can be determined to be a non-touch state, where N can be a preset value greater than 1.

[0024] In this step, if the second operating state of the target earphone is a touch state, it can be determined that the user has performed a pressure-sense input operation on the target earphone; if the first operating state of the target earphone is a non-touch state, it can be determined that the user has not performed a pressure-sense input operation on the target earphone.

[0025] In step 140, the target earphone is controlled according to the in-ear state and the determined result of the pressure-sense input operation to execute an operation command that matches the determined result.

[0026] In one embodiment, if the in-ear state of the target earphone is a worn state, execution of an on command of the target earphone can be controlled so that the target earphone starts playing audio specified by a user; if the in-ear state of the target earphone is a not worn state and the target earphone is playing audio, execution of a pause command of the target earphone can be controlled so that the target earphone stops playing the current audio.

[0027] In another embodiment, if it is detected that a user has performed a pressure sense input operation on the target earphone, the target earphone can be controlled to perform an operation command that matches the pressure sense input operation, such as a pause command, an off command, or a command to play the next audio.

[0028] In this embodiment, by sequentially collecting the first voltage sequence corresponding to the first capacitor and the second voltage sequence corresponding to the second capacitor using a time division multiplexing method, it is possible to realize the detection of the in-ear state and the detection of the pressure sense input using only one detection path, thereby reducing the hardware overhead in the detection process and saving the detection cost. Meanwhile, by periodically obtaining a plurality of first voltage sequences and a plurality of second voltage sequences, determining the in-ear state of the target earphone based on the plurality of first voltage sequences and the first reference voltages, and determining the pressure sense input operation performed by the user on the target earphone based on the plurality of second voltage sequences and the second reference voltages, it is possible to improve the detection sensitivity of the earphone and the accuracy of the detection result.

[0029] The technical aspects of the embodiments of the present application include: sequentially collecting a first voltage sequence corresponding to a first capacitor in the target earphone and a second voltage sequence corresponding to a second capacitor in the target earphone based on a preset sampling period; determining a first operating state of the target earphone based on the first voltage sequence and the first reference voltage; determining an in-ear state of the target earphone based on the first operating state; determining a second operating state of the target earphone based on the second voltage sequence and the second reference voltage; determining a pressure sense input operation performed by a user on the target earphone based on the second operating state; and controlling the target earphone to execute a corresponding operation command according to the determined in-ear state and pressure sense input operation, thereby improving the detection sensitivity of the earphone for the in-ear state and the pressure sense input and reducing the hardware overhead in the detection process of the earphone.

[0030] Example 2 This embodiment is a subdivision of the above-mentioned embodiment 1, and the interpretation of the same or corresponding terms in the above-mentioned embodiment will not be repeated in this embodiment. Figure 2 is a flow chart of an earphone control method according to embodiment 2 of the present application, in which the technical aspects of this embodiment can be combined with one or more methods in the above-mentioned embodiments. In this embodiment, as shown in Figure 2, the method according to the embodiment of the present application may further include the following:

[0031] In step 210, a first voltage sequence corresponding to a first capacitor in a target earphone and a second voltage sequence corresponding to a second capacitor are sequentially collected based on a preset sampling period, and the first capacitor and the second capacitor are respectively disposed at different positions in the target earphone.

[0032] In step 220, a smooth filtering process is performed on the first plurality of voltage sequences to obtain voltage filtering results.

[0033] In this embodiment, in order to improve the accuracy of the detection result of the earphone with respect to the in-ear state and the pressure sense input, a smoothing filtering process can be performed on the first voltage sequences, and a voltage filtering result can be obtained by taking an average value for the multiple voltage values ​​in the first voltage sequences.

[0034] In this embodiment, preferably, performing a smoothing filtering process on the multiple first voltage sequences to obtain a voltage filtering result includes removing a maximum voltage value and a minimum voltage value in each first voltage sequence, taking an average value for the remaining multiple voltage values ​​in each first voltage sequence to obtain multiple voltage average values ​​(each voltage average value corresponds to one first voltage sequence), and then taking an average value for the multiple voltage average values ​​to obtain the voltage filtering result.

[0035] In one embodiment of the present application, after performing a smoothing filtering process on the plurality of first voltage sequences and obtaining a voltage filtering result, the method further includes determining a current calibration parameter corresponding to the first capacitor based on the voltage filtering result and the first reference voltage, and calibrating a current current value corresponding to the first capacitor based on the current calibration parameter.

[0036] In this embodiment, in order to prevent the earphone from erroneously detecting due to environmental changes such as temperature and humidity, and erroneous touch, this embodiment proposes an embodiment for calibrating a current value corresponding to a first capacitor and a current value corresponding to a second capacitor, in which the corresponding calibration methods of the first capacitor and the second capacitor are the same, and this embodiment takes only the first capacitor as an example to describe the process of calibrating the current value of the first capacitor.

[0037] In this embodiment, determining a current calibration parameter corresponding to the first capacitor based on the voltage filtering result and the first reference voltage, and calibrating a current value corresponding to the first capacitor based on the current calibration parameter includes:

[0038] In step 200, a current calibration parameter corresponding to the first capacitor is determined based on the voltage filtering result and the first reference voltage.

[0039] In this step, the voltage filtering result is

number

number

number

number

number

number

[0040] In step 201, a current value corresponding to the first capacitor is calibrated according to the current calibration parameters and preset capacitance digital conversion parameters.

[0041] In this step, preferably, a current value corresponding to the first capacitor can be calibrated based on the current calibration parameters and a preset capacitance digital conversion parameter (Capacitance Digital Conversion, CDC) through a preset linear conversion algorithm.

[0042] In step 202, a current voltage filtering result obtained after the first capacitor current is calibrated is obtained, and a voltage difference value between the first reference voltage and the current voltage filtering result is calculated.

[0043] In this step, by performing the above steps 210 to 220, the current voltage filtering result obtained after the current of the first capacitor is calibrated is obtained, and the first reference voltage

number

number

number

[0044] In step 203, it is determined whether the absolute value of the voltage difference value is equal to or greater than a preset threshold value. If the absolute value of the voltage difference value is equal to or greater than the preset threshold value, step 204 is executed; if the absolute value of the voltage difference value is smaller than the preset threshold value, step 205 is executed.

[0045] In step 204, it is determined whether the current number of calibrations is equal to or less than the maximum number of calibrations. If the current number of calibrations is equal to or less than the maximum number of calibrations, step 206 is executed, and if the current number of calibrations is greater than the maximum number of calibrations, step 207 is executed.

[0046] In this embodiment, the current number of calibrations can be counted every time a calibration process for the current current value corresponding to the first capacitor is completed.

[0047] In step 205, the calibration process for the current current value corresponding to the first capacitor is stopped.

[0048] In step 206, adjust the capacitance-digital conversion parameters until the absolute value of the voltage difference value is smaller than a preset threshold value or the current calibration number is greater than a maximum calibration number, and return to performing the operation of determining a current calibration parameter corresponding to the first capacitor based on the voltage filtering result and the first reference voltage in step 200.

[0049] In this step, the first reference voltage

number

number

number

number

number

[0050] In this step, after adjusting the CDC, the process returns to step 200, and if the absolute value of the voltage difference value is smaller than a preset threshold value or the current calibration count is greater than a maximum calibration count, the calibration process for the current current value corresponding to the first capacitor is stopped.

[0051] In step 207, it is determined whether the current voltage filtering result is within a preset interval. If the current voltage filtering result is within the preset interval, step 208 is executed; if the current voltage filtering result is not within the preset interval, step 209 is executed.

[0052] In this embodiment, if the current calibration count is greater than the maximum calibration count, the current voltage filtering result

number

[0053] Step 208 determines that the calibration process is complete.

[0054] In step 209, a preset calibration incorrect flag is output, and a current current value corresponding to the first capacitor is calibrated using the initialized capacitance digital conversion parameters and the preset current calibration parameters.

[0055] In this step, the current voltage filtering result

number

[0056] In this way, by calibrating the current value corresponding to the first capacitor and the current value corresponding to the second capacitor, it is possible to prevent the earphone from making false detections due to environmental changes such as temperature and humidity, and false touches, and it is also possible to improve the detection sensitivity of the earphone to the ear insertion state and pressure input.

[0057] In step 230, a first operating state of the target earphone is determined based on the voltage filtering result and the first reference voltage.

[0058] In step 240, an in-ear state of the target earphone is determined based on the first operating state.

[0059] In step 250, a second operating state of the target earphone is determined based on the second voltage sequence and a second preset reference voltage, and a pressure sense input operation performed by a user on the target earphone is determined based on the second operating state.

[0060] In this step, the same method as in steps 220 to 230 is adopted to perform a smoothing filtering process on the plurality of second voltage sequences to obtain a voltage filtering result, and then a second working state of the target earphone can be determined according to the voltage filtering result and the second reference voltage.

[0061] In step 260, the target earphone is controlled according to the in-ear state and the determined result of the pressure-sense input operation to execute an operation command that matches the determined result.

[0062] The technical aspects of the embodiments of the present application include: sequentially collecting a first voltage sequence corresponding to a first capacitor in a target earphone and a second voltage sequence corresponding to a second capacitor in the target earphone based on a preset sampling period; performing a smoothing filtering process on a plurality of first voltage sequences to obtain a voltage filtering result; determining a first operating state of the target earphone based on the voltage filtering result and a first reference voltage; determining an in-ear state of the target earphone based on the first operating state; determining a second operating state of the target earphone based on a second voltage sequence and a second reference voltage; determining a pressure sense input operation performed by a user on the target earphone based on the second operating state; and controlling the target earphone to execute a corresponding operation command according to the determined in-ear state and pressure sense input operation, thereby improving the detection sensitivity of the earphone for the in-ear state and the pressure sense input and reducing the hardware overhead in the detection process of the earphone.

[0063] Example 3 This embodiment is a subdivision of the above-mentioned embodiment 1, and the interpretation of the same or corresponding terms in the above-mentioned embodiment will not be repeated in this embodiment. Figure 3a is a flow chart of an earphone control method according to embodiment 3 of the present application, in which the technical aspects of this embodiment can be combined with one or more methods in the above-mentioned embodiments. In this embodiment, as shown in Figure 3a, the method according to the embodiment of the present application may further include:

[0064] In step 301, a first voltage sequence corresponding to a first capacitor in a target earphone and a second voltage sequence corresponding to a second capacitor are sequentially collected based on a preset sampling period, and the first capacitor and the second capacitor are respectively disposed at different positions in the target earphone.

[0065] In step 302, a smooth filtering process is performed on a plurality of first voltage sequences to obtain voltage filtering results.

[0066] In step 303, it is determined whether a voltage difference value between the first reference voltage and the voltage filtering result is greater than a preset touch threshold. If the voltage difference value between the first reference voltage and the voltage filtering result is greater than the preset touch threshold, step 304 is executed; if the voltage difference value between the first reference voltage and the voltage filtering result is equal to or less than the preset touch threshold, step 305 is executed.

[0067] In step 304, it is determined that a touch event occurs on the target earphone.

[0068] In step 305, it is determined that no touch event has occurred on the target earphone.

[0069] In step 306, determine whether the duration of the touch event is greater than a preset time threshold. If the duration of the touch event is greater than the preset time threshold, execute step 307; if the duration of the touch event is equal to or less than the preset time threshold, execute step 308.

[0070] In step 307, it is determined that a first operating state of the target earphone is a non-touch state.

[0071] In this embodiment, if the duration of the touch event is greater than a preset time threshold, it can be determined that an erroneous touch may have occurred on the target earphone, and the first operating state of the target earphone can be determined to be a untouched state to avoid fraudulent detection results.

[0072] In step 308, collect statistics on the number of times that a touch event occurs in the target earphone within a set time period, and return to performing the operation of step 301 of sequentially collecting a first voltage sequence corresponding to a first capacitor in the target earphone and a second voltage sequence corresponding to a second capacitor in the target earphone according to a preset sampling period.

[0073] In this embodiment, each time it is detected that a touch event has occurred on the target earphone, the number of times that a touch event has occurred on the target earphone within a set time period is counted.

[0074] In step 309, it is determined whether the number of consecutive touch events occurring in the target earphone within the set time period is equal to a first threshold value. If the number of consecutive touch events occurring in the set time period is equal to the first threshold value, step 310 is executed; if the number of consecutive touch events occurring in the set time period is not equal to the first threshold value, step 311 is executed.

[0075] In step 310, it is determined that a first operating state of the target earphone is a touch state.

[0076] In step 311, determine whether the number of times that no touch events have occurred consecutively in the target earphone within the set time period is equal to a second threshold value; if the number of times that no touch events have occurred consecutively in the target earphone within the set time period is equal to the second threshold value, execute step 312; if the number of times that no touch events have occurred consecutively in the target earphone within the set time period is not equal to the second threshold value, return to executing the operation of sequentially collecting a first voltage sequence corresponding to a first capacitor and a second voltage sequence corresponding to a second capacitor in the target earphone based on a preset sampling period in step 301.

[0077] In step 312, it is determined that a first operating state of the target earphone is a non-touch state.

[0078] In step 313, an in-ear state of the target earphone is determined based on the first operating state.

[0079] In step 314, a second operating state of the target earphone is determined based on the second voltage sequence and a second preset reference voltage, and a pressure sense input operation performed by a user on the target earphone is determined based on the second operating state.

[0080] In this embodiment, the manner of determining the second working state of the target earphone is the same as the determining manner for the first working state, and this embodiment will not repeat the description thereof.

[0081] In step 315, the target earphone is controlled according to the in-ear state and the determination result of the pressure-sense input operation, so as to execute an operation command that matches the determination result.

[0082] In one embodiment of the present invention, the method further includes: updating the first reference voltage according to a voltage difference between the voltage filtering result and the first reference voltage; and updating the second reference voltage according to a voltage difference between the voltage filtering result corresponding to the second voltage sequence and the second reference voltage, where the updating manner of the first reference voltage is the same as that of the second reference voltage, and the present embodiment takes only the first reference voltage as an example to describe the updating manner.

[0083] The voltage filtering result

number

number

number

number

number

number

number

number

number

number

[0084] In this embodiment,

number

number

number

number

number

number

number

number

[0085] In this embodiment, if the duration of the touch event is greater than a preset time threshold, the first reference voltage may be forcibly updated.

[0086] In such cases,

number

number

number

[0087] In this embodiment, the first reference voltage and the second reference voltage are updated in real time, so that the detection sensitivity of the earphone and the accuracy of the detection result can be improved.

[0088] The technical aspects of the embodiment of the present application include: sequentially collecting a first voltage sequence corresponding to a first capacitor in a target earphone and a second voltage sequence corresponding to a second capacitor in the target earphone based on a preset sampling period; performing a smoothing filtering process on the plurality of first voltage sequences to obtain a voltage filtering result; determining whether a voltage difference value between a first reference voltage and the voltage filtering result is greater than a preset touch threshold; if the voltage difference value between the first reference voltage and the voltage filtering result is greater than the preset touch threshold, determining that a touch event has occurred in the target earphone; determining whether a duration of the touch event is greater than a preset time threshold; if the duration of the touch event is equal to or less than the preset time threshold, collecting statistics on the number of times that a touch event has occurred in the target earphone within a set time period; and detecting the first capacitor in the target earphone based on the preset sampling period. Returning to the execution of the operation of sequentially collecting the first voltage sequence corresponding to the capacitor and the second voltage sequence corresponding to the second capacitor, determining whether the number of consecutive touch events occurring in the target earphone within a set time period is equal to a first threshold value; if the number of consecutive touch events occurring in the set time period is equal to the first threshold value, determining a first operating state of the target earphone to be a touch state based on the first operating state; determining a second operating state of the target earphone based on the plurality of second voltage sequences and the second reference voltage; determining a pressure sense input operation performed by the user on the target earphone based on the second operating state; and controlling the target earphone to execute a corresponding operation command according to the determination result, the technical means can improve the detection sensitivity of the earphone for the in-ear state and the pressure sense input, and reduce the hardware overhead in the detection process of the earphone.

[0089] The embodiment of the present application may refer to the following embodiment. FIG. 3c is a scene diagram of the earphone control method in this embodiment. As shown in FIG. 3c, In this embodiment, the earphone insertion state and pressure sense input operation of the target earphone can be detected by the earphone insertion detection module and the pressure sense input detection module, respectively.

[0090] The ear-insertion detection module is configured to sample a first voltage sequence corresponding to a first capacitor from an analog circuit of a target earphone based on a preset sampling period, remove a maximum voltage value and a minimum voltage value in each first voltage sequence by a first-stage smoothing filtering module, and average a plurality of remaining voltage values ​​in each first voltage sequence to obtain a plurality of voltage average values, and then average a plurality of the voltage average values ​​by a second-stage smoothing filtering module to obtain a voltage filtering result.

[0091] The second-stage smoothing filtering module in the ear insertion detection module can transmit the voltage filtering result to the current calibration module and the reference tracking module, respectively. Wherein, the current calibration module is configured to determine a current calibration parameter corresponding to the first capacitor according to the voltage filtering result and a first reference voltage, and calibrate a current current value corresponding to the first capacitor according to the current calibration parameter. The calibration process can refer to steps 200 to 209. The reference tracking module is configured to update the first reference voltage according to a voltage difference value between the voltage filtering result and the first reference voltage. The touch judgment module is configured to determine a first working state of the target earphone according to the voltage filtering result and the first reference voltage, and the flow can refer to steps 303 to 312.

[0092] Similar to the above process, the pressure sense input detection module is configured to collect second voltage sequences corresponding to the second capacitors from the analog circuit of the target earphone based on a preset sampling period, remove the maximum voltage value and the minimum voltage value in each second voltage sequence through a first-stage smoothing filtering module, and average the remaining voltage values ​​in each second voltage sequence to obtain a plurality of voltage average values, and then average the plurality of voltage average values ​​through a second-stage smoothing filtering module to obtain a voltage filtering result.

[0093] The second-stage smoothing filtering module in the pressure input detection module can transmit the voltage filtering result to a current calibration module and a reference tracking module, respectively. The current calibration module is configured to determine a current calibration parameter corresponding to the second capacitor according to the voltage filtering result and a second reference voltage, and calibrate a current current value corresponding to the second capacitor according to the current calibration parameter. The calibration process can refer to steps 200 to 209. The reference tracking module is configured to update the second reference voltage according to a voltage difference value between the voltage filtering result and the second reference voltage. The comparison module is the same as the touch judgment module, and is configured to determine a second operating state of the target earphone according to the voltage filtering result and the second reference voltage, and the flow can refer to steps 303 to 312.

[0094] The method according to the embodiment of the present application can realize ear insertion detection and pressure input detection using only one detection path, thereby reducing the hardware overhead in the detection process, saving detection costs, and improving the detection sensitivity of the earphone and the accuracy of the detection results.

[0095] Example 4 FIG. 4 is a structural diagram of an earphone control device according to the fourth embodiment of the present application. The device includes a voltage sequence acquisition module 410, an ear insertion state determination module 420, a pressure sense input determination module 430 and an instruction execution module 440.

[0096] The voltage sequence acquisition module 410 is configured to sequentially acquire a first voltage sequence corresponding to a first capacitor in the target earphone and a second voltage sequence corresponding to a second capacitor in the target earphone based on a preset sampling period, the first capacitor and the second capacitor being respectively disposed at different positions in the target earphone; the in-ear state determination module 420 is configured to determine a first operating state of the target earphone based on the first voltage sequence and a preset first reference voltage, and determine an in-ear state of the target earphone based on the first operating state; the pressure sense input determination module 430 is configured to determine a second operating state of the target earphone based on the second voltage sequence and a preset second reference voltage, and determine a pressure sense input operation performed by a user on the target earphone based on the second operating state; and the command execution module 440 is configured to control the target earphone to execute an operation command corresponding to the determination result according to the in-ear state and the determination result of the pressure sense input operation.

[0097] The technical aspects of the embodiments of the present application include: sequentially collecting a first voltage sequence corresponding to a first capacitor in the target earphone and a second voltage sequence corresponding to a second capacitor in the target earphone based on a preset sampling period; determining a first operating state of the target earphone based on the first voltage sequence and the first reference voltage; determining an in-ear state of the target earphone based on the first operating state; determining a second operating state of the target earphone based on the second voltage sequence and the second reference voltage; determining a pressure sense input operation performed by a user on the target earphone based on the second operating state; and controlling the target earphone to execute a corresponding operation command according to the determined in-ear state and pressure sense input operation, thereby improving the detection sensitivity of the earphone for the in-ear state and the pressure sense input and reducing the hardware overhead in the detection process of the earphone.

[0098] In accordance with the above embodiment, the preset sampling period includes a plurality of sampling periods, and a plurality of first voltage sequences corresponding to the first capacitor and a plurality of second voltage sequences corresponding to the second capacitor are sampled within the plurality of sampling periods.

[0099] The ear-wearing state determination module 420 includes a filtering unit configured to perform a smoothing filtering process on the plurality of first voltage sequences to obtain a voltage filtering result; a first state determination unit configured to determine a first operating state of the target earphone based on the voltage filtering result and the first reference voltage; a voltage removing unit configured to remove a maximum voltage value and a minimum voltage value in each first voltage sequence and obtain a plurality of voltage average values ​​by averaging the remaining plurality of voltage values ​​in each first voltage sequence; an averaging unit configured to obtain the voltage filtering result by averaging the plurality of voltage average values; a current calibration unit configured to determine a current calibration parameter corresponding to the first capacitor based on the voltage filtering result and the first reference voltage and calibrate a current value corresponding to the first capacitor based on the current calibration parameter; and a calibration parameter determination unit configured to determine a current calibration parameter corresponding to the first capacitor based on the voltage filtering result and the first reference voltage. a current current calibration unit configured to calibrate a current current value corresponding to the first capacitor based on the current calibration parameters and a preset capacitance-digital conversion parameter; a voltage difference value calculation unit configured to obtain a current voltage filtering result obtained after the current of the first capacitor is calibrated, and calculate a voltage difference value between the first reference voltage and the current voltage filtering result; a difference value determination unit configured to determine whether an absolute value of the voltage difference value is equal to or greater than a preset threshold; a calibration count determination unit configured to determine whether a current calibration count is equal to or less than a maximum calibration count if the absolute value of the voltage difference value is equal to or greater than the preset threshold; and a parameter adjustment unit configured to adjust the capacitance-digital conversion parameter until the absolute value of the voltage difference value is smaller than the preset threshold or the current calibration count is greater than the maximum calibration count if the current calibration count is equal to or less than the maximum calibration count, and to return to performing an operation of determining a current calibration parameter corresponding to the first capacitor based on the voltage filtering result and the first reference voltage.The earphone may further include a touch threshold determination unit configured to determine whether a voltage difference value between the first reference voltage and the voltage filtering result is greater than a preset touch threshold; a number statistics unit configured to determine that a touch event has occurred in the target earphone when the voltage difference value between the first reference voltage and the voltage filtering result is greater than the preset touch threshold, to count the number of times that touch events have occurred in the target earphone within a set time period, and to return to performing an operation of sequentially collecting a first voltage sequence corresponding to a first capacitor and a second voltage sequence corresponding to a second capacitor in the target earphone based on a preset sampling period; a touch event determination unit configured to determine whether the number of times that touch events have consecutively occurred in the target earphone within the set time period is equal to a first threshold; and a touch state determination unit configured to determine that a first operating state of the target earphone is a touch state when the number of times that touch events have consecutively occurred in the target earphone within the set time period is equal to the first threshold.

[0100] Preferably, the earphone control device comprises: The power supply may further comprise a reference voltage update module configured to update the first reference voltage based on a voltage difference value between the voltage filtering result and the first reference voltage.

[0101] The earphone control device according to the embodiments of the present application can execute the earphone control method according to any embodiment of the present application, and has functional modules and effects corresponding to the execution of the method.

[0102] Example 5 5 is a structural schematic diagram of an earphone according to a fifth embodiment of the present application, as shown in FIG. 5, the earphone includes a processor 510, a memory 520, an input device 530 and an output device 540, the number of processors 510 in the earphone can be one or more, and in FIG. 5, one processor 510 is taken as an example, and the processor 510, memory 520, input device 530 and output device 540 in the earphone can be connected by a bus or other methods, and in FIG. 5, they are connected by a bus as an example. The memory 520 can be configured as a computer-readable storage medium to store software programs, computer-executable programs and modules, such as program instructions / modules corresponding to the earphone control method in any embodiment of the present application (e.g., the voltage sequence acquisition module 410, the ear insertion state determination module 420, the pressure sense input determination module 430 and the instruction execution module 440 in the earphone control device). The processor 510 runs the software programs, instructions, and modules stored in the memory 520 to execute various functional applications and data processing of the earphone, thereby implementing the above-described earphone control method. That is, when the program is executed by the processor, it realizes a method of sequentially sampling a first voltage sequence corresponding to a first capacitor and a second voltage sequence corresponding to a second capacitor in the target earphone based on a preset sampling period, the first capacitor and the second capacitor are respectively provided at different positions in the target earphone, determining a first operating state of the target earphone based on the first voltage sequence and a preset first reference voltage, determining an in-ear state of the target earphone based on the first operating state, determining a second operating state of the target earphone based on the second voltage sequence and the preset second reference voltage, determining a pressure sense input operation performed by a user on the target earphone based on the second operating state, and controlling the target earphone to execute an operation command corresponding to the determination result according to the in-ear state and the determination result of the pressure sense input operation.

[0103] The memory 520 may mainly include a program storage area and a data storage area, in which the program storage area can store an operating system and applications required for at least one function, and the data storage area can store data generated based on the use of the terminal. The memory 520 may also include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk memory device, flash memory, or other non-volatile solid-state memory device. In some implementations, the memory 520 may include memories that are remotely provided with respect to the processor 510, and these remote memories can be connected to the earphones via a network. Examples of the network include, but are not limited to, the Internet, an in-house network, a local area network, a mobile communication network, and a combination of the Internet, the in-house network, the local area network, and the mobile communication network. The input device 530 may be configured to receive input numeric or character information and generate key signal inputs related to user settings and function control of the earphones, and may include a keyboard, a mouse, and the like. The output device 540 may include a display device, such as a display.

[0104] Example 6 A sixth embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, realizes the method according to any of the embodiments of the present application. Of course, the computer-readable storage medium according to the embodiment of the present application can execute the relevant operations of the earphone control method according to any of the embodiments of the present application. That is, when the program is executed by a processor, the method is realized in which a first voltage sequence corresponding to a first capacitor in a target earphone and a second voltage sequence corresponding to a second capacitor are sequentially collected based on a preset sampling period, the first capacitor and the second capacitor are respectively provided at different positions in the target earphone, a first operating state of the target earphone is determined based on the first voltage sequence and a preset first reference voltage, an in-ear state of the target earphone is determined based on the first operating state, a second operating state of the target earphone is determined based on the second voltage sequence and a preset second reference voltage, a pressure sense input operation performed by a user on the target earphone is determined based on the second operating state, and the target earphone is controlled to execute an operation command corresponding to the determined result according to the in-ear state and the determined result of the pressure sense input operation.

[0105] From the description of the above embodiments, those skilled in the art can understand that the present application can be realized through software and general-purpose hardware, and of course, can also be realized by hardware. Based on such understanding, the technical aspects of the present application can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a computer flexible disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (FLASH), a hard disk or an optical disk, and includes several instructions for making one earphone execute the methods described in several embodiments of the present application.

[0106] In addition, in the embodiment of the earphone control device described above, the multiple units and modules provided are merely divided according to functional logic, but are not limited to the above division, as long as they can realize the corresponding functions, and it should be noted that the specific names of the multiple functional units are merely intended to make it easier to distinguish them from each other, and are not intended to limit the scope of protection of the present application.

Claims

1. Sequentially sampling a first voltage sequence corresponding to a first capacitor in a target earphone and a second voltage sequence corresponding to a second capacitor in the target earphone based on a preset sampling period, the first capacitor and the second capacitor being respectively disposed at different positions in the target earphone; Determine a first operating state of the target earphone based on the first voltage sequence and a preset first reference voltage, and determine an in-ear state of the target earphone based on the first operating state; determining a second operating state of the target earphone based on the second voltage sequence and a second preset reference voltage, and determining a pressure-sense input operation performed by a user on the target earphone based on the second operating state; and controlling the target earphone in response to the ear insertion state and the determination result of the pressure sense input operation so as to execute an operation command that matches the determination result. How to control your earphones.

2. the preset sampling period includes a plurality of sampling periods, and a plurality of first voltage sequences corresponding to the first capacitor and a plurality of second voltage sequences corresponding to the second capacitor are sampled within the plurality of sampling periods; determining a first operating state of the target earphone based on the first voltage sequence and a first preset reference voltage; performing a smoothing filtering process on the plurality of first voltage sequences to obtain a voltage filtering result; determining a first operating state of the target earphone based on the voltage filtering result and the first reference voltage; The method of claim 1.

3. performing a smoothing filtering process on the plurality of first voltage sequences to obtain a voltage filtering result, removing a maximum voltage value and a minimum voltage value in each first voltage sequence and averaging a plurality of remaining voltage values ​​in each first voltage sequence to obtain a plurality of voltage averages; taking an average value for the plurality of voltage average values ​​to obtain the voltage filtering result. The method of claim 2.

4. After performing a smoothing filtering process on the plurality of first voltage sequences to obtain a voltage filtering result, determining a current calibration parameter corresponding to the first capacitor based on the voltage filtering result and the first reference voltage; and calibrating a current value corresponding to the first capacitor based on the current calibration parameter. The method of claim 2.

5. determining a current calibration parameter corresponding to the first capacitor based on the voltage filtering result and the first reference voltage; and calibrating a current value corresponding to the first capacitor based on the current calibration parameter; determining a current calibration parameter corresponding to the first capacitor based on the voltage filtering result and the first reference voltage; calibrating a current value corresponding to the first capacitor based on the current calibration parameter and a preset capacitance digital conversion parameter; Obtaining a current voltage filtering result obtained after calibrating the current of the first capacitor, and calculating a voltage difference value between the first reference voltage and the current voltage filtering result; determining whether an absolute value of the voltage difference value is equal to or greater than a preset threshold value; determining whether a current number of calibrations is equal to or smaller than a maximum number of calibrations in response to a determination result that the absolute value of the voltage difference value is equal to or larger than a preset threshold value; in response to a determination result that the current calibration number is equal to or smaller than a maximum calibration number, adjusting the capacitance-digital conversion parameter until an absolute value of the voltage difference value is smaller than a preset threshold value or the current calibration number is greater than a maximum calibration number, and returning to perform an operation of determining a current calibration parameter corresponding to the first capacitor based on the voltage filtering result and the first reference voltage. The method according to claim 4.

6. determining a first operating state of the target earphone based on the voltage filtering result and the first reference voltage; determining whether a voltage difference value between the first reference voltage and the voltage filtering result is greater than a preset touch threshold; in response to a determination result that the voltage difference value between the first reference voltage and the voltage filtering result is greater than a preset touch threshold, determine that a touch event has occurred in the target earphone, collect statistics on the number of times that touch events have occurred in the target earphone within a preset time period, and return to performing the operation of sequentially collecting a first voltage sequence corresponding to a first capacitor and a second voltage sequence corresponding to a second capacitor in the target earphone according to a preset sampling period; Determining whether the number of consecutive touch events occurring on the target earphone within the set time period is equal to a first threshold value; In response to a determination result that the number of consecutive touch events occurring within the set time period is equal to a first threshold, determining that the first operating state of the target earphone is a touch state. The method of claim 2.

7. updating the first reference voltage based on a voltage difference value between the voltage filtering result and the first reference voltage. The method of claim 2.

8. A voltage sequence acquisition module is configured to sequentially acquire a first voltage sequence corresponding to a first capacitor in a target earphone and a second voltage sequence corresponding to a second capacitor in the target earphone based on a preset sampling period, the first capacitor and the second capacitor being respectively disposed at different positions in the target earphone; an in-ear state determination module configured to determine a first operating state of the target earphone based on the first voltage sequence and a preset first reference voltage, and to determine an in-ear state of the target earphone based on the first operating state; a pressure-sense input determination module configured to determine a second operating state of the target earphone based on the second voltage sequence and a second preset reference voltage, and to determine a pressure-sense input operation performed by a user on the target earphone based on the second operating state; and a command execution module configured to control the target earphone to execute an operation command corresponding to the determined result of the pressure sense input operation and the earphone insertion state. Earphone control device.

9. At least one processor; a storage device configured to store at least one program; When the at least one program is executed by the at least one processor, the at least one processor realizes the method for controlling earphones according to any one of claims 1 to 7. Earphones.

10. A computer program is stored which, when executed by a processor, realizes the earphone control method according to any one of claims 1 to 7. A computer-readable storage medium.

Citation Information

Patent Citations

  • Detection method, device and equipment for power grid voltage frequency

    CN108627694A

  • Earphone and earphone sound effect adjusting method

    CN112437375A

  • Wearing and touch detection circuit and earphone

    CN209017261U

  • Headset and headset power management

    JP2007104670A

  • Sound output control device, sound reproducing device, and sound output control method

    JP2009152666A