Earphone control method, device, earphone, and storage medium
By sequentially sampling voltage sequences from capacitors in TWS earphones and determining states based on reference voltages, the method enhances detection sensitivity and reduces hardware requirements for ear insertion and pressure input.
Patent Information
- Application Number
- JP2024525977
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-10-28
- Filing Date
- 2022-10-25
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2042-10-25
AI Technical Summary
TWS earphones have low detection sensitivity for touch operations due to environmental changes and require two separate detection paths, leading to false detections and high hardware overhead.
Sequentially sample voltage sequences from capacitors at different positions in the earphone using a time division multiplexing method, determine ear insertion state and pressure input based on reference voltages, and control the earphone accordingly to execute matching operations.
Improves detection sensitivity and accuracy for ear insertion and pressure input while reducing hardware overhead by using a single detection path.
Smart Images

Figure 0007729989000038 
Figure 0007729989000039 
Figure 0007729989000040
Abstract
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 a control method and device for earphones, earphones, and storage media. [Background technology]
[0003] In recent years, true wireless stereo (TWS) earphones have been widely used. When not in use or after use, TWS earphones are generally placed in an earphone charging case to replenish the power of the TWS earphones. During the process of using the earphones, the TWS earphones usually detect the state of ear insertion and the pressure sensory inputs made by the user to the earphones.
[0004] TWS earphones typically detect the earbud insertion state and pressure input according to the user's touch on the earphone. Because a user's touch on the earphone causes a change in the earphone's parasitic capacitance, TWS earphones can detect touch operations by detecting the change in capacitance. When a user touches the earphone, the capacitance increases and the capacitor charging speed slows, resulting in a smaller capacitor voltage value within the same charging time. Conversely, when a user releases the earphone, the capacitance decreases and the capacitor charging speed increases, resulting in a larger capacitor voltage value within the same charging time. TWS earphones in the related art use an analog-to-digital converter (ADC) to sample the capacitor voltage value and determine whether the user has touched or released the earphone by detecting the voltage value.
[0005] However, in the related art, TWS earphones have low detection sensitivity for touch operations, making them prone to false detection due to environmental changes such as temperature and humidity, as well as accidental touches. In addition, TWS earphones in the related art require two different touch detection paths to respectively detect the earbud placement and 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's detection sensitivity with respect to the ear insertion state and pressure input, and reduce hardware overhead in the earphone detection process. [Means for solving the problem]
[0007] The present application is directed to 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 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; 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 controlling the target earphone in accordance with the earphone 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 earphones is provided.
[0008] The present application is directed to a voltage sequence acquisition module configured to sequentially acquire 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 being respectively disposed at different positions in the target earphone; an ear-fitting 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 ear-fitting 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 preset second reference voltage, and to determine a pressure sense input operation performed by a user on the target earphone based on the second operating state; a command execution module configured to control the target earphone to execute an operation command that matches the determined result, in response to the ear insertion state and the determined result of the pressure sense input operation; A control device for the earphone is also provided.
[0009] The present application is directed to one or more processors; a storage device configured to store one or more programs; The present invention further provides an earphone that, when the one or more programs are executed by the one or more processors, 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 storing a computer program that, when executed by a processor, realizes the earphone control method according to any embodiment of the present application. [Brief explanation of the drawings]
[0011] [Figure 1a]1 is a flowchart of a method for controlling earphones according to a first embodiment of the present invention. [Figure 1b] FIG. 2 is a schematic diagram of a time sequence of a voltage sequence acquisition process in Example 1 of the present application. [Figure 2] 10 is a flowchart of a method for controlling earphones according to a second embodiment of the present invention. [Figure 3a] 10 is a flowchart of a method for controlling earphones according to a third embodiment of the present invention. [Figure 3b] FIG. 10 is a schematic diagram of a predetermined difference value interval in Example 3 of the present application. [Figure 3c] FIG. 10 is a diagram illustrating a scene in which the earphone control method according to the third embodiment of the present invention is applied. [Figure 4] FIG. 10 is a structural diagram of a control device of an earphone according to a fourth embodiment of the present invention. [Figure 5] FIG. 10 is a structural schematic diagram of an earphone according to a fifth embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0012] The present application will be described below with reference to the drawings and examples. It will be understood that the specific examples described here are merely for the purpose of interpreting the present application and are not intended to limit the present application. For the sake of convenience, the drawings show only parts relevant to the present invention, rather than all of the 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. This embodiment is applicable to controlling the operation of an earphone. The method can be executed by a control device of the earphone, which can be implemented in software and / or hardware and can generally be 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 and a second voltage sequence corresponding to a second capacitor in the target earphone are sequentially sampled based on a preset sampling period, and the first capacitor and the second capacitor are respectively located 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. A first voltage sequence corresponding to the first capacitor and a second voltage sequence corresponding to the second capacitor may be sequentially sampled according to a preset sampling period 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 time sequence diagram 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, channel 1 can be used to acquire a first voltage sequence that may include a plurality of voltage values corresponding to a first capacitor, and channel 2 can be used to acquire a second voltage sequence that may include a plurality of voltage values corresponding to a second capacitor.
[0017] In step 120, a first working 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 working state.
[0018] In this step, the first reference voltage may be a preset voltage value corresponding to the 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 the preset first reference voltage, and the first working state of the target earphone is determined according to the comparison result.
[0019] In one embodiment, a plurality of voltage values included in each first voltage sequence are averaged to obtain a plurality of average values corresponding to the plurality of first voltage sequences, and a difference value between each of the first reference voltages and each average value is calculated. It is then determined whether N consecutive difference values are all greater than a preset touch threshold. If the N consecutive difference values are all greater than the preset touch threshold, it is determined that the first operating state of the target earphone is a touch state; if the N consecutive difference values are less than or equal to the preset touch threshold, it is determined that the first operating state of the target earphone is a untouched state. N may 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 wearing 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-wearing state.
[0021] In step 130, a second operating state of the target earphone is determined based on the second voltage sequence and a preset second 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 preset voltage 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 the second working state of the target earphone can be determined according to the comparison result.
[0023] In one embodiment, a plurality of voltage values included in each second voltage sequence are averaged to obtain a plurality of average values corresponding to the plurality of second voltage sequences, and a difference value between each average value and the second reference voltage is calculated. It is then determined whether N consecutive difference values are all greater than a preset touch threshold. If the N consecutive difference values are all greater than the preset touch threshold, it is determined that the second operating state of the target earphone is a touch state; if the N consecutive difference values are less than the preset touch threshold, it is determined that the second operating state of the target earphone is a untouched state. N may 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 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.
[0026] In one embodiment, if the in-ear state of the target earphone is a worn state, the 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 dismounted state and the target earphone is playing audio, the 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 input operation on the target earphone, the target earphone can be controlled to perform an operation command that matches the pressure 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 detect the earphone insertion state and the pressure input using only one detection path, thereby reducing the hardware overhead in the detection process and saving detection costs. Meanwhile, by periodically obtaining a plurality of first voltage sequences and a plurality of second voltage sequences, determining the earphone insertion state of the target earphone based on the plurality of first voltage sequences and the first reference voltage, and determining the pressure input operation performed by the user on the target earphone based on the plurality of second voltage sequences and the second reference voltage, it is possible to improve the detection sensitivity of the earphone and the accuracy of the detection results.
[0029] A technical aspect of an embodiment of the present application is to sequentially collect 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, determine a first operating state of the target earphone based on the first voltage sequence and a first reference voltage, determine the 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 reference voltage, determine a pressure-sense input operation performed by the user on the target earphone based on the second operating state, and control the target earphone to execute a corresponding operation command according to the determined in-ear state and pressure-sense input operation. Through these technical measures, it is possible to improve the earphone's detection sensitivity for the in-ear state and the pressure-sense input and reduce the hardware overhead in the earphone detection process.
[0030] Example 2 This embodiment is a subdivision of the above-mentioned embodiment 1, and the interpretation of the same or corresponding terms as those in the above-mentioned embodiment will not be repeated in this embodiment. Figure 2 is a flowchart of an earphone control method according to embodiment 2 of the present application, and in this embodiment, the technical aspects of this embodiment can be combined with one or more methods in the aspects of the above-mentioned embodiment. In this embodiment, as shown in Figure 2, the method according to the embodiment of the present application may further include:
[0031] In step 210, a first voltage sequence corresponding to a first capacitor and a second voltage sequence corresponding to a second capacitor in the target earphone are sequentially sampled based on a preset sampling period, where the first capacitor and the second capacitor are respectively located at different positions in the target earphone.
[0032] In step 220, a smoothing filtering process is performed on the plurality of first voltage sequences to obtain voltage filtering results.
[0033] In this embodiment, in order to improve the accuracy of the earphone detection results for the ear placement state and pressure input, a smoothing filtering process can be performed on the multiple first voltage sequences, and the voltage filtering result can be obtained by averaging the multiple voltage values in the multiple first voltage sequences.
[0034] In this embodiment, preferably, performing a smoothing filtering process on a plurality of 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 plurality of voltage values in each first voltage sequence to obtain a plurality of voltage average values (each voltage average value corresponds to one first voltage sequence), and then taking an average value for the plurality of 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 making an erroneous detection due to environmental changes such as temperature and humidity, or due to an erroneous touch, this embodiment proposes an embodiment for calibrating the current value corresponding to the first capacitor and the current value corresponding to the second capacitor, where the calibration methods corresponding to the first capacitor and the second capacitor are the same, and this embodiment only takes 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 preset linear conversion algorithm can be used to calibrate the current value corresponding to the first capacitor based on the current calibration parameters and preset capacitance digital conversion parameters (CDC).
[0042] In step 202, the current voltage filtering result obtained after the first capacitor current calibration 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 calibration of the current of the first capacitor 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; 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 the maximum calibration number, and return to performing the operation of determining the current calibration parameters 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 the preset threshold value or the current calibration count is greater than the 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 is
number
[0053] Step 208 confirms that the calibration process is complete.
[0054] In step 209, a preset calibration incorrect flag is output, and the 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] 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, or due to accidental touches, and it is also possible to improve the earphone's detection sensitivity to the ear insertion state and pressure input.
[0057] In step 230, a first working 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 preset second 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 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.
[0062] A technical aspect of an embodiment of the present application is to sequentially collect 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, perform a smoothing filtering process on the multiple first voltage sequences to obtain a voltage filtering result, determine a first operating state of the target earphone based on the voltage filtering result and a first reference voltage, determine the 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 the second reference voltage, determine a pressure-sense input operation performed by the user on the target earphone based on the second operating state, and control the target earphone to execute a corresponding operation command according to the determined in-ear state and pressure-sense input operation. Through these technical means, it is possible to improve the earphone's detection sensitivity for the in-ear state and the pressure-sense input and reduce the hardware overhead in the earphone detection process.
[0063] Example 3 This embodiment is a subdivision of the above-mentioned embodiment 1, and the interpretation of the same or corresponding terms as those in the above-mentioned embodiment will not be repeated in this embodiment. Figure 3a is a flowchart of a method for controlling earphones according to embodiment 3 of the present application, and in this embodiment, the technical aspects of this embodiment can be combined with one or more methods in the aspects of the above-mentioned embodiment. 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 and a second voltage sequence corresponding to a second capacitor in a target earphone are sequentially sampled based on a preset sampling period, and the first capacitor and the second capacitor are respectively located at different positions in the target earphone.
[0065] In step 302, a smoothing filtering process is performed on the plurality of first voltage sequences to obtain voltage filtering results.
[0066] In step 303, it is determined whether the 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, it is determined 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, step 307 is executed; if the duration of the touch event is equal to or less than the preset time threshold, step 308 is executed.
[0070] In step 307, determine that the first working 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 any fraudulent detection results.
[0072] In step 308, the number of times that a touch event occurs in the target earphone within the set time period is counted, and the process returns to step 301, where the process sequentially collects a first voltage sequence corresponding to the first capacitor and a second voltage sequence corresponding to the second capacitor in the target earphone according to the 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, determine that the 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. 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, 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, return to executing the operation of step 301, which sequentially collects 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.
[0077] In step 312, determine that the first operating state of the target earphone is a untouched 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 preset second 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 method for determining the second working state of the target earphone is the same as the method for determining 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 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.
[0082] In one embodiment of the present invention, the method further includes updating the first reference voltage based on a voltage difference between the voltage filtering result and the first reference voltage, and updating the second reference voltage based on 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 this embodiment only takes 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 example,
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, thereby improving the detection sensitivity of the earphone and the accuracy of the detection result.
[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 smoothing filtering on the plurality of first voltage sequences to obtain voltage filtering results; 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 touch events occurring 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, determine 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, determine the first operating state of the target earphone to be a touch state; determine the in-ear state of the target earphone based on the first operating state; determine the second operating state of the target earphone based on the plurality of second voltage sequences and the second reference voltage; determine the pressure sense input operation performed by the user on the target earphone based on the second operating state; and control the target earphone to execute a corresponding operation command according to the determination result. By using these technical means, the earphone's detection sensitivity for the in-ear state and the pressure sense input can be improved and the hardware overhead in the earphone detection process can be reduced.
[0089] The examples of the present application may refer to the following embodiments. FIG. 3c is a diagram of a scene in which the earphone control method of this embodiment is applied. 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 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 first voltage sequence using a first-stage smoothing filtering module, and average the remaining voltage values in each first voltage sequence to obtain a plurality of voltage average values, and then average the plurality of voltage average values using 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. The current calibration module is configured to determine a current calibration parameter corresponding to the first capacitor based on the voltage filtering result and a first reference voltage, and calibrate a current value corresponding to the first capacitor based on 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 based on a voltage difference between the voltage filtering result and the first reference voltage. The touch determination module is configured to determine a first operating state of the target earphone based on the voltage filtering result and the first reference voltage. The flow can refer to steps 303 to 312.
[0092] Similar to the above process, the pressure sense input detection module is configured to sample second voltage sequences corresponding to the second capacitor from the analog circuit of the target earphone based on a preset sampling period, remove the maximum and minimum voltage values in each second voltage sequence using a first-stage smoothing filtering module, and average the remaining voltage values in each second voltage sequence to obtain multiple voltage average values, and then average the multiple voltage average values using 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 based on the voltage filtering result and a second reference voltage, and calibrate a current value corresponding to the second capacitor based on 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 based on a voltage difference between the voltage filtering result and the second reference voltage. The comparison module is the same as the touch determination module and is configured to determine a second operating state of the target earphone based on the voltage filtering result and the second reference voltage. The flow can refer to steps 303 to 312.
[0094] The method according to the embodiment of the present application can realize earphone detection and pressure input detection with only one detection path, which reduces the hardware overhead in the detection process, saves detection costs, and improves the detection sensitivity and accuracy of the earphone detection results.
[0095] Example 4 FIG. 4 is a structural diagram of an earphone control device according to a fourth embodiment of the present invention, which includes a voltage sequence acquisition module 410, an ear insertion state determination module 420, a pressure sense input determination module 430, and a command execution module 440.
[0096] The voltage sequence acquisition module 410 is configured to sequentially acquire 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 being respectively disposed at different positions in the target earphone; the ear-insertion 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 the ear-insertion 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 consistent with the determined earphone-insertion state and the pressure-sense input operation.
[0097] A technical aspect of an embodiment of the present application is to sequentially collect 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, determine a first operating state of the target earphone based on the first voltage sequence and a first reference voltage, determine the 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 reference voltage, determine a pressure-sense input operation performed by the user on the target earphone based on the second operating state, and control the target earphone to execute a corresponding operation command according to the determined in-ear state and pressure-sense input operation. Through these technical measures, it is possible to improve the earphone's detection sensitivity for the in-ear state and the pressure-sense input and reduce the hardware overhead in the earphone detection process.
[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 smoothing filtering on the plurality of first voltage sequences to obtain voltage filtering results; a first state determination unit configured to determine a first operating state of the target earphone based on the voltage filtering results and the first reference voltage; a voltage removal unit configured to remove a maximum voltage value and a minimum voltage value in each first voltage sequence and average the remaining plurality of voltage values in each first voltage sequence to obtain a plurality of voltage average values; an averaging unit configured to average the plurality of voltage average values to obtain the voltage filtering result; a current calibration unit configured to determine a current calibration parameter corresponding to the first capacitor based on the voltage filtering results and the first reference voltage and to calibrate a current value corresponding to the first capacitor based on the current calibration parameter; a current current calibration unit configured to calibrate a current current value corresponding to the first capacitor based on the current calibration parameters and preset capacitance-digital conversion parameters; a voltage difference value calculation unit configured to obtain a current voltage filtering result obtained after calibrating the current of the first capacitor 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 the 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 the 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 parameters 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 the 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 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 predetermined touch threshold; a counting unit configured to determine that a touch event has occurred in the target earphone if the voltage difference value between the first reference voltage and the voltage filtering result is greater than the predetermined touch threshold, count the number of times that touch events have occurred in the target earphone within a set time period, and return to performing an operation 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 predetermined 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 the first operating state of the target earphone is a touch state if 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 include 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 corresponding functional modules and effects for executing 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 may be one or more, and FIG. 5 illustrates an example in which there is one processor 510. The processor 510, memory 520, input device 530, and output device 540 in the earphone may be connected via a bus or other methods, and FIG. 5 illustrates an example in which they are connected via a bus. The memory 520, as a computer-readable storage medium, can be configured 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., 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 in the earphone control device). The processor 510 runs the software programs, instructions, and modules stored in the memory 520 to perform various earphone function applications and data processing, thereby realizing the earphone control method described above. That is, when the program is executed by the processor, it realizes the following method: 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 located 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 a preset 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 an operation command corresponding to the determined in-ear state and the pressure-sense input operation.
[0103] The memory 520 may primarily include a program storage area and a data storage area, of which the program storage area can store an operating system and at least one application required for a function, and the data storage area can store data generated based on terminal use. The memory 520 may also include high-speed random access memory or 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 memory located remotely from the processor 510, which can be connected to the earphones via a network. Examples of such networks include, but are not limited to, the Internet, an internal company network, a local area network, a mobile communication network, and a combination of the Internet, the internal company network, the local area network, and the mobile communication network. The input device 530 can 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, etc. The output device 540 may include a display device, such as a monitor.
[0104] Example 6 A sixth embodiment of the present application further provides a computer-readable storage medium having stored thereon a computer program that, when executed by a processor, implements the method described in any of the embodiments of the present application. Of course, the computer-readable storage medium according to the embodiments of the present application can also implement operations related to the earphone control method according to any of the embodiments of the present application. That is, when the program is executed by a processor, it implements the following method: sequentially sampling a first voltage sequence corresponding to a first capacitor and a second voltage sequence corresponding to a second capacitor in a target earphone based on a preset sampling period, the first capacitor and the second capacitor being respectively located 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 a 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 determined in-ear state and 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 this understanding, the technical aspects of the present application can be embodied in the form of a software product, and the computer software product 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 causing one earphone to execute the methods described in multiple embodiments of the present application.
[0106] In addition, in the above embodiment of the earphone control device, the multiple units and modules provided are merely divided according to functional logic, but are not limited to the above divisions, as long as they can realize the corresponding functions. It should be noted that the specific names of the multiple functional units are merely for the purpose of making them easier to distinguish 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 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 preset second 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 accordance with the earphone insertion state and a determination result of the pressure-sense input operation so as to execute an operation command that matches the determination result, 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 acquired within the plurality of sampling periods; determining a first operating state of the target earphone based on the first voltage sequence and a preset first 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; 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 the remaining voltage values in each first voltage sequence to obtain a plurality of voltage averages; and taking an average value for the plurality of voltage average values to obtain the voltage filtering result. How to control your earphones.
2. 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, count the number of touch events that have occurred in the target earphone within a preset time period, and return to performing the operation of sequentially acquiring 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; determining whether the number of consecutive touch events occurring on the target earphone within the set time period is equal to a first threshold; determining, 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, that the first operating state of the target earphone is a touch state; The method of claim 1.
3. 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 1.
4. a voltage sequence acquisition module configured to sequentially acquire 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 being respectively disposed at different positions in the target earphone; an ear-fitting 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 ear-fitting 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 preset second reference voltage, and to determine a pressure-sense input operation performed by a user on the target earphone based on the second operating state; a command execution module configured to control the target earphone to execute an operation command that matches the determined result, in response to the ear insertion state and the determined result of the pressure sense input operation, the preset sampling period includes a plurality of sampling periods; the voltage sequence acquisition module is configured to acquire a plurality of first voltage sequences corresponding to the first capacitor and a plurality of second voltage sequences corresponding to the second capacitor within the plurality of sampling periods; The ear-wearing state determination module is configured to perform a smoothing filtering process on the plurality of first voltage sequences to obtain a voltage filtering result, and determine a first operating state of the target earphone based on the voltage filtering result and the first reference voltage; the ear insertion state determination module is configured to remove a maximum voltage value and a minimum voltage value in each first voltage sequence, average a plurality of remaining voltage values in each first voltage sequence to obtain a plurality of voltage average values, and average the plurality of voltage average values to obtain the voltage filtering result; Earphone control device.
5. 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 implements the earphone control method according to any one of claims 1 to 3. Earphones.
6. A computer program is stored which, when executed by a processor, implements the earphone control method according to any one of claims 1 to 3. 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