Earphone control method, earphone and computer readable storage medium
By setting up an electrical connection between the sensor control module and the piezoresistive sensor in the earphone, and adopting a power supply strategy that switches between polling and fast interrupt modes, the problems of short battery life and incomplete human-computer interaction in TWS Bluetooth earphones are solved, and energy consumption is reduced and battery life is improved when detecting press events.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TCL TECH ELECTRONICS (HUIZHOU) CO LTD
- Filing Date
- 2025-01-08
- Publication Date
- 2026-07-10
AI Technical Summary
TWS Bluetooth earbuds suffer from issues such as small size, limited battery capacity, and incomplete human-computer interaction functions, leading to shorter battery life.
A sensor control module is installed in the headphones and electrically connected to the headphone control module and the piezoresistive sensor. By switching between polling mode and fast interrupt mode, the piezoresistive sensor is periodically powered on and off to detect press events and reduce energy consumption.
While ensuring human-computer interaction functions, reduce headphone power consumption, improve battery life, and achieve accurate detection of press events to avoid omissions.
Smart Images

Figure CN122372883A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of headphone technology, and more particularly to a headphone control method, a headphone, and a computer-readable storage medium. Background Technology
[0002] With the rapid development of smart wearables, TWS (True Wireless Stereo) earbuds have become an indispensable part. Currently, some TWS Bluetooth earbuds offer human-computer interaction functions, such as allowing users to control the earbuds by clicking on them. However, due to the small size and limited battery capacity of TWS Bluetooth earbuds, and the fact that human-computer interaction functions often consume a significant amount of power, the earbuds' battery life is shortened. Therefore, the poor battery life of these earbuds remains a technical issue.
[0003] The above content is only used to help understand the technical solutions of the embodiments of this application, and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The main objective of this invention is to provide a headphone control method, a headphone, and a computer-readable storage medium, aiming to address the technical problem of improving headphone battery life.
[0005] To achieve the above objectives, the present invention provides a headphone control method applied to a sensor control module of a headphone. The sensor control module is electrically connected to the headphone control module and the piezoresistive sensor of the headphone. The headphone control method includes:
[0006] When the sensor control module is in polling mode, it periodically sends a piezoresistive sensor power supply request to the headphone control module to periodically power the piezoresistive sensor. When a press event is detected by the piezoresistive sensor, the sensor control module enters fast interrupt mode. Alternatively, when a preset touch operation is detected on the headphone, the sensor control module enters fast interrupt mode from polling mode.
[0007] In the fast interrupt mode, it is determined that the piezoresistive sensor is continuously powered, and the press event of the earphone is detected through the piezoresistive sensor;
[0008] After determining that the press event of the earphone has been detected, the sensor control module switches from the fast interrupt mode to the polling mode and determines to power off the piezoresistive sensor.
[0009] The present invention also provides an earphone control device, the earphone control device comprising:
[0010] A sensor control module is configured to periodically send a power supply request for the piezoresistive sensor to the headphone control module to periodically power the piezoresistive sensor when the sensor control module is in polling mode. If a press event is detected by the piezoresistive sensor, the sensor control module enters a fast interrupt mode; or, if a preset touch operation is detected on the headphone, the sensor control module enters a fast interrupt mode from the polling mode. In the fast interrupt mode, the sensor control module determines to continuously power the piezoresistive sensor and detects press events on the headphone through the piezoresistive sensor. After determining that the press event detection on the headphone is complete, the sensor control module switches from the fast interrupt mode to the polling mode and determines to power off the piezoresistive sensor.
[0011] The headphone control module is used to receive the piezoresistive sensor power supply request sent by the sensor control module and to supply power to the piezoresistive sensor.
[0012] The present invention also provides an earphone, including an earphone control device, a memory, a processor, and an earphone control program stored in the memory and executable on the processor. The earphone control device includes a sensor control module, an earphone control module, a piezoresistive sensor, a slip detection module, and a wear-off detection module. The sensor control module, the earphone control module, and the piezoresistive sensor are interconnected. The slip detection module and the wear-off detection module are connected to the sensor control module. When the earphone control program is executed by the processor, it performs the steps of the earphone control method described above.
[0013] The present invention also provides a computer-readable storage medium storing a headphone control program that can run on a processor, the headphone control program being invoked by the processor to implement the steps of the headphone control method described above.
[0014] The present invention also provides a program product, which is a computer program product, comprising a computer program that, when executed by a processor, implements the steps of the headphone control method described above.
[0015] This invention provides a headphone control method that achieves at least the following technical effects: In this invention, a sensor control module is provided on the headphone, and the sensor control module is electrically connected to the headphone control module and the headphone's piezoresistive sensor. This allows the headphone control module to periodically send a power supply request to the piezoresistive sensor in polling mode, enabling the headphone control module to periodically supply power to the piezoresistive sensor. The piezoresistive sensor can then detect the presence of a press event. If a press event is detected, the sensor control module is instructed to enter a fast interrupt mode. Furthermore, this invention can also control the sensor control module to enter a fast interrupt mode when a preset touch operation is detected on the headphone. This means that when a user touches the headphone, the sensor control module is triggered to enter a fast interrupt mode. In fast interrupt mode, continuous power supply to the piezoresistive sensor is ensured, and the press event on the headphone is detected through the piezoresistive sensor, thus achieving the detection of the press event.
[0016] After detecting a press event on the earphone, the sensor control module switches from fast interrupt mode to polling mode and determines to power off the piezoresistive sensor. This allows the earphone to exit fast interrupt mode and power off the piezoresistive sensor after detecting a press event, thus reducing earphone power consumption. After exiting fast interrupt mode, it re-enters polling mode. In polling mode, power is periodically requested to supply power to the piezoresistive sensor, enabling periodic detection of press events and preventing missed events. Therefore, this invention reduces earphone power consumption and improves battery life while maintaining the earphone's human-computer interaction functions (e.g., earphone press events). Attached Figure Description
[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating an embodiment of the headphone control method of the present invention;
[0020] Figure 2 This is a flowchart illustrating an example of the headphone control method of the present invention;
[0021] Figure 3This is a schematic diagram of the headphone structure in the headphone control method of the present invention;
[0022] Figure 4 This is a schematic diagram of the circuit structure of the sensor control module in the headphone control method of the present invention;
[0023] Figure 5 This is a schematic diagram of the press event detection process in the headphone control method of the present invention;
[0024] Figure 6 This is a schematic diagram of the headphone control device according to an embodiment of the present invention;
[0025] Figure 7 This is a schematic diagram of the hardware operating environment of the headphones according to an embodiment of the present invention.
[0026] The objectives, features, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0027] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0028] With the rapid development of smart wearables, TWS (True Wireless Stereo) earbuds have become an indispensable part. Currently, some TWS Bluetooth earbuds offer human-computer interaction functions, such as allowing users to control the earbuds by clicking on them. However, due to the small size and limited battery capacity of TWS Bluetooth earbuds, and the fact that human-computer interaction functions often consume a significant amount of power, the earbuds' battery life is shortened.
[0029] Furthermore, the human-computer interaction functions of headphones are not comprehensive at present, and it is difficult to implement many human-computer interaction functions in the same headphones. Therefore, there is also the problem of incomplete human-computer interaction functions in headphones.
[0030] Therefore, in this embodiment of the invention, a sensor control module is provided on the earphone, and the sensor control module is electrically connected to the earphone control module and the piezoresistive sensor of the earphone. This enables the piezoresistive sensor to be periodically powered in polling mode, and the presence of a press event can be detected by the piezoresistive sensor. If a press event is detected, the sensor control module is determined to enter a fast interrupt mode. This invention can also control the sensor control module to enter a fast interrupt mode when a preset touch operation is detected on the earphone. This enables the sensor control module to enter a fast interrupt mode when the user touches the earphone. In the fast interrupt mode, power can be supplied to the piezoresistive sensor, and the press event of the earphone can be detected by the piezoresistive sensor to achieve the detection of the press event.
[0031] After detecting a press event on the earphone, the sensor control module switches from fast interrupt mode to polling mode and determines to power off the piezoresistive sensor. This allows the earphone to exit fast interrupt mode and power off the piezoresistive sensor after detecting a press event, thus reducing earphone power consumption. After exiting fast interrupt mode, it re-enters polling mode. In polling mode, power is periodically requested to supply power to the piezoresistive sensor, enabling periodic detection of press events and preventing missed events. Therefore, this invention reduces earphone power consumption and improves battery life while maintaining the earphone's human-computer interaction functions (e.g., earphone press events).
[0032] In addition, the sensor control module in this embodiment of the invention can also be connected to a sliding detection module and a wearing / loosening detection module. The sliding detection module can be used to detect whether the earphone has a sliding event, and the wearing / loosening detection module can be used to detect the wearing / loosening state of the earphone.
[0033] Based on this, the present invention proposes a headphone control method in the first embodiment, applied to the sensor control module of the headphone. The sensor control module is electrically connected to the headphone control module and the piezoresistive sensor of the headphone. Please refer to... Figure 1 The headphone control method includes steps S10 to S30:
[0034] Step S10: When the sensor control module is in polling mode, it periodically sends a piezoresistive sensor power supply request to the headphone control module to periodically supply power to the piezoresistive sensor. When a press event is detected by the piezoresistive sensor, the sensor control module enters a fast interrupt mode. Alternatively, when a preset touch operation is detected in the headphone, the sensor control module enters a fast interrupt mode from the polling mode.
[0035] It should be noted that the earphones can be TWS earphones. In this embodiment, the earphones can be worn in the left ear or the right ear. Each earphone is equipped with a sensor control module, an earphone control module, and a piezoresistive sensor. The sensor control module can be connected to the piezoresistive sensor. The earphone control module and the sensor control module can communicate with each other. For example, the earphone control module and the sensor control module can communicate with each other through IIC (Inter-Integrated Circuit). IIC is a serial communication bus protocol. For example, the earphone control module and the sensor control module can be connected using the IIC bus to realize the communication connection between the earphone control module and the sensor control module.
[0036] The sensor control module can be a chip, such as the GH6212 (high-precision multi-functional interactive sensor) chip, etc., but this embodiment does not specifically limit it. The piezoresistive sensor can be a PT135 sensor, and the power supply of the piezoresistive sensor is controlled by the headphone control module. The control module refers to the MCU chip set in the headphone. The sensor control module can send a power supply request for the piezoresistive sensor to the control module, and the control module will supply power to the piezoresistive sensor after receiving the power supply request.
[0037] Polling mode is characterized by the sensor control module periodically requesting power to the piezoresistive sensor. In fast interrupt mode, the sensor control module also periodically requests power to the piezoresistive sensor, but the power request period in fast interrupt mode is shorter than that in polling mode. For example, polling mode might request power to the piezoresistive sensor every 5 seconds, while fast interrupt mode might request power every 80ms. A press event can be characterized as a press operation triggered by the user on the headphones.
[0038] When the control module powers the piezoresistive sensor, the presence of a pressing event can be detected by the piezoresistive sensor.
[0039] For example, when the sensor control module is in polling mode, the sensor control module can periodically send a piezoresistive sensor power supply request to the headphone control module, and detect whether there is a press event through the powered piezoresistive sensor. If a press event is detected, the sensor control module enters the fast interrupt mode from the polling mode; if a preset touch operation is detected in the headphone, the sensor control module enters the fast interrupt mode.
[0040] In a feasible embodiment, step S10 further includes steps S11 to S14:
[0041] Step S11: When the headphones are in the wearing state, data acquisition frames are acquired according to the preset acquisition cycle, and the cumulative number of data acquisition frames acquired when the sensor control module is in polling mode is accumulated.
[0042] It should be noted that the "wearing status" refers to the earphone being in the ear, indicating that the user is using the earphone. The preset data acquisition period can be set based on actual conditions, and this embodiment does not limit it. Regardless of whether the piezoresistive sensor is powered, the sensor control module can obtain data acquisition frames from the interface connected to the piezoresistive sensor. A data acquisition frame is a frame of data acquired by the sensor control module at the interface connected to the piezoresistive sensor.
[0043] In this embodiment, the piezoresistive sensor is periodically powered only when the earphone is being worn and the sensor control module is in polling mode. The sensor control module also enters fast interrupt mode only when a preset touch operation is detected on the earphone. When the earphone is detached, the sensor control module may not enter either polling or fast interrupt mode to reduce power consumption.
[0044] It should be noted that after acquiring a data acquisition frame, it can be determined whether the data acquisition frame was acquired in polling mode. For example, the data acquisition frame may contain a mode identifier of the sensor control module, and it can be used to determine whether the data frame was acquired in polling mode, etc. This embodiment does not make specific limitations on this. The cumulative frame count is the number of data acquisition frames acquired in polling mode.
[0045] Step S12: When the cumulative number of frames equals the preset polling threshold, a power supply request for the piezoresistive sensor is sent to the headphone control module to periodically supply power to the piezoresistive sensor.
[0046] Step S13: Obtain the piezoresistive acquisition frame collected by the piezoresistive sensor, and detect whether there is a press event in the piezoresistive acquisition frame;
[0047] Step S14: When a press event is detected in the piezoresistive acquisition frame, the sensor control module enters the fast interrupt mode.
[0048] It should be noted that the preset polling threshold can be determined based on the actual situation. The product of the preset polling threshold, the cumulative number of frames, and the preset acquisition period is equal to the period for requesting power to the piezoresistive sensor in polling mode. For example, the period for requesting power to the piezoresistive sensor can be 5 seconds, etc. This embodiment does not impose specific restrictions on this.
[0049] A piezoresistive acquisition frame is a data frame acquired by the piezoresistive sensor when the headphone control module supplies power to it. Alternatively, the sensor control module can obtain the piezoresistive acquisition frame from the interface connected to the piezoresistive sensor. In polling mode, when the headphone control module supplies power to the piezoresistive sensor, the sensor control module can acquire one piezoresistive acquisition frame and use this frame to determine if a press event has occurred.
[0050] For example, when the headphones are in the wearing state, data acquisition frames are obtained from the interface of the sensor control module connected to the piezoresistive sensor according to the preset acquisition cycle. If the data acquisition frame is a data frame acquired by the sensor control module in polling mode, the cumulative number of data acquisition frames in polling mode is accumulated. When the cumulative number of frames is equal to the preset polling threshold, a piezoresistive sensor power supply request is sent to the headphone control module so that the headphone control module supplies power to the piezoresistive sensor. The sensor control module acquires the piezoresistive acquisition frame acquired by the piezoresistive sensor, detects the piezoresistive acquisition frame, and determines that the sensor control module enters the fast interrupt mode when a press event is detected in the piezoresistive acquisition frame.
[0051] In this embodiment, since a press event is detected in the piezoresistive acquisition frame, it indicates that the user may need to press the earphone. Therefore, the sensor control module can be controlled to enter the fast interrupt mode. In the fast interrupt mode, the piezoresistive sensor is continuously powered so that it can continue to accurately detect whether there is still a press event.
[0052] In a feasible embodiment, after step S14, steps S141 to A142 are further included:
[0053] Step S141: If no press event is detected, acquire data acquisition frames according to the preset acquisition cycle and accumulate the cumulative frame count;
[0054] Step S142: When the cumulative frame count is greater than the preset polling threshold, reset the cumulative frame count and send a power-off interrupt request to the headphone control module to turn off the power supply to the piezoresistive sensor.
[0055] It should be noted that if no press event is detected in the earphone, data acquisition frames can continue to be acquired according to the preset acquisition cycle, and the cumulative frame count of data acquisition frames can be accumulated. The cumulative frame count is incremented by 1 for each data acquisition frame.
[0056] When the accumulated frame count exceeds a preset polling threshold, the accumulated frame count can be reset, for example, to 0. The process can then return to step S11 to continue acquiring data acquisition frames, accumulating these frames, and periodically sending power supply requests for the piezoresistive sensor to the headphone control module. A power-off interruption request is indicated by a request to turn off the power supply to the piezoresistive sensor to reduce energy consumption.
[0057] For example, when no press event is detected in the piezoresistive detection frame in polling mode, data acquisition frames are obtained according to a preset acquisition cycle, and the cumulative frame count is accumulated. When the cumulative frame count exceeds a preset polling threshold, the cumulative frame count is reset, and the sensor control module sends a power-off interruption request to the headphone control module to shut down the power supply to the piezoresistive sensor, reducing power consumption and improving battery life. The process also returns to step S11 to continue periodically sending piezoresistive sensor power supply requests to avoid missing user press events.
[0058] In one feasible embodiment, the earphone further includes a slide detection module, which includes a capacitive sensor disposed at the end of the earphone stem, and the slide detection module is connected to the sensor control module; step S10 further includes steps A10 to A20:
[0059] Step A10: When the earphone is in the wearing state and the capacitance value detected by the capacitance sensor at the end of the ear stem is greater than the preset capacitance threshold, it is determined that the earphone has a preset touch operation.
[0060] Step A20: The sensor control module switches from polling mode to fast interrupt mode.
[0061] It should be noted that when the headphones are being worn, the system will detect whether there are any preset touch operations. When the headphones are out of reach of the user, the detection function for preset touch operations can be turned off to reduce power consumption.
[0062] The slide detection module can be used to detect slide-triggered events, which are represented by a user's slide operation triggered on the earphone stem. The slide detection module can also be used to detect preset touch operations. The slide detection module includes a capacitive sensor located at the end of the earphone stem. The presence of a preset touch operation can be detected by comparing changes in the capacitance value detected by the capacitive sensor. Since both pressing and sliding operations by the user occur on the earphone stem, if the capacitance value detected by the capacitive sensor at the end of the stem is greater than a preset capacitance threshold, it indicates that the user has triggered an operation on the earphone stem, and the user may have performed a pressing operation. Therefore, in this case, the sensor control module can be controlled to enter a fast interrupt mode to avoid missing pressing events. The preset capacitance threshold can be set based on actual conditions; this embodiment does not impose specific limitations on it.
[0063] For example, when the earphone is being worn and the capacitance value detected by the capacitance sensor at the end of the ear stem is greater than a preset capacitance threshold, it is determined that a preset touch operation has occurred on the earphone, and the sensor control module enters a fast interrupt mode.
[0064] In one feasible embodiment, the sliding detection module includes at least two capacitive sensors, which are sequentially disposed on the earpiece of the earphone. The at least two capacitive sensors include a capacitive sensor disposed at the end of the earpiece and a capacitive sensor disposed at the beginning of the earpiece. The method further includes steps B10 to B40.
[0065] Step B10: Obtain the capacitance values detected by each capacitance sensor in the sliding detection module;
[0066] It should be noted that the sliding detection module includes a preset number of capacitive sensors, with the preset number being greater than two. The capacitive sensor located at the end of the earpiece is one of these preset number of capacitive sensors. The preset number can be three, four, etc., and this embodiment does not impose a specific limitation on this. The preset number of capacitive sensors are sequentially arranged on the earpiece, with the preset number of capacitive sensors arranged sequentially from the beginning to the end of the earpiece. The beginning of the earpiece is the position closest to the earbud insertion point, and the end of the earpiece is the other end of the earpiece. The capacitive sensors can be used to detect capacitance values.
[0067] Step B20: If the capacitance value detected by each capacitance sensor is greater than the preset sliding threshold, the absolute value of the difference between the times when the capacitance values detected by two adjacent capacitance sensors are greater than the preset sliding threshold is greater than the preset time interval, and the time when the capacitance value detected by the capacitance sensor at the head of the ear stem is greater than the preset sliding threshold is earlier than the time when the capacitance sensor at the end of the ear stem is greater than the preset sliding threshold, then it is determined that there is a sliding event in the earphone.
[0068] It should be noted that the preset sliding threshold can be set based on the actual situation. The preset sliding threshold and the preset capacitance threshold can be the same or different. This embodiment does not make specific limitations on this.
[0069] The preset time interval can also be set based on actual conditions, and this embodiment does not impose specific limitations on it. When the user slides on the earpiece, the capacitance value detected by the capacitive sensors at different positions is greater than the preset sliding threshold at different times. Therefore, when the capacitance value detected by a preset number of capacitive sensors is greater than the preset sliding threshold, and the absolute value of the difference between the times when the capacitance values detected by two adjacent capacitive sensors are greater than the preset sliding threshold is greater than the preset time interval, it indicates that the user has performed a sliding operation on the earpiece.
[0070] For example, there are capacitive sensors A, B, and C on the earpiece in sequence. When the user slides on the earpiece, the absolute value of the difference between the time when A detects a capacitance value greater than a preset sliding threshold and the time when B detects a capacitance value greater than a preset sliding threshold will be greater than a preset time interval. The absolute value of the difference between the time when B detects a capacitance value greater than a preset sliding threshold and the time when C detects a capacitance value greater than a preset sliding threshold will also be greater than a preset time interval.
[0071] For example, when a sliding operation is detected on the ear stem, if the moment when the capacitance value detected by the capacitance sensor at the head of the ear stem is greater than the preset sliding threshold is earlier than the moment when the capacitance sensor at the tail of the ear stem is greater than the preset sliding threshold, it indicates that the user has performed a sliding operation on the ear stem, so the earphone can be considered to have a sliding event.
[0072] In step B30, if the capacitance value detected by each capacitance sensor is greater than the preset sliding threshold, the absolute value of the difference between the times when two adjacent capacitance sensors detect capacitance values greater than the preset sliding threshold is greater than the preset time interval, and the time when the capacitance sensor at the head of the ear stem detects a capacitance value greater than the preset sliding threshold is later than the time when the capacitance sensor at the end of the ear stem detects a capacitance value greater than the preset sliding threshold, then it is determined that there is an upward sliding event in the earphone.
[0073] In this embodiment, when a sliding operation is determined to exist on the ear stem, if the moment when the capacitance value detected by the capacitance sensor at the head of the ear stem is greater than the preset sliding threshold is later than the moment when the capacitance sensor at the tail of the ear stem detects a value greater than the preset sliding threshold, it indicates that the user has performed an upward sliding operation on the ear stem, which can indicate that an upward sliding event exists on the earphone.
[0074] For example, in this embodiment, the sensor control module can detect whether there are swipe-up and swipe-down events on the headphones through the sliding detection module. This allows the sensor control module to detect multiple human-computer interaction events, improving the comprehensiveness of the detection of human-computer interaction events corresponding to the headphones. Furthermore, since the sliding detection module can also be connected to the sensor control module, the sensor control module can detect swipe-up and swipe-down events, thereby reducing the hardware footprint while improving the comprehensiveness of human-computer interaction event detection.
[0075] Step S20: In fast interrupt mode, determine that the piezoresistive sensor is continuously powered, and detect the press event of the earphone through the piezoresistive sensor;
[0076] It should be noted that in the fast interrupt mode, the control module will continuously supply power to the piezoresistive sensor. When the piezoresistive sensor is powered, the press event of the earphone can be detected through the piezoresistive sensor.
[0077] For example, in fast interrupt mode, the piezoresistive sensor is periodically powered according to the power request cycle corresponding to fast interrupt mode, so as to ensure continuous power supply to the piezoresistive sensor in fast interrupt mode, and to detect the press event of the earphone through the piezoresistive sensor.
[0078] In a feasible embodiment, step S20 further includes steps S21 to S23:
[0079] Step S21: Send a power supply request for the piezoresistive sensor to the headphone control module according to the preset fast request cycle, so as to determine that the piezoresistive sensor is continuously powered in the fast interrupt mode.
[0080] Step S22: Obtain the piezoresistive acquisition frames collected by the piezoresistive sensor, and accumulate the frame count value of the piezoresistive acquisition frames;
[0081] Step S23: Detect the piezoresistive acquisition frame, accumulate the number of piezoresistive acquisition frames with press events, and reset the frame count value when the frame count value reaches the preset acquisition threshold to determine that the press event detection of the earphone is complete.
[0082] It should be noted that the preset fast request period can be set based on actual conditions. The duration of the preset fast request period is shorter than the duration of the period for requesting power to the piezoresistive sensor in polling mode. The preset fast period can be 80ms. After sending a piezoresistive sensor power supply request to the headphone control module, the headphone control module will supply power to the piezoresistive sensor. Simultaneously, after receiving the piezoresistive sensor power supply request, the headphone control module will start the headphone's power supply timer. When the power supply timer reaches the preset duration threshold, the headphone control module will determine to perform power-off interrupt control on the piezoresistive sensor. However, the priority of the piezoresistive sensor power supply request is higher than the power-off interrupt control. The duration of the preset duration threshold is shorter than the duration of the preset fast request period. For example, the preset duration threshold can be 110ms, while the duration of the preset fast request period is 80ms. In fast interrupt mode, a piezoresistive sensor power supply request is generated every 80ms, and before 110ms is reached, the headphone control module will receive another piezoresistive sensor power supply request, and the corresponding power supply timer of the headphone control module can restart, thus continuing to supply power to the piezoresistive sensor. Therefore, the piezoresistive sensor can be continuously powered in fast interrupt mode.
[0083] When the headphone control module supplies power to the piezoresistive sensor, the sensor control module can acquire piezoresistive acquisition frames through the piezoresistive sensor. The frame count value is the number of piezoresistive acquisition frames acquired in the fast interrupt mode. In the fast interrupt mode, piezoresistive acquisition frames can also be acquired according to a preset acquisition cycle.
[0084] The press frame count is the number of piezoresistive data acquisition frames where a press event occurs. The press frame count reflects the number of times the user presses the headphones. The preset acquisition threshold can be set based on actual conditions, for example, it can be set to 4, etc., but this embodiment does not impose a specific limitation on this. Resetting the frame count value can mean resetting the frame count value to 0.
[0085] When a preset touch operation is detected on the headphones, and the sensor control module enters fast interrupt mode, the press frame count can be the number of piezoresistive acquisition frames with press events in fast interrupt mode. When the sensor control module is in polling mode, it periodically sends a piezoresistive sensor power supply request to the headphone control module. If a press event is detected by the piezoresistive sensor, and the sensor control module is confirmed to have entered fast interrupt mode, the press frame count can be the number of piezoresistive acquisition frames with press events in fast interrupt mode plus 1. This is to avoid missing the accumulation of press events and improve the accuracy of press frame statistics.
[0086] For example, according to a preset fast request cycle, the sensor control module sends a piezoresistive sensor power supply request to the headphone control module, so that the headphone control module supplies power to the piezoresistive sensor. The sensor control module acquires the piezoresistive acquisition frames collected by the piezoresistive sensor, accumulates the frame count value of the piezoresistive acquisition frames, detects each piezoresistive acquisition frame, and counts the number of press frames of the piezoresistive acquisition frames with a press event. When the frame count value reaches a preset acquisition threshold, the frame count value is reset to determine that the headphone press event detection is complete. Resetting the frame count value allows the sensor control module to more accurately accumulate the press frame count the next time it enters the fast interrupt mode.
[0087] To better understand this embodiment, please refer to Figure 3 The process of powering the piezoelectric sensor is briefly described below. Step Y10: The sensor control module is interrupted; this means that the sensor control module detects a preset touch operation and enters a fast interrupt mode. Step Y20: The sensor control module initiates a power supply request for the piezoresistive sensor; the sensor control module sends the piezoresistive sensor power supply request to the headphone control module. Step Y30: The headphone control module powers the piezoresistive sensor and restarts the power supply timer. Step Y40: When the power supply timer actually reaches the preset duration threshold, the power supply to the piezoresistive sensor is turned off, and the power supply timer is also turned off to reduce energy consumption.
[0088] In step S30, after determining that the press event of the earphone has been detected, the sensor control module switches from the fast interrupt mode to the polling mode and determines to power off the piezoresistive sensor.
[0089] It should be noted that after confirming that a press event has been detected on the earphone, the sensor control module can switch from fast interrupt mode to polling mode and determine to power off the piezoresistive sensor, thereby reducing the earphone's power consumption. This allows for power-off control of the piezoresistive sensor when press detection is not required. Furthermore, the polling mode of the sensor control module reduces the risk of missed press events.
[0090] For example, after determining that the press event of the earphone has been detected, the sensor control module switches from the fast interrupt mode to the polling mode and determines to power off the piezoresistive sensor to reduce power consumption and improve the earphone's battery life.
[0091] In this embodiment of the invention, a sensor control module is provided on the earphone, and the sensor control module is connected to a piezoresistive sensor. The sensor control module can be connected to the earphone control module, so that in polling mode, it can periodically send a power supply request for the piezoresistive sensor to the earphone control module, so that the earphone control module can supply power to the piezoresistive sensor. Then, the piezoresistive sensor can detect whether there is a pressing event. If a pressing event is detected, the sensor control module can be determined to enter the fast interrupt mode. This embodiment of the invention can also control the sensor control module to enter the fast interrupt mode when a preset touch operation is detected on the earphone. This means that when the user touches the earphone, the sensor control module can be triggered to enter the fast interrupt mode. In the fast interrupt mode, it can be determined that power is supplied to the piezoresistive sensor, and the pressing event of the earphone can be detected by the piezoresistive sensor, thus realizing the detection of pressing events.
[0092] After detecting a press event in the earphone, the sensor control module switches from fast interrupt mode to polling mode and determines to power off the piezoresistive sensor. This allows the earphone to exit fast interrupt mode and power off the piezoresistive sensor after detecting a press event, thus reducing earphone power consumption. After exiting fast interrupt mode, it re-enters polling mode. In polling mode, power is periodically requested to supply power to the piezoresistive sensor, enabling periodic detection of press events and preventing missed events. Therefore, this embodiment of the invention can reduce earphone power consumption and improve battery life while maintaining the earphone's human-computer interaction function (e.g., earphone press events).
[0093] In a feasible embodiment, step S30 further includes step S31: after the press event detection of the earphone is completed, after a preset delay time, the control sensor control module switches from fast interrupt mode to polling mode and sends a power-off interrupt request to the earphone control module to determine to perform power-off control on the piezoresistive sensor.
[0094] It should be noted that the completion of the headphone press event detection means that the frame count value reaches the preset acquisition threshold in the fast interrupt mode. The preset delay duration can be set based on the actual situation, and this embodiment does not impose a specific limitation on it. For example, the preset delay duration can be 80ms, etc.
[0095] For example, when the frame count in fast interrupt mode reaches a preset acquisition threshold, the sensor control module can send a power supply request to the headphone control module to continue supplying power to the piezoresistive sensor. This allows the sensor control module to switch from fast interrupt mode to polling mode after a preset delay, thus avoiding missing situations where the user continues to press the device after the headphone's press event detection has been completed, improving the accuracy of press event detection. Simultaneously, the sensor control module sends a power-off interrupt request to the headphone control module, enabling the headphone control module to power off the piezoresistive sensor, thus achieving power-off control of the piezoresistive sensor.
[0096] In one feasible embodiment, the earphone further includes a wear-off detection module, which is connected to the sensor control module. The wear-off detection module includes at least two detection units, each of which includes a reference capacitance sensor and a detection capacitance sensor. The earphone control method applied to the sensor control module further includes steps C10 to C40:
[0097] Step C10: For each detection unit, obtain the reference value detected by the reference capacitance sensor and the capacitance detection value detected by the detection capacitance sensor in the detection unit.
[0098] It should be noted that the wear / dislodgement detection module includes detection units that can be a first detection unit and a second detection unit. The first detection unit may include a reference capacitance sensor (which can be a first capacitance sensor), a detection capacitance sensor (which can be a second capacitance sensor), a reference capacitance sensor (which can be a third capacitance sensor), or a detection capacitance sensor (which can be a fourth capacitance sensor). Both the first and second detection units may include two capacitance sensors. The first detection unit may include both a first and a second capacitance sensor, while the second detection unit may include both a third and a fourth capacitance sensor. The first reference value is the capacitance value detected by the first capacitance sensor. The second reference value is the capacitance value detected by the third capacitance sensor. The first capacitance detection value is the capacitance value detected by the second capacitance sensor, and the second capacitance detection value is the capacitance value detected by the fourth capacitance sensor.
[0099] Step C20: Calculate the difference between the capacitance detection value and the reference value to obtain the detection difference value corresponding to the detection unit;
[0100] Step C30: When the detection difference corresponding to all detection units is greater than the preset wearing threshold, it is determined that the earphone is in the wearing state;
[0101] Step C40: When the detection difference corresponding to all detection units is less than the preset detachment threshold, it is determined that the earphone is in a detached state.
[0102] It should be noted that both the preset wearing threshold and the preset detachment threshold can be set based on actual conditions, and this embodiment does not impose specific limitations on them. When the earphone is in a detached state, the detection difference is essentially 0. For example, the detection difference of the first detection unit can be a first difference, which can be obtained by calculating the difference between the first capacitance detection value and the first reference value; the detection difference of the second detection unit can be a second difference, which can be obtained by calculating the difference between the second capacitance detection value and the second reference value. When both the first difference and the second difference are greater than the preset wearing threshold, it is determined that the earphone is in a wearing state; when both the first difference and the second difference are less than the preset detachment threshold, it is determined that the earphone is in a detached state. In other embodiments, it can also be determined that the earphone is in a detached state when the average of the first difference and the second difference is less than the preset detachment threshold.
[0103] This embodiment uses at least two detection units to detect whether the earphone is worn or detached, improving the accuracy of the detection. Preferably, two detection units are used to avoid the wear / detachment detection module occupying too much space inside the earphone. Because this embodiment determines that the earphone is worn only when both the first difference corresponding to the first detection unit and the second difference corresponding to the second detection unit are greater than a preset wearing threshold, and determines that the earphone is detached only when both the first and second differences are less than a preset detachment threshold, the accuracy of wearing and detachment detection is improved.
[0104] To better understand this embodiment, refer to Figure 3 , Figure 3 A schematic diagram of the headphone structure is shown. Figure 3 D1 and D2 show the headphones from different perspectives. In D1, Da and Da in D2 refer to the location of the first detection unit on the headphones. D3 and D4 also show the headphones from different perspectives. In D3, Db and Db in D4 refer to the location of the second detection unit on the headphones. In D1, A, B, and C refer to the side lengths corresponding to the first detection unit, and D in D1 refers to the farthest distance between the first detection unit and the earpiece. The center line of the lever is shown in D1, D2, D3, and D4. The center line of the lever is the center line of the earpiece stem.
[0105] In a feasible embodiment, the method further includes step D10: obtaining the voltage difference of the piezoresistive sensor from the piezoresistive acquisition frame, and determining that a pressing event exists in the piezoresistive acquisition frame if the voltage difference is greater than a preset voltage threshold.
[0106] It should be noted that the piezoresistive sensor can be used to detect voltage difference, which can be the voltage difference between the P terminal and the N terminal of the piezoresistive sensor. The preset voltage threshold can be set based on the actual situation, and this embodiment does not impose any specific limitations on it.
[0107] For example, if the voltage difference of the piezoresistive sensor in the piezoresistive acquisition frame is greater than a preset voltage threshold, it indicates that the user has pressed the earphone, thus confirming the presence of a pressing event in the piezoresistive acquisition frame. This embodiment utilizes a piezoresistive sensor to detect the presence of a pressing event, thereby facilitating the subsequent implementation of the earphone's human-computer interaction function.
[0108] In a feasible embodiment, the method further includes step E10: when the detection of an up-swipe event, a down-swipe event, a wearing state, a falling state, and / or a press event is completed, a control interrupt request is sent from the sensor control module to the headphone control module so that the headphone control module can read the registers of the sensor control module.
[0109] It should be noted that a control interruption request indicates a request for the headphone control module to interrupt its currently executing operation and to read the registers of the sensor control module. The registers of the sensor control module store data detected by the sensor control module, such as swipe-up events, swipe-down events, wearing status, removal status, and / or detected press events.
[0110] For example, when the sensor control module detects an up-swipe event and / or a down-swipe event, it can send a control interrupt request to the headphone control module. This allows the headphone control module to read the registers of the sensor control module to read the up-swipe and down-swipe events, enabling it to perform corresponding controls. For instance, the headphone control module can increase the volume when it reads an up-swipe event and decrease the volume when it reads a down-swipe event. This embodiment does not specifically limit this. When the sensor control module detects that the headphones have changed from a wearing state to a detached state and / or from a detached state to a wearing state, it can send a control interrupt request to the headphone control module. This allows the headphone control module to read whether the headphones are in a wearing state or a detached state. If the headphone control module is in a detached state, it can disable wearing-related functions of the headphones, thereby reducing power consumption. After the sensor control module completes the press event detection, it can send a control interrupt request to the headphone control module. This allows the headphone control module to read the press event detected by the sensor control module and the corresponding press frame number. The headphone control module can then perform the corresponding control. For example, when the press frame number is 1, it might pause playback; when the press frame number is 2, it might switch to the next track. This embodiment does not specify a particular control. After reading the corresponding data from the register of the sensor control module, the headphone control module can transmit it to the corresponding mobile device, enabling the mobile device to perform the corresponding operation. The mobile device can be, for example, a mobile phone or tablet.
[0111] In one feasible embodiment, refer to Figure 3 An inductor is used between the sensor control module and the piezoresistive sensor, and another inductor is used between the sensor control module and the slide detection module. This avoids RF interference to the piezoresistive sensor, thereby improving the detection accuracy of events such as presses. The inductor can be 33nH. Figure 3 In the diagram, R1 to R6 are resistors, and L1 to L6 are inductors. Figure 3Taking the GH6212 chip as an example, this paper briefly explains the connection relationship between the sensor control module and the piezoelectric sensor, slip detection module, and wear / removal detection module. In the GH6212 chip, C0 to C8 are the IO interfaces. The SDA and SCL interfaces are connected to the headphone control module to achieve I2C communication. SS_I2C_SDA_R and SS_I2C_SCL_R can be used to represent the interfaces in the headphone control module. The INT pin of the GH6212 chip is used to respond to interrupts. For example, when a preset touch operation occurs on the headphones, the GH6212 chip generates an interrupt to enter a fast interrupt mode. The C8 interface of the GH6212 chip connects to the IED1_P interface of the wear-off detection module, where IED1_P can be interpreted as the interface corresponding to the fourth capacitive sensor of the wear-off detection module; the C1 interface of the GH6212 chip connects to the IED1_N interface of the wear-off detection module, where IED1_N can be interpreted as the interface corresponding to the third capacitive sensor of the wear-off detection module; the C4 interface of the GH6212 chip connects to the IED0_N interface of the wear-off detection module, where IED0_N can be interpreted as the interface corresponding to the first capacitive sensor of the wear-off detection module; and the C0 interface of the GH6212 chip connects to the IED0_P interface of the wear-off detection module, where IED0_P can be interpreted as the interface corresponding to the second capacitive sensor of the wear-off detection module.
[0112] The AVDD18, VCC, and VDD pins of the GH6212 chip are used for power supply and are connected to the VOUT pin of the HP6018D4-18 chip. The HP6018D4-18 is a voltage regulator chip. The interface connected to the EN pin of the HP6018D4-18 is not shown in the diagram. The VIN pin of the HP6018D4-18 is connected to the VBAT_R interface, through which power can be supplied to the HP6018D4-18 voltage regulator chip.
[0113] The C2 interface of the GH6212 chip connects to the K0 interface of the sliding detection module. K0 can refer to the interface corresponding to the capacitive sensor in the sliding detection module, for example, the interface corresponding to the capacitive sensor located at the head end of the earpiece. The C3 interface of the GH6212 chip connects to the K1 interface of the sliding detection module. K1 can refer to the interface corresponding to the capacitive sensor in the sliding detection module, for example, the interface corresponding to the capacitive sensor located between the head and tail ends of the earpiece. The C5 interface of the GH6212 chip connects to the K2 interface of the sliding detection module. K2 can refer to the interface corresponding to the capacitive sensor in the sliding detection module, for example, the interface corresponding to the capacitive sensor located at the tail end of the earpiece. The C6 interface of the GH6212 chip connects to the FORCE_P interface corresponding to the piezoresistive sensor. FORCE_P can refer to the P terminal of the piezoresistive sensor. The C7 interface of the GH6212 chip connects to the FORCE_N interface corresponding to the piezoresistive sensor. FORCE_N can refer to the N terminal of the piezoresistive sensor; the N terminal is the negative terminal of the piezoelectric sensor, and the P terminal is the positive terminal of the piezoelectric sensor. Figure 3 The number 10 in the diagram refers to the circuitry corresponding to the piezoelectric sensor. Q1 is the switching transistor, and SDG represent the source, drain, and gate of Q1, respectively. The source (S) terminal of the transistor is connected to LDO_1V8_R, which represents a 1.8V voltage. The FOR_PWR_EN interface connects to the headphone control module, which enables the FOR_PWR_EN interface to power the piezoelectric sensor. VBUCK_1V7_R provides a 1.7V voltage to the gate (G) terminal of Q1. The drain (D) terminal of Q1 connects to the Force_PWR interface, which can be connected to the Force_VCC interface of the piezoelectric sensor. The Force_VCC interface is the power supply interface for the piezoelectric sensor. Therefore, by enabling the FOR_PWR_EN interface in the headphone control module, Q1 is turned on, allowing power to be supplied to the piezoelectric sensor via the Force_PWR interface.
[0114] Furthermore, based on the above embodiments of this application, in another embodiment of this application, the same or similar content as the above embodiments can be referred to the above description, and will not be repeated hereafter. The headphone control method can also be applied to the headphone control module of a headphone, the headphone control module being connected to the headphone sensor control module, the sensor control module being connected to the piezoresistive sensor, and the headphone control module being connected to the piezoresistive sensor. The method includes step X10:
[0115] Step X10: Receive the piezoresistive sensor power supply request sent by the sensor control module and supply power to the piezoresistive sensor;
[0116] The sensor control module is used to periodically send a power supply request for the piezoresistive sensor to the headphone control module when the sensor control module is in polling mode, and to determine that the sensor control module enters the fast interrupt mode when a press event is detected by the piezoresistive sensor, or to determine that the sensor control module enters the fast interrupt mode when a preset touch operation is detected in the headphone.
[0117] The sensor control module is also used to determine the power supply to the piezoresistive sensor in fast interrupt mode, and to detect the press event of the earphone through the piezoresistive sensor;
[0118] The sensor control module is also used to determine, after the detection of the press event of the earphone is completed, to switch the sensor control module from fast interrupt mode to polling mode, and to determine to power off the piezoresistive sensor.
[0119] It should be noted that after receiving a power supply request from the piezoresistive sensor, the headphone control module can supply power to the piezoresistive sensor. When power is supplied to the piezoresistive sensor, the headphone's power supply timer will also start. This reduces unnecessary power consumption by the piezoresistive sensor, thereby improving the headphone's battery life.
[0120] For example, the headphone control module receives a power supply request for the piezoresistive sensor from the sensor control module, supplies power to the piezoresistive sensor, and simultaneously starts a power supply timer.
[0121] In a feasible embodiment, the headphone control method applied to the headphone control module further includes steps X11 to X12:
[0122] Step X11: When power is supplied to the piezoresistive sensor, the power supply timer of the headphones is started.
[0123] Step X12: When the power supply timer reaches the preset duration threshold, determine to perform power-off interruption control on the piezoresistive sensor.
[0124] Among them, the power supply request of the piezoresistive sensor has a higher priority than the power failure interruption control, and the duration of the preset fast request cycle in the fast interruption mode is less than the preset duration threshold.
[0125] It should be noted that the power-off interruption control represents the power-off of the piezoresistive sensor. When power is initially supplied to the piezoresistive sensor, the headphone control module starts the headphone's power-on timer. When the timer reaches a preset threshold, the headphone control module determines to initiate a power-off interruption for the piezoresistive sensor. However, the piezoresistive sensor power supply request has higher priority than the power-off interruption control, and the preset threshold duration is shorter than the preset fast request period. For example, the preset threshold duration could be 110ms, while the preset fast request period is 80ms. In fast interruption mode, a piezoresistive sensor power supply request is generated every 80ms. Before 110ms arrives, the headphone control module will receive another piezoresistive sensor power supply request, so it will respond to the piezoresistive sensor power supply request first. For each piezoresistive sensor power supply request, the headphone control module will continuously supply power to the piezoresistive sensor for at least the preset fast request period duration, for example, 80ms.
[0126] For example, in polling mode, the period of the power supply request for the piezoresistive sensor sent by the sensor control module is longer than the preset duration threshold. Therefore, in polling mode, after the sensor control module sends the power supply request for the piezoresistive sensor, the headphone control module will supply power to the piezoresistive sensor for a maximum of the preset duration threshold. After the preset duration threshold, the headphone control module will perform power-off interruption control on the piezoresistive sensor.
[0127] In this embodiment, the headphone control module receives a power supply request for the piezoresistive sensor from the sensor control module, supplies power to the piezoresistive sensor, and simultaneously starts a power supply timer. This reduces unnecessary power consumption by the piezoresistive sensor, thereby improving the headphone's battery life.
[0128] To better understand this embodiment, please refer to Figure 4 This document briefly describes the overall process of detecting pressure events in this embodiment. The SLOW mode is a polling mode, and the FAST mode is a fast interrupt mode. For example, in SLOW mode, the sensor control module may request power to the piezoresistive sensor every 5 seconds, corresponding to 100 data frames within 5 seconds. In FAST mode, the sensor control module may request power to the piezoresistive sensor every 80ms, corresponding to 4 data frames within 80ms. Step Z10 is executed: the sensor control module acquires data frames according to a preset acquisition cycle; for example, the sensor control module may periodically acquire data frames from the interface connected to the piezoresistive sensor according to a preset acquisition cycle, combined with... Figure 4From the circuit diagram, the sensor control module can periodically acquire data acquisition frames from the FORCE_P and FORCE_N interfaces. These frames include data from both interfaces. The sensor control module executes step Z20: whether the data acquisition frame belongs to SLOW mode; if so, it executes step Z30: incrementing the cumulative frame count in SLOW mode; then it executes step Z31: whether the cumulative frame count equals a preset polling threshold; if so, it executes step Z311: initiating a piezoresistive sensor power supply request, acquiring the piezoresistive acquisition frame through the piezoresistive sensor, and setting the frame count in FSAT mode to 0. The piezoresistive sensor power supply request is initiated by the sensor control module and sent to the headphone control module. When the piezoresistive sensor is powered, the sensor control module acquires the piezoresistive acquisition frame and sets the frame count in FSAT mode to 0. Finally, the sensor control module executes step Z3111: whether a press event exists in the piezoresistive acquisition frame. If there is no press event in the piezoresistive acquisition frame, the sensor control module executes step Z3112: return to step Z10. If there is a press event in the piezoresistive acquisition frame, the sensor control module executes step Z3113: the sensor control module enters FAST mode and acquires the piezoresistive acquisition frame through piezoresistive sensing, and executes step Z50; and the number of press frames can also be accumulated in step Z3113.
[0129] If the cumulative frame count is not equal to the preset polling threshold, the sensor control module executes step Z312: whether the cumulative frame count is greater than the preset polling threshold; if the cumulative frame count is greater than the preset polling threshold, then execute step Z3121: refresh the cumulative frame count of data acquisition frames in SLOW mode, for example, the cumulative frame count in SLOW mode can be set to 0, and then execute step Z3122: initiate a power-off interrupt request to shut down the power supply to the piezoresistive sensor. End. If the cumulative frame count is less than the preset polling threshold, then execute step Z3112: return to execute step Z10.
[0130] If the data acquisition frame does not belong to SLOW mode, it indicates that the data acquisition frame belongs to FAST mode. The sensor control module executes step Z40: the data acquisition frame belongs to FAST mode, and this data acquisition frame is used as a piezoresistive acquisition frame. The sensor control module executes step Z50: whether the frame count value is equal to the preset acquisition threshold; if the frame count value is equal to the preset acquisition threshold, the sensor control module executes step Z52: the frame count value of the piezoresistive acquisition frame in FAST mode is set to 0. If the frame count value is not equal to the preset acquisition threshold, step Z51: the frame count value of the piezoresistive acquisition frame in FAST mode is incremented by 1. The sensor control module executes step Z511: detect whether there is a press event in the piezoresistive acquisition frame; if there is a press event in the piezoresistive acquisition frame, step Z512: the press frame count is incremented by 1; then step Z513: whether the frame count value is greater than the preset acquisition threshold and not equal to the preset acquisition threshold. If the frame count is greater than the preset acquisition threshold but not equal to it, then step Z514 is executed: after a preset delay, the sensor control module switches from FAST mode to SLOW mode, sets the frame count to 0, and initiates a power-off interrupt request to determine whether to power off the piezoresistive sensor. For example, the sensor control module initiates a power-off interrupt request to enable the headphone control module to power off the piezoresistive sensor, thus achieving power-off control of the piezoresistive sensor. If the frame count is less than the preset acquisition threshold but not equal to it, then step Z515 is executed: continue acquiring piezoresistive acquisition frames in FAST mode and return to step Z50.
[0131] This invention also provides an earphone control device 30, see reference. Figure 5 The headphone control device 30 includes:
[0132] The sensor control module 10 is configured to periodically send a power supply request for the piezoresistive sensor to the headphone control module to periodically power the piezoresistive sensor when the sensor control module is in polling mode, and determine that the sensor control module enters fast interrupt mode when a press event is detected by the piezoresistive sensor, or determine that the sensor control module enters fast interrupt mode from polling mode when a preset touch operation is detected in the headphones; in fast interrupt mode, it is determined to continuously power the piezoresistive sensor and detect the press event of the headphones through the piezoresistive sensor; after determining that the press event of the headphones has been detected, it is determined that the sensor control module switches from fast interrupt mode to polling mode and determines to power off the piezoresistive sensor;
[0133] The headphone control module 20 is used to receive the piezoresistive sensor power supply request sent by the sensor control module and to supply power to the piezoresistive sensor.
[0134] The headphone control device provided by this invention, employing the headphone control method in the above embodiments, can solve the technical problem of poor headphone battery life. Compared with the prior art, the beneficial effects of the headphone control device provided by this invention are the same as those of the headphone control method provided in the above embodiments, and other technical features in the headphone control device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0135] The headphone control device may also include a sliding detection module and a wearing / loosening detection module; the sensor control module, the headphone control module, and the piezoresistive sensor are interconnected, and the sliding detection module and the wearing / loosening detection module are connected to the sensor control module.
[0136] This application also provides an earphone, which includes: an earphone control device, a memory, a processor, and an earphone control program stored in the memory and executable on the processor. The earphone control device includes a sensor control module, an earphone control module, a piezoresistive sensor, a slip detection module, and a wear-off detection module. The sensor control module, the earphone control module, and the piezoresistive sensor are interconnected. The slip detection module and the wear-off detection module are connected to the sensor control module. When the earphone control program is executed by the processor, it enables at least one processor to execute the earphone control method described in the above embodiments.
[0137] The following is for reference. Figure 7 The diagram shows a structural schematic of an earphone suitable for implementing embodiments of this application. Figure 7 The headphones shown are merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of this application.
[0138] like Figure 7As shown, the headphones may include a processing device 101 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 102 or a program loaded from storage device 103 into random access memory (RAM) 104. The RAM 104 also stores various programs and data required for headphone operation. The processing device 101, ROM 102, and RAM 104 are interconnected via a bus 105. An input / output (I / O) interface 106 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 106: input devices 107 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 108 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 103 including, for example, magnetic tapes, hard disks, etc.; and headphone control devices 109. The headphone control device 109 allows the headphones to communicate wirelessly or wiredly with other devices to exchange data. Although the diagram shows headphones with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems may be implemented alternatively.
[0139] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a headphone control device, or installed from storage device 103, or installed from ROM 102. When the computer program is executed by processing device 101, it performs the functions defined in the methods of the embodiments of this application.
[0140] The headphones provided in this application, employing the headphone control method described in the above embodiments, can solve the technical problem of poor headphone battery life. Compared with the prior art, the beneficial effects of the headphones provided in this application are the same as those of the headphone control method described in the above embodiments, and other technical features of the headphones are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0141] It should be understood that various parts of the embodiments of this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0142] The above are merely specific embodiments of this application, but the protection scope of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application. Therefore, the protection scope of this application should be determined by the protection scope of the above claims.
[0143] This invention provides a computer-readable storage medium including computer-readable program instructions stored thereon, which are used to execute the headphone control method in Embodiment 1 above.
[0144] The computer-readable storage medium provided in this embodiment of the invention may be, for example, a USB flash drive, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to, electrical connections including one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0145] The aforementioned computer-readable storage medium may be included in the headphone control device; or it may exist independently and not assembled into the headphone control device.
[0146] The aforementioned computer-readable storage medium carries one or more programs. When the one or more programs are executed by the headphone control device, the headphone control device causes the following: when the sensor control module is in polling mode, the headphone control device periodically sends a piezoresistive sensor power supply request to the headphone control module to periodically supply power to the piezoresistive sensor; when a press event is detected by the piezoresistive sensor, the headphone control module is determined to enter a fast interrupt mode, or when a preset touch operation is detected in the headphone, the headphone control module is controlled to enter a fast interrupt mode; in fast interrupt mode, the headphone control module is determined to continuously supply power to the piezoresistive sensor and detects the press event of the headphone through the piezoresistive sensor; after the press event detection of the headphone is completed, the headphone control module is determined to switch from fast interrupt mode to polling mode, and the headphone control module is determined to power off the piezoresistive sensor.
[0147] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0148] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0149] The modules described in the embodiments of this disclosure can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0150] The readable storage medium provided by this invention is a computer-readable storage medium that stores computer-readable program instructions for executing the above-described headphone control method, thereby solving the technical problem of poor headphone battery life. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this invention are the same as those of the headphone control method provided in the above-described embodiments, and will not be repeated here.
[0151] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the headphone control method described above.
[0152] The computer program product provided by this invention can solve the technical problem of poor battery life of headphones. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiments of this invention are the same as the beneficial effects of the headphone control method provided in the above embodiments, and will not be repeated here.
[0153] The above are merely preferred embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent scope of the present invention.
Claims
1. A headphone control method, characterized in that, A sensor control module for use in headphones, wherein the sensor control module is electrically connected to the headphone control module and the piezoresistive sensor of the headphones, and the headphone control method includes: When the sensor control module is in polling mode, it periodically sends a piezoresistive sensor power supply request to the headphone control module to periodically power the piezoresistive sensor. When a press event is detected by the piezoresistive sensor, the sensor control module enters fast interrupt mode. Alternatively, when a preset touch operation is detected on the headphone, the sensor control module enters fast interrupt mode from polling mode. In the fast interrupt mode, it is determined that the piezoresistive sensor is continuously powered, and the press event of the earphone is detected through the piezoresistive sensor; After determining that the press event of the earphone has been detected, the sensor control module switches from the fast interrupt mode to the polling mode and determines to power off the piezoresistive sensor.
2. The headphone control method as described in claim 1, characterized in that, The steps of periodically sending a piezoresistive sensor power supply request to the headphone control module to periodically power the piezoresistive sensor when the sensor control module is in polling mode, and entering a fast interrupt mode when a press event is detected by the piezoresistive sensor, include: When the headphones are in the wearing state, data acquisition frames are acquired according to a preset acquisition cycle, and the cumulative number of data acquisition frames acquired when the sensor control module is in polling mode is accumulated. When the cumulative number of frames equals a preset polling threshold, a power supply request for the piezoresistive sensor is sent to the headphone control module to periodically supply power to the piezoresistive sensor. Acquire piezoresistive acquisition frames collected by the piezoresistive sensor, and detect whether a press event exists in the piezoresistive acquisition frames; If a press event is detected in the piezoresistive acquisition frame, the sensor control module enters a fast interrupt mode.
3. The headphone control method as described in claim 2, characterized in that, After the step of acquiring the piezoresistive acquisition frame through the piezoresistive sensor and detecting the pressing event of the earphone through the piezoresistive acquisition frame, the method further includes: If no press event is detected, the data acquisition frame is acquired according to the preset acquisition period, and the cumulative frame number is accumulated. When the cumulative frame count exceeds a preset polling threshold, the cumulative frame count is reset, and a power-off interruption request is sent to the headphone control module to shut off the power supply to the piezoresistive sensor.
4. The headphone control method as described in claim 1, characterized in that, The earphone also includes a slide detection module, which includes a capacitive sensor disposed at the end of the earphone stem, and the slide detection module is connected to the sensor control module; The step of the sensor control module entering the fast interrupt mode from the polling mode when a preset touch operation is detected in the earphone includes: When the earphone is in the wearing state and the capacitance value detected by the capacitance sensor at the end of the ear stem is greater than a preset capacitance threshold, it is determined that the earphone has a preset touch operation. The sensor control module transitions from the polling mode to the fast interrupt mode.
5. The headphone control method as described in claim 4, characterized in that, The sliding detection module includes at least two capacitive sensors, which are sequentially disposed on the earpiece of the earphone. The at least two capacitive sensors include a capacitive sensor disposed at the end of the earpiece and a capacitive sensor disposed at the beginning of the earpiece. The method further includes: Obtain the capacitance values detected by each capacitance sensor in the sliding detection module; If the capacitance value detected by each of the aforementioned capacitive sensors is greater than a preset sliding threshold, the absolute value of the difference between the times when two adjacent capacitive sensors detect capacitance values greater than the preset sliding threshold is greater than a preset time interval, and the time when the capacitance value detected by the capacitive sensor at the head of the ear stem is greater than the preset sliding threshold is earlier than the time when the capacitance value detected by the capacitive sensor at the tail of the ear stem is greater than the preset sliding threshold, then it is determined that the earphone has a sliding event. If the capacitance value detected by each of the aforementioned capacitive sensors is greater than a preset sliding threshold, the absolute value of the difference between the times when two adjacent capacitive sensors detect capacitance values greater than the preset sliding threshold is greater than a preset time interval, and the time when the capacitance value detected by the capacitive sensor at the head of the ear stem is greater than the preset sliding threshold is later than the time when the capacitance value detected by the capacitive sensor at the tail of the ear stem is greater than the preset sliding threshold, then it is determined that the earphone has an upward sliding event.
6. The headphone control method as described in claim 1, characterized in that, The step of determining to continuously power the piezoresistive sensor and detecting the press event of the earphone through the piezoresistive sensor in the fast interrupt mode includes: According to a preset fast request cycle, a power supply request for the piezoresistive sensor is sent to the headphone control module to determine that the piezoresistive sensor is continuously powered in fast interrupt mode. Acquire the piezoresistive acquisition frames collected by the piezoresistive sensor, and accumulate the frame count value of the piezoresistive acquisition frames; The piezoresistive acquisition frames are detected, and the number of press frames with press events is accumulated. When the frame count value reaches a preset acquisition threshold, the frame count value is reset to determine that the press event detection of the earphone is complete.
7. The headphone control method as described in claim 1, characterized in that, The step of the sensor control module switching from the fast interrupt mode to the polling mode and determining to power off the piezoresistive sensor after the detection of the press event of the earphone is completed includes: After the press event detection of the earphone is completed, after a preset delay, the sensor control module switches from the fast interrupt mode to the polling mode and sends a power-off interrupt request to the earphone control module to determine to perform power-off control on the piezoresistive sensor.
8. The headphone control method as described in claim 1, characterized in that, The earphones also include a wear-off detection module, which is connected to a sensor control module. The wear-off detection module includes at least two detection units, each including a reference capacitance sensor and a detection capacitance sensor. The method further includes: For each detection unit, the reference value detected by the reference capacitance sensor and the capacitance detection value detected by the detection capacitance sensor in the detection unit are obtained. The detection difference value corresponding to the detection unit is obtained by calculating the difference between the capacitance detection value and the reference value; When the detection difference corresponding to all the detection units is greater than the preset wearing threshold, it is determined that the earphone is in a wearing state; When the detection difference corresponding to all the detection units is less than the preset detachment threshold, the earphone is determined to be in a detached state.
9. An earphone, characterized in that, The headphones include a headphone control device, a memory, a processor, and a headphone control program stored in the memory and executable on the processor. The headphone control device includes a sensor control module, a headphone control module, a piezoresistive sensor, a slip detection module, and a wear / drop detection module. The sensor control module, the headphone control module, and the piezoresistive sensor are interconnected. The slip detection module and the wear / drop detection module are connected to the sensor control module. When the headphone control program is executed by the processor, it performs the steps of the headphone control method as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The device stores a headphone control program that can run on a processor, the headphone control program being invoked by the processor to implement the steps of the headphone control method according to any one of claims 1-8.