WO2023159715A1 - 耳机控制方法、装置、耳机设备及存储介质 - Google Patents

耳机控制方法、装置、耳机设备及存储介质 Download PDF

Info

Publication number
WO2023159715A1
WO2023159715A1 PCT/CN2022/084588 CN2022084588W WO2023159715A1 WO 2023159715 A1 WO2023159715 A1 WO 2023159715A1 CN 2022084588 W CN2022084588 W CN 2022084588W WO 2023159715 A1 WO2023159715 A1 WO 2023159715A1
Authority
WO
WIPO (PCT)
Prior art keywords
magnetic flux
value
earphone
earphone device
duration
Prior art date
Application number
PCT/CN2022/084588
Other languages
English (en)
French (fr)
Inventor
马冬梅
Original Assignee
歌尔股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 歌尔股份有限公司 filed Critical 歌尔股份有限公司
Publication of WO2023159715A1 publication Critical patent/WO2023159715A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1041Mechanical or electronic switches, or control elements
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R33/00Arrangements or instruments for measuring magnetic variables
    • G01R33/02Measuring direction or magnitude of magnetic fields or magnetic flux
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1091Details not provided for in groups H04R1/1008 - H04R1/1083

Definitions

  • the present application relates to the technical field of earphones, and in particular to an earphone control method, device, earphone equipment, and a storage medium.
  • buttons on a small earphone to control various functions requires a high implementation process, and the buttons are small and inconvenient for users to operate.
  • the main purpose of the present application is to provide an earphone control method, device, earphone device, and storage medium, aiming to provide an earphone control method different from traditional buttons, and to improve the user's operating experience in earphone control.
  • the present application provides a method for controlling earphones, which is applied to earphone devices, where a magnet and a magnetic flux sensor that can change the distance by pressing the earphone device are provided, and the method includes the following steps:
  • the step of determining the user's operation type on the earphone device according to the magnetic flux value includes:
  • the user's operation type on the earphone device is a click type
  • the user's operation type on the earphone device is a long press type.
  • the method also includes:
  • the average value of the magnetic flux values in which the extreme difference is smaller than the second preset threshold lasts for the second duration is set as a new reference value.
  • the step of determining the user's operation type on the earphone device according to the magnetic flux value includes:
  • the type of operation of the earphone device by the user is determined.
  • the step of obtaining the preset magnetic flux range it also includes:
  • the initial magnetic flux value is acquired through the magnetic flux sensor
  • the distance range is obtained by adding the preset distance range on the basis of the initial distance
  • the step of determining the user's operation type on the earphone device according to the magnetic flux value includes:
  • the user's operation type on the earphone device is determined according to the magnetic flux values that are all in the magnetic flux range and last for the third duration.
  • obtaining the magnetic flux value through the magnetic flux sensor specifically includes:
  • the original value collected by the magnetic flux sensor is gained by using the gain value as the obtained magnetic flux value, wherein the gain value is obtained by calculating the ratio of the third preset threshold value to the initial value.
  • the gain value is obtained by calculating the ratio of the third preset threshold value to the initial value.
  • the present application also provides an earphone control device, which is deployed on the earphone device.
  • the earphone device is provided with a magnet and a magnetic flux sensor that can change the distance by pressing the earphone device.
  • the device includes:
  • An acquisition module configured to acquire a magnetic flux value through a magnetic flux sensor
  • the determining module is configured to determine the user's operation type on the earphone device according to the magnetic flux value, so as to control the earphone device according to the operation type.
  • the present application also provides an earphone device.
  • the earphone device includes: a memory, a processor, and an earphone control program stored in the memory and operable on the processor. When the earphone control program is executed by the processor, the above The steps of the headset control method.
  • the present application also proposes a computer-readable storage medium, on which a headphone control program is stored, and when the headphone control program is executed by a processor, the above steps of the headphone control method are realized.
  • the magnetic flux value is obtained through the magnetic flux sensor, and the user's operation type of the earphone device is determined according to the magnetic flux value, so as to control the earphone according to the operation type.
  • the device is controlled, and a new earphone device control method is implemented.
  • the realization process of using the magnetic flux sensor and the magnet in this application is simpler, and the operation of the user pressing the earphone device is more convenient.
  • FIG. 1 is a schematic flow chart of the first embodiment of the earphone control method of the present application
  • Fig. 2 is a schematic diagram of the installation positions of magnets and magnetic flux sensors in an earphone device according to an embodiment of the present application;
  • FIG. 3 is a schematic diagram of an operation type identification process of an earphone device involved in an embodiment of the present application
  • Fig. 4 is a schematic diagram of functional modules of a preferred embodiment of the headphone control device of the present application.
  • FIG. 1 is a schematic flowchart of a first embodiment of a method for controlling an earphone according to the present application.
  • the embodiment of the present application provides an embodiment of the headphone control method. It should be noted that although the logic sequence is shown in the flow chart, in some cases, the sequence shown or described can be executed in a sequence different from that shown here. A step of.
  • the earphone control method in the embodiment of the present application is applied to the earphone device, and the earphone device is provided with a magnet and a magnetic flux sensor whose separation distance can be changed by pressing the earphone device.
  • the earphone control method includes:
  • Step S10 acquiring the magnetic flux value through the magnetic flux sensor
  • a headphone control method for inductive magnetic flux is proposed, using the principle that the magnetic flux sensor can sense the magnetic flux of the surrounding environment, a magnet and a magnetic flux sensor that can change the distance by pressing the earphone device are set in the earphone device, and the user presses the earphone Device, make the magnetic flux sensor on the earphone device far away from or close to the magnet, so that the magnetic flux induced by the magnetic flux sensor will change.
  • different operation types such as short press, long press, and double click of the user are identified, and then the operation based on the recognition Type to control the headset device.
  • the present embodiment does not limit the setting position and setting method of the magnet and the magnetic flux sensor in the earphone device, that is, as long as the setting position and setting method can make the distance between the magnet and the magnetic flux sensor when the earphone device is pressed be There are changes.
  • the magnet may be a magnet or other materials or devices capable of generating a magnetic field, which is not limited in this embodiment.
  • pressing the earphone device may specifically refer to pressing the shell of the earphone device or pressing a magnet or magnetic flux sensor pasted or embedded on the shell of the earphone device, and the specific pressing position is not limited in this embodiment .
  • the magnetic flux sensor is directly pasted on the main board, and a magnet is pasted on the shell of the earphone device.
  • the shell of the earphone device When the user presses the shell of the earphone device, the shell of the earphone device will be slightly deformed. A change in magnetic flux occurs as the magnet moves away from or approaches the sensor.
  • the magnetic flux sensor and the magnet can be connected by a spring and then embedded in the housing of the earphone device. By pressing the magnetic flux sensor or magnet exposed on the housing, the spring is deformed, thereby causing the magnet to move away from or approach sensor.
  • the magnetic flux value can be acquired by the magnetic flux sensor.
  • the acquired magnetic flux value may be a raw value collected by the magnetic flux sensor, or a value obtained by processing the collected raw value. Processing the original value may be to perform gain processing or noise removal processing, etc., which is not limited here.
  • the magnetic flux value obtained by the magnetic flux sensor may be obtained at a certain frequency, for example, once every 50 ms.
  • the size of the frequency can be preset according to the needs. For example, when the power saving requirement of the earphone device is high, the frequency can be set slower; when the operation sensitivity of the earphone device is required to be high, the frequency can be set faster.
  • the set values are not limited in this embodiment.
  • obtaining the magnetic flux value through the magnetic flux sensor specifically includes:
  • the original value collected by the magnetic flux sensor is gained by using the gain value as the obtained magnetic flux value, wherein the gain value is obtained by calculating the ratio of the third preset threshold value to the initial value.
  • the gain value is obtained by calculating the ratio of the third preset threshold value to the initial value.
  • performing gain by using a gain value on the original value may be specifically multiplying the original value by the gain value to obtain a magnetic flux value after gain.
  • the original value which is used as the initial value to calculate the gain value. That is, divide the third preset threshold by the initial value to obtain the gain value.
  • the third preset threshold can be set according to experience, for example, if it is set to 8000, and the initial value is Magnetic, then the calculated gain value is 8000/Magnetic.
  • the gain value can be calculated, and the gain value can be used to gain the original value collected by the magnetic flux sensor and then used as the obtained magnetic flux value to participate in subsequent processing and calculation.
  • Step S20 determine the user's operation type on the earphone device according to the magnetic flux value, so as to control the earphone device according to the operation type.
  • the earphone device may determine the user's operation type on the earphone device according to the magnetic flux value.
  • the operation type may include a click type, a long press type, etc., or the click type may be further divided into a single click type, a double click type, and the like.
  • the obtained magnetic flux value can be compared with a preset threshold value, and if the obtained magnetic flux values within a certain continuous period are greater than the threshold value, the operation type can be considered as a long press type.
  • the specific control content of controlling the earphone device according to the operation type is related to the current working scene of the earphone device.
  • the earphone device is currently in a call scene, and it is preset that when a long press type operation is detected, the earphone device ends the call, then When it is determined in the call scene that the user's operation type on the earphone device is a long press, the earphone device ends the current call.
  • the magnetic flux value is obtained through the magnetic flux sensor, and the user's operation type of the earphone device is determined according to the magnetic flux value. Controlling the earphone device realizes a new control method for the earphone device. Compared with the control method using the traditional button, the implementation process of using the magnetic flux sensor and the magnet in this embodiment is relatively simple, and the operation of the user pressing the earphone device is more convenient. .
  • step S20 includes:
  • Step S201 acquiring the currently set reference value
  • the operation types in the earphone device can be divided into click type and long press type.
  • a reference value currently set in the earphone device may be obtained, so as to compare the magnetic flux value with the currently set reference value.
  • the reference value may be a value set in the earphone device based on experience in advance, so as to represent the magnetic flux value that the earphone device can obtain by using the magnetic flux sensor under the condition of no external force pressing.
  • Step S202 counting the first duration of the state in which the difference between each magnetic flux value obtained continuously according to the preset frequency and the reference value is greater than the first preset threshold
  • the earphone device obtains the magnetic flux value according to the preset frequency, calculates a difference value every time a magnetic flux value is obtained, compares the calculated difference value with the first preset threshold value, determines whether the difference value is greater than the first preset threshold value, and The duration of the state in which the differences between the continuously acquired magnetic flux values and the reference value are greater than the first preset threshold is counted, and the statistical duration is recorded as the first duration. For example, when the preset frequency is once every 50 ms, and the differences between the 20 magnetic flux values acquired in a continuous 1 second and the reference value are all greater than the first preset threshold, then the statistically obtained first duration is 1 second .
  • the first preset threshold can be set as required, and when the difference is greater than the first preset threshold, it indicates that the earphone device is pressed.
  • the first preset threshold is set smaller, the sensitivity of the earphone device to detect being pressed is very high. big.
  • Step S203 if the first duration exceeds the first preset duration and is less than the second preset duration, determine that the user's operation type on the earphone device is a click type;
  • the earphone device may determine that the user's operation type on the earphone device is a click operation.
  • the first preset duration and the second preset duration can be set as required, and the first preset duration is set to be smaller than the second preset duration, for example, as shown in Figure 3, the first preset duration is set to 0.5 Seconds, the second preset duration is set to 1.5 seconds, that is, when the difference between the magnetic flux value and the reference value is greater than the first preset threshold, it indicates that the earphone device is pressed, and when this state lasts for 0.5 seconds and less than 1.5 seconds, It indicates that the user presses the earphone device for a short time, and the press operation can be determined as a click type operation.
  • a time stamp may be recorded for the identified click-type operation, for example, the acquisition time of the last magnetic flux value whose difference from the reference value is greater than the threshold value is taken as the occurrence time of the click-type operation,
  • the acquisition time of the last magnetic flux value whose difference from the reference value is greater than the threshold value is taken as the occurrence time of the click-type operation.
  • step S204 if the first duration exceeds the second preset duration and is less than the third preset duration, it is determined that the user's operation type on the earphone device is a long press type.
  • the earphone device may determine that the user's operation type on the earphone device is a click operation.
  • the third preset duration can be set as required, and the third preset duration is set to be greater than the second preset duration, for example, as shown in Figure 3, the second preset duration is set to 1.5 seconds, the third preset The duration is set to 3 seconds, that is, when the difference between the magnetic flux value and the reference value is greater than the first preset threshold, it indicates that the earphone device is pressed, and when this state lasts for 1.5 seconds and less than 3 seconds, it indicates that the user is not interested in the earphone device.
  • a long press is performed, and the press operation may be determined as a long press operation.
  • the earphone device can It is determined that the user has not operated the earphone device or the operation type is empty, and then no processing is performed, or the earphone device may also report an error prompt.
  • the method also includes:
  • Step S30 counting the second duration of the state in which the extreme difference of each magnetic flux value obtained continuously according to the preset frequency is smaller than the second preset threshold
  • the irreversible deformation of the shell may make the distance between the magnet and the magnetic flux sensor smaller than the distance between the factory, so in the specific implementation
  • the reference value set in the earphone device can also be set in real time according to the magnetic flux value actually acquired by the earphone device.
  • the earphone device may count the duration of a state in which the extreme difference of each magnetic flux value obtained continuously according to a preset frequency is smaller than the second preset threshold lasts, to obtain the second duration. That is to say, calculate the extreme difference between the various magnetic flux values obtained continuously according to the preset frequency, and start timing when a calculated extreme difference is less than the second preset threshold value, and every time a new magnetic flux value is acquired, it will be equal to the extreme difference less than the second threshold value.
  • Each old magnetic flux value of the preset threshold recalculates the range, and when the recalculated range is still less than the second preset threshold, the timing is continued, and when the recalculated range is not less than the second preset threshold, the timing is stopped to obtain Second duration.
  • Step S40 if the second duration exceeds the third preset duration, then set the average value of each magnetic flux value for the second duration in which the extreme difference is smaller than the second preset threshold for the second duration as a new reference value.
  • the earphone device may set the average value of each magnetic flux value whose extreme difference is smaller than the second preset threshold and lasts for the second duration as a new reference value.
  • the third preset duration can be set as required, when the second duration of the state in which the extreme difference of each magnetic flux value obtained continuously according to the preset frequency is smaller than the second preset threshold exceeds the third preset duration, the explanation
  • the magnetic flux value obtained by the magnetic flux sensor tends to be stable for a long time without much change. It can be considered as the magnetic flux value that can be obtained when the earphone device is in the case of no pressing. At this time, the average value of each magnetic flux value that tends to be stable is set as the new value.
  • the benchmark value can improve the detection accuracy of the earphone device for the user's pressing operation.
  • step S20 includes:
  • Step S205 acquiring a preset magnetic flux range
  • a magnetic flux range can be set to exclude magnetic flux values that are not within the magnetic flux range, so as to avoid inaccurate user operation detection caused by inaccurate magnetic flux detection.
  • the flux range can be preset in the headphone device.
  • the maximum value of the magnetic flux range can represent the magnetic flux value obtained by the magnetic flux sensor when the user presses the earphone device with maximum force in an environment where there is no external magnetic field interference and no external force to press the earphone device. Magnetic interference.
  • the minimum value of the magnetic flux range can be 0 or greater than 0. When it is set larger, it can be used to prevent the user's touch action from triggering the control operation on the earphone device by mistake.
  • Step S206 when the magnetic flux value is within the magnetic flux range, determine that the magnetic flux value is valid data
  • Step S207 determining the user's operation type on the earphone device according to the magnetic flux value belonging to the valid data.
  • the earphone device may compare the magnetic flux value with the magnetic flux range to determine whether the magnetic flux value is within the magnetic flux range. If the magnetic flux value is within the magnetic flux range, it can be determined that the magnetic flux value is valid data, and the user operation type can be determined by using the magnetic flux value.
  • the method also includes:
  • Step S50 when it is determined that the earphone device is in an environment with no external magnetic field interference and no external force pressing, the initial magnetic flux value is obtained through the magnetic flux sensor;
  • the magnetic flux range can also be set according to the magnetic flux value actually obtained by the earphone device.
  • the earphone device determines that the earphone device is in an environment with no external magnetic field interference and no external force pressing, the magnetic flux value is acquired by the magnetic flux sensor (hereinafter referred to as the initial magnetic flux value for the sake of distinction).
  • the earphone device can output prompt information to remind the user to place the earphone device in an environment without external magnetic field interference and no external force pressing. External magnetic field interference and no external pressure environment.
  • Step S60 calculating the initial distance between the magnet and the magnetic flux sensor according to the initial magnetic flux value
  • the earphone device can calculate the initial distance between the magnet and the magnetic flux sensor according to the initial magnetic flux.
  • calculating the distance according to the magnetic flux value may be calculated according to a preset conversion formula between the magnetic flux value and the distance, which is not limited here.
  • Step S70 adding a preset distance range on the basis of the initial distance to obtain a distance range
  • a preset distance range can be added to the initial distance to obtain a distance range. For example, if the initial distance is 0.5cm, and the distance change range is 10 ⁇ m to 20 ⁇ m, then the distance range is 0.5cm+10 ⁇ m to 0.5cm+20 ⁇ m, among which, setting 10 ⁇ m is to avoid the minimum change limit to avoid user false triggering, that is , when the distance change is greater than 10 ⁇ m, it is considered that the user is pressing the earphone device.
  • Step S80 calculating the magnetic flux range according to the distance range.
  • the magnetic flux range can be calculated according to the distance range.
  • the minimum value in the magnetic flux range can be calculated according to the conversion formula between the magnetic flux value and the distance according to the minimum value of the distance range, and the magnetic flux range can be obtained according to the conversion formula between the magnetic flux value and the distance according to the maximum value of the distance range. the maximum value.
  • step S20 includes:
  • Step S208 obtaining a preset magnetic flux range
  • the earphone device may only use the acquired magnetic flux value to determine the user's operation type on the earphone device when the acquired magnetic flux values for a period of time are all in the magnetic flux range.
  • the earphone device may acquire a magnetic flux range, and the magnetic flux range may be preset in the earphone device, or may be set according to a magnetic flux value actually acquired by the earphone device.
  • Step S209 counting the third duration of the state in which each magnetic flux value continuously acquired according to the preset frequency is in the magnetic flux range
  • the earphone device can count the duration of each magnetic flux value continuously acquired according to the preset frequency in the state of the magnetic flux range, which is recorded as the third duration. That is to say, the earphone device starts timing when it detects that a magnetic flux value is in the magnetic flux range, and each time a new magnetic flux value is acquired, it is judged whether the magnetic flux value is in the magnetic flux range, if it is in the magnetic flux range, then continue timing, if not In the magnetic flux range, stop timing.
  • Step S2010 if the third duration exceeds the fourth preset duration, determine the user's operation type for the earphone device according to the magnetic flux values that are all in the magnetic flux range and last for the third duration.
  • the earphone device may determine the user's operation type on the earphone device according to the magnetic flux values that are all in the magnetic flux range for the third duration.
  • the fourth preset duration can be set as required, for example, set to 1 second.
  • the earphone device may determine each magnetic flux value as invalid data without processing.
  • the earphone device may also filter out part of the magnetic flux generated by the external magnetic field in the magnetic flux value through an algorithm.
  • a magnetic flux sensor may be installed in a user terminal such as a smart phone, and when the magnetic flux value acquired by the earphone device is greater than the maximum value of the magnetic flux range, the earphone device may acquire the magnetic flux value acquired by the magnetic flux sensor in the user terminal connected to the earphone device, The magnetic flux value obtained by the magnetic flux sensor in the earphone device is subtracted from the magnetic flux value obtained by the magnetic flux sensor in the user terminal, and the user's operation type on the earphone device is determined according to the calculation result.
  • the embodiment of the present application also proposes an earphone control device.
  • the device is deployed on the earphone device.
  • the earphone device is provided with a magnet and a magnetic flux sensor that can change the distance by pressing the earphone device.
  • the device includes:
  • An acquisition module 10 configured to acquire a magnetic flux value through a magnetic flux sensor
  • the determination module 20 is configured to determine the user's operation type on the earphone device according to the magnetic flux value, so as to control the earphone device according to the operation type.
  • determining module 20 is also used for:
  • the user's operation type on the earphone device is a click type
  • the user's operation type on the earphone device is a long press type.
  • the device also includes:
  • a statistical module configured to count the second duration of the state in which the extreme difference of each magnetic flux value obtained continuously according to the preset frequency is less than the second preset threshold
  • the setting module is used to set the average value of each magnetic flux value for the second duration in which the extreme difference is smaller than the second preset threshold for the second duration if the second duration exceeds the third preset duration as a new reference value.
  • determining module 20 is also used for:
  • the type of operation of the earphone device by the user is determined.
  • the obtaining module 10 is also used for:
  • the initial magnetic flux value is obtained through the magnetic flux sensor
  • the device also includes:
  • the calculation module is used to calculate the initial distance between the magnet and the magnetic flux sensor according to the initial magnetic flux value; add the preset distance variation range to the initial distance to obtain the distance range; calculate the magnetic flux range according to the distance range.
  • determining module 20 is also used for:
  • the user's operation type on the earphone device is determined according to the magnetic flux values that are all in the magnetic flux range and last for the third duration.
  • the obtaining module 10 is also used for:
  • the original value collected by the magnetic flux sensor is gained by using the gain value as the obtained magnetic flux value, wherein the gain value is obtained by calculating the ratio of the third preset threshold value to the initial value.
  • the gain value is obtained by calculating the ratio of the third preset threshold value to the initial value.
  • the expanded content of the specific implementation of the earphone control device of the present application is basically the same as that of the above-mentioned embodiments of the earphone control method, and will not be repeated here.
  • the earphone device of the present application includes a structural housing, a communication module, a main control module (such as a micro control unit MCU), a speaker, a microphone, a memory, and the like.
  • the earphone device is provided with a magnet and a magnetic flux sensor whose separation distance can be changed by pressing the earphone device.
  • the main control module can include a microprocessor, audio decoding unit, power supply and power management unit, sensors and other active or passive components required by the system (can be replaced, deleted or added according to actual functions), to achieve wireless audio receiving and playing functions.
  • the headset device can establish a communication connection with the user terminal through the communication module.
  • An earphone control program can be stored in the memory of the earphone, and the microprocessor can be used to call the earphone control program stored in the memory, and perform the following operations:
  • the operation of determining the user's operation type on the earphone device according to the magnetic flux value includes:
  • the user's operation type on the earphone device is a click type
  • the user's operation type on the earphone device is a long press type.
  • microprocessor can also be used to call the earphone control program stored in the memory, and perform the following operations:
  • the average value of the magnetic flux values in which the extreme difference is smaller than the second preset threshold lasts for the second duration is set as a new reference value.
  • the operation of determining the user's operation type on the earphone device according to the magnetic flux value includes:
  • the type of operation of the earphone device by the user is determined.
  • the microprocessor can also be used to call the earphone control program stored in the memory, and perform the following operations:
  • the initial magnetic flux value is obtained through the magnetic flux sensor
  • the distance range is obtained by adding the preset distance range on the basis of the initial distance
  • the operation of determining the user's operation type on the earphone device according to the magnetic flux value includes:
  • the user's operation type on the earphone device is determined according to the magnetic flux values that are all in the magnetic flux range and last for the third duration.
  • obtaining the magnetic flux value through the magnetic flux sensor specifically includes:
  • the original value collected by the magnetic flux sensor is gained by using the gain value as the obtained magnetic flux value, wherein the gain value is obtained by calculating the ratio of the third preset threshold value to the initial value.
  • the gain value is obtained by calculating the ratio of the third preset threshold value to the initial value.
  • the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation.
  • the technical solution of the present application can be embodied in the form of a software product in essence or the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to make a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of the present application.
  • a terminal device which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Condensed Matter Physics & Semiconductors (AREA)
  • General Physics & Mathematics (AREA)
  • Headphones And Earphones (AREA)

Abstract

一种耳机控制方法、装置、耳机设备及存储介质,耳机控制方法应用于耳机设备,耳机设备中设置有可通过按压耳机设备而改变相隔距离的磁体和磁通量传感器,方法包括以下步骤:通过磁通量传感器获取磁通量值(S10);根据磁通量值确定用户对耳机设备的操作类型,以根据操作类型对耳机设备进行控制(S20)。耳机设备控制方法相比于采用传统按键的控制方法,采用磁通量传感器和磁体的实现工艺较简单,用户按压耳机设备的操作更加方便。

Description

耳机控制方法、装置、耳机设备及存储介质
本申请要求于2022年02月28日提交中国专利局、申请号202210192999.9、申请名称为“耳机控制方法、装置、耳机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及耳机技术领域,尤其涉及一种耳机控制方法、装置、耳机设备及存储介质。
背景技术
众所周知,用户使用耳机听音乐或者打电话时,必然需要一个操作方法来控制音乐播放暂停或者接听挂断电话等功能,随着耳机功能的增加,传统单一的操作键已经无法满足其多功能操作的需求,且在体积较小的耳机上设置按键来用于各种功能的控制,需要较高的实现工艺,并且按键小不便于用户操作。
发明内容
本申请的主要目的在于提供一种耳机控制方法、装置、耳机设备及存储介质,旨在提供一种不同于传统按键的耳机控制方法,提高用户进行耳机控制时的操作体验。
为实现上述目的,本申请提供一种耳机控制方法,方法应用于耳机设备,耳机设备中设置有可通过按压耳机设备而改变相隔距离的磁体和磁通量传感器,方法包括以下步骤:
通过磁通量传感器获取磁通量值;
根据磁通量值确定用户对耳机设备的操作类型,以根据操作类型对耳机设备进行控制。
可选地,根据磁通量值确定用户对耳机设备的操作类型的步骤包括:
获取当前设置的基准值;
统计按照预设频率连续获取到的各个磁通量值与基准值的差值均大于第一预设阈值的状态的第一持续时长;
若第一持续时长超过第一预设时长且小于第二预设时长,则确定用户对耳机设备的操作类型为点击类型;
若第一持续时长超过第二预设时长且小于第三预设时长,则确定用户对耳机设备的操作类型为长按类型。
可选地,方法还包括:
统计按照预设频率连续获取到的各个磁通量值的极差小于第二预设阈值的状态的第二持续时长;
若第二持续时长超过第三预设时长,则将极差小于第二预设阈值的状态持续第二持续时长的各个磁通量值的平均值设置为新的基准值。
可选地,根据磁通量值确定用户对耳机设备的操作类型的步骤包括:
获取预设的磁通量量程;
当磁通量值处于磁通量量程内时,确定磁通量值是有效数据;
根据属于有效数据的磁通量值确定用户对耳机设备的操作类型。
可选地,获取预设的磁通量量程的步骤之前,还包括:
当确定耳机设备处于无外磁场干扰和无外力按压的环境时,通过磁通量传感器获取初始磁通量值;
根据初始磁通量值计算得到磁体与磁通量传感器的初始距离;
在初始距离基础上加上预设的距离变化范围得到距离量程;
根据距离量程计算得到磁通量量程。
可选地,根据磁通量值确定用户对耳机设备的操作类型的步骤包括:
获取预设的磁通量量程;
统计按照预设频率连续获取到的各个磁通量值均处于磁通量量程的状态的第三持续时长;
若第三持续时长超过第四预设时长,则根据均处于磁通量量程的状态持续第三持续时长的各个磁通量值,确定用户对耳机设备的操作类型。
可选地,通过磁通量传感器获取磁通量值具体包括:
对磁通量传感器采集的原始数值采用增益值进行增益后作为获取到的磁通量值,其中,增益值通过将第三预设阈值与初始数值计算比值得到,初始数值为耳机设备处于无外磁场干扰和无外力按压的环境时,通过磁通量传感器采集的原始数值。
为实现上述目的,本申请还提供一种耳机控制装置,装置部署于耳机设备,耳机设备中设置有可通过按压耳机设备而改变相隔距离的磁体和磁通量传感器,装置包括:
获取模块,用于通过磁通量传感器获取磁通量值;
确定模块,用于根据磁通量值确定用户对耳机设备的操作类型,以根据操作类型对耳机设备进行控制。
为实现上述目的,本申请还提供一种耳机设备,耳机设备包括:存储器、处理器及存储在存储器上并可在处理器上运行的耳机控制程序,耳机控制程序被处理器执行时实现如上的耳机控制方法的步骤。
此外,为实现上述目的,本申请还提出一种计算机可读存储介质,计算机可读存储介质上存储有耳机控制程序,耳机控制程序被处理器执行时实现如上的耳机控制方法的步骤。
本申请中,通过在耳机设备中设置可以通过按压耳机设备而改变相隔距离的磁体和磁通量传感器,通过磁通量传感器获取磁通量值,根据磁通量值确定用户对耳机设备的操作类型,以根据操作类型对耳机设备进行控制,实现了一种新的耳机设备控制方法,相比于采用传统按键的控制方法,本申请中采用磁通量传感器和磁体的实现工艺较简单,用户按压耳机设备的操作更加方便。
附图说明
图1为本申请耳机控制方法第一实施例的流程示意图;
图2为本申请实施例涉及的一种耳机设备中磁体和磁通量传感器的设置位置示意图;
图3为本申请实施例涉及的一种耳机设备操作类型识别流程示意图;
图4为本申请耳机控制装置较佳实施例的功能模块示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
参照图1,图1为本申请耳机控制方法第一实施例的流程示意图。
本申请实施例提供了耳机控制方法的实施例,需要说明的是,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。本申请实施例耳机控制方法应用于耳机设备,耳机设备中设置有可通过按压耳机设备而改变相隔距离的磁体和磁通量传感器。本实施例中,耳机控制方法包括:
步骤S10,通过磁通量传感器获取磁通量值;
在本实施例中,提出一种感应磁通量的耳机控制方法,利用磁通量传感器可以感应周围环境磁通量的原理,在耳机设备中设置可通过按压耳机设备而改变相隔距离的磁体和磁通量传感器,用户按压耳机设备,使耳机设备上的磁通量传感器远离或者接近磁体,从而磁通量传感器感应的磁通量就会有变化,根据磁通量的变化,识别用户短按、长按、双击等不同的操作类型,进而基于识别的操作类型对耳机设备进行控制。
具体地,本实施例中并不限制磁体和磁通量传感器在耳机设备中的设置位置和设置方法,也即,只要设置位置和设置方法能够使得当按压耳机设备时磁体和磁通量传感器之间的距离为有变化即可。磁体可以是磁铁也可以是其他能够产生磁场的材料或装置,在本实施例中并不做限制。根据磁体和磁通量传感器的设置位置不同,按压耳机设备具体可以是指按压耳机设备的外壳或按压耳机设备外壳上粘贴或嵌入的磁体或磁通量传感器等,具体按压位置在本实施例中并不做限制。例如,在一实施方式中,如图2所示,磁通量传感器直接贴片在主板上,耳机设备的外壳上粘贴磁铁,当用户按压耳机设备的外壳时,耳机设备 的外壳会发生微小的形变,导致磁铁远离或接近传感器,从而出现磁通量的变化。又如,在另一实施方式中,磁通量传感器和磁铁之间可以通过弹簧连接后嵌入耳机设备壳体内,通过按压暴露在外壳上的磁通量传感器或磁铁,使得弹簧发生形变,从而导致磁铁远离或接近传感器。
耳机设备在处于使用状态时,例如处于开机状态或与用户终端通过有线或无线方式建立连接的状态时,可以通过磁通量传感器获取磁通量值。其中,在具体实施方式中,获取到的磁通量值可以是磁通量传感器采集的原始数值,也可以是对采集的原始数值进行处理后得到的数值。对原始数值进行处理可以是进行增益处理或去除噪声处理等,在此并不做限制。
在具体实施方式中,通过磁通量传感器获取磁通量值可以是按照一定的频率获取,例如每50ms获取一次。频率的大小可以根据需要预先设置,例如,对耳机设备的省电要求较高时,可以将频率设置得较慢,对耳机设备的操作灵敏度要求较高时,可以将频率设置得较快,具体设置的数值在本实施例中并不做限制。
进一步地,在一实施方式中,通过磁通量传感器获取磁通量值具体包括:
对磁通量传感器采集的原始数值采用增益值进行增益后作为获取到的磁通量值,其中,增益值通过将第三预设阈值与初始数值计算比值得到,初始数值为耳机设备处于无外磁场干扰和无外力按压的环境时,通过磁通量传感器采集的原始数值。
其中,对原始数值采用增益值进行增益具体可以是将原始数值乘以增益值,得到增益后的磁通量值。耳机设备在首次开机后,通过语音提醒用户将耳机设备放置于无外磁场干扰和无外力按压的环境中,当确定耳机设备处于无外磁场干扰和无外力按压的环境中时,通过磁通量传感器采集原始数值,将该原始数值作为初始数值,用于计算增益值。也即,将第三预设阈值除以初始数值得到增益值。第三预设阈值可以根据经验进行设置,例如设置为8000,初始数值采用Magnetic,那么计算得到的增益值为8000/Magnetic。
为避免磁通量传感器采集的原始数值过小而不便于参与计算,可通过计算增益值,采用增益值对磁通量传感器采集的原始数值进行增益后作为获取到的磁通量值,进行参与后续的处理和计算。
步骤S20,根据磁通量值确定用户对耳机设备的操作类型,以根据操作类型对耳机设备进行控制。
在获取到磁通量值后,耳机设备可以根据磁通量值确定用户对耳机设备的操作类型。 其中,操作类型可以包括点击类型、长按类型等,或者,可以进一步将点击类型分为单击类型和双击类型等。在具体实施方式中,根据磁通量值确定用户对耳机设备的操作类型的方式有很多种,在此并不做限制。例如,在一实施方式中,可以将获取到的磁通量值与预先设置的一个阈值进行比较,若连续一定时长内获取到的磁通量值都大于该阈值,则可认为操作类型是长按类型。
根据操作类型对耳机设备进行控制的具体控制内容与耳机设备当前所处的工作场景有关,例如,耳机设备当前处于通话场景,预先设置了当检测到长按类型的操作时耳机设备结束通话,那么当在通话场景下确定用户对耳机设备的操作类型是长按时,耳机设备结束当前通话。
在本实施例中,通过在耳机设备中设置可以通过按压耳机设备而改变相隔距离的磁体和磁通量传感器,通过磁通量传感器获取磁通量值,根据磁通量值确定用户对耳机设备的操作类型,以根据操作类型对耳机设备进行控制,实现了一种新的耳机设备控制方法,相比于采用传统按键的控制方法,本实施例中采用磁通量传感器和磁体的实现工艺较简单,用户按压耳机设备的操作更加方便。
进一步地,基于上述第一实施例,提出本申请耳机控制方法的第二实施例,在本实施例中,步骤S20包括:
步骤S201,获取当前设置的基准值;
在本实施例中,可以将耳机设备中的操作类型划分为点击类型和长按类型。在获取到一个磁通量值后,可以获取耳机设备中当前设置的基准值,以将该磁通量值与该当前设置的基准值进行比较。其中,基准值可以是预先根据经验在耳机设备中设置的一个值,以表示耳机设备在无外力按压情况下采用磁通量传感器所能获取到的磁通量值。
步骤S202,统计按照预设频率连续获取到的各个磁通量值与基准值的差值均大于第一预设阈值的状态的第一持续时长;
将获取到的磁通量值与当前设置的基准值计算差值,也即,采用磁通量值减去基准值得到差值,若得到的结果为负数,则也可以取绝对值。耳机设备按照预设频率获取磁通量值,每获取一个磁通量值即计算得到一个差值,将计算得到的差值与第一预设阈值进行比较,确定差值是否大于第一预设阈值,并对连续获取到的各个磁通量值与基准值的差值均大于该第一预设阈值的状态持续的时长进行统计,将统计的时长记为第一持续时长。例如, 当预设频率是每隔50ms一次时,连续的1秒内获取的20个磁通量值与基准值的差值都大于该第一预设阈值,那么统计得到的第一持续时长为1秒。
其中,第一预设阈值可以根据需要进行设置,当差值大于第一预设阈值时,表示耳机设备被按压。当第一预设阈值设置得越小时,耳机设备检测到被按压的灵敏度很高,为防止用户对耳机设备的触摸操作误触发对耳机设备的控制操作,可以将第一预设阈值设置得稍大。
步骤S203,若第一持续时长超过第一预设时长且小于第二预设时长,则确定用户对耳机设备的操作类型为点击类型;
若第一持续时长超过第一预设时长且小于第二预设时长,则耳机设备可以确定用户对耳机设备的操作类型为点击操作。其中,第一预设时长和第二预设时长可以根据需要进行设置,且第一预设时长设置得小于第二预设时长,例如,如图3所示,第一预设时长设置为0.5秒,第二预设时长设置为1.5秒,也即,磁通量值与基准值的差值大于第一预设阈值时表明耳机设备被按压,而当这种状态持续0.5秒且小于1.5秒时,说明用户对耳机设备进行了短时间的按压,该按压操作可以被确定为点击类型的操作。
进一步地,在一实施方式中,可以对识别到的点击类型的操作记录时间戳,例如将最后一个与基准值的差值大于阈值的磁通量值的获取时间作为该点击类型的操作的发生时间,当检测到两个发生时间间隔小于一定时长的点击类型的操作时,可以确定该两个点击类型的操作构成双击操作;当对于一个点击类型的操作,在其发生时间之后超过一定时长未识别到下一个点击类型的操作时,可以确定该点击类型的操作为单击操作。
步骤S204,若第一持续时长超过第二预设时长且小于第三预设时长,则确定用户对耳机设备的操作类型为长按类型。
若第一持续时长超过第二预设时长且小于第三预设时长,则耳机设备可以确定用户对耳机设备的操作类型为点击操作。其中,第三预设时长可以根据需要进行设置,且第三预设时长设置得大于第二预设时长,例如,如图3所示,第二预设时长设置为1.5秒,第三预设时长设置为3秒,也即,磁通量值与基准值的差值大于第一预设阈值时,表明耳机设备被按压,而当这种状态持续1.5秒且小于3秒时,说明用户对耳机设备进行了长时间的按压,该按压操作可以被确定为长按类型的操作。
进一步地,若第一持续时长超过第三预设时长,则可能是耳机设备处于异常状态,例如,被其他物体长时间按压,或者耳机设备壳体损伤等,在这种情况下,耳机设备可以确 定用户未对耳机设备进行操作或者说操作类型为空,进而不做处理,或者,耳机设备也可以进行报错提示。
进一步地,在一实施方式中,方法还包括:
步骤S30,统计按照预设频率连续获取到的各个磁通量值的极差小于第二预设阈值的状态的第二持续时长;
由于耳机设备在生产过程和使用过程中存在个体差异,例如,由于耳机设备长时间使用,外壳的不可恢复的形变可能使得磁体与磁通量传感器之间的距离要小于出厂时的距离,所以在具体实施方式中,耳机设备中设置的基准值也可以根据耳机设备实际获取的磁通量值进行实时设置。
具体地,耳机设备可以对按照预设频率连续获取的各个磁通量值的极差小于第二预设阈值的状态持续的时长进行统计,得到第二持续时长。也即,计算按照预设频率连续获取的各个磁通量值之间的极差,当计算得到一个极差小于第二预设阈值时进行计时,每新获取一个磁通量值后都与极差小于第二预设阈值的各个旧的磁通量值再重新计算极差,重新计算的极差仍然小于第二预设阈值时,持续计时,重新计算的极差不小于第二预设阈值时,停止计时,得到第二持续时长。
步骤S40,若第二持续时长超过第三预设时长,则将极差小于第二预设阈值的状态持续第二持续时长的各个磁通量值的平均值设置为新的基准值。
若第二持续时长超过第三预设时长,则耳机设备可以将极差小于第二预设阈值的状态持续了第二持续时长的各个磁通量值的平均值设置为新的基准值。其中,第三预设时长可以根据需要进行设置,当按照预设频率连续获取的各个磁通量值的极差小于第二预设阈值的状态的第二持续时长超过该第三预设时长时,说明磁通量传感器获取的磁通量值长时间趋于稳定,变化不大,可认为是耳机设备处于无按压情况下能够获取到的磁通量值,此时,将趋于稳定的各个磁通量值的平均值设置为新的基准值,能够提高耳机设备对用户按压操作的检测精准度。
进一步地,基于上述第一和/或第二实施例,提出本申请耳机控制方法的第三实施例,在本实施例中,步骤S20包括:
步骤S205,获取预设的磁通量量程;
在本实施例中,为避免耳机设备在有外磁场(除耳机设备中磁体外的磁体所产生的磁 场)干扰的情况下,磁通量传感器获取的磁通量不准(叠加有外磁场的磁通量),而导致用户操作检测不准确,在本实施例中,可以设置一个磁通量量程,通过对不处于磁通量量程内的磁通量值进行排除,以避免磁通量检测不准而导致用户操作检测不准确。
磁通量量程可以在耳机设备中进行预先设置。磁通量量程的最大值可以表示耳机设备在无外磁场干扰和无外力按压的环境下,用户对耳机设备以最大力度进行按压时磁通量传感器所获取的磁通量值,当超过该最大值时,表示有外磁场干扰。磁通量量程的最小值可以是0,也可以大于0,当设置得较大时,可以用于避免用户的触摸动作误触发对耳机设备的控制操作。
步骤S206,当磁通量值处于磁通量量程内时,确定磁通量值是有效数据;
步骤S207,根据属于有效数据的磁通量值确定用户对耳机设备的操作类型。
当获取到磁通量值后,耳机设备可以将磁通量值与磁通量量程进行比较,确定磁通量值是否处于磁通量量程内。若磁通量值处于磁通量量程内,则可以确定该磁通量值是有效数据,可以采用该磁通量值来进行用户操作类型的确定。
进一步地,在一实施方式中,方法还包括:
步骤S50,当确定耳机设备处于无外磁场干扰和无外力按压的环境时,通过磁通量传感器获取初始磁通量值;
在具体实施方式中,由于耳机设备在生产过程和使用过程中存在个体差异,所以磁通量量程也可以根据耳机设备实际获取的磁通量值进行设置。
具体地,耳机设备在确定耳机设备处于无外磁场干扰和无外力按压的环境时,通过磁通量传感器获取磁通量值(为示区分以下称为初始磁通量值)。其中,耳机设备可以输出提示信息提示用户将耳机设备放置于无外磁场干扰和无外力按压的环境,当输出提示信息后通过磁通量传感器获取的磁通量值趋于稳定时,即可确定耳机设备处于无外磁场干扰和无外力按压的环境。
步骤S60,根据初始磁通量值计算得到磁体与磁通量传感器的初始距离;
耳机设备可根据初始磁通量计算得到磁体与磁通量传感器的初始距离。其中,根据磁通量值计算距离可以按照预先设置的磁通量值与距离之间的转换公式计算,在此不做限制。
步骤S70,在初始距离基础上加上预设的距离变化范围得到距离量程;
在计算得到初始距离后,可以在初始距离的基础上加上预设的距离变化范围,得到一个距离量程。例如,初始距离为0.5cm,距离变化范围为10μm~20μm,那么距离量程为 0.5cm+10μm~0.5cm+20μm,其中,设置10μm是为了避免的最小变化限制是为了避免用户误触发,也即,当距离变化大于10μm时才认为用户对耳机设备在进行按压。
步骤S80,根据距离量程计算得到磁通量量程。
在计算得到距离量程后,可根据距离量程计算得到磁通量量程。具体地,可以根据距离量程的最小值按照磁通量值与距离之间的转换公式计算得到磁通量量程中的最小值,根据距离量程的最大值按照磁通量值与距离之间的转换公式计算得到磁通量量程中的最大值。
进一步地,在一实施方式中,步骤S20包括:
步骤S208,获取预设的磁通量量程;
为避免耳机设备在有外磁场(除耳机设备中磁体外的磁体所产生的磁场)干扰的情况下,磁通量传感器获取的磁通量不准(叠加有外磁场的磁通量),而导致用户操作检测不准确,在一实施方式中,耳机设备也可以在获取到一段时间的磁通量值都处于磁通量量程时,才采用获取到的磁通量值确定用户对耳机设备的操作类型。
具体地,耳机设备可以获取磁通量量程,该磁通量量程可以在耳机设备中进行预先设置,也可以根据耳机设备实际获取的磁通量值进行设置。
步骤S209,统计按照预设频率连续获取到的各个磁通量值均处于磁通量量程的状态的第三持续时长;
耳机设备可以统计按照预设频率连续获取到的各个磁通量值均处于该磁通量量程的状态的持续时长,记为第三持续时长。也即,耳机设备在检测到一个磁通量值处于该磁通量量程时开始计时,在每次新获取到一个磁通量值时,判断该磁通量值是否处于磁通量量程,若处于磁通量量程,则持续计时,若不处于磁通量量程,则停止计时。
步骤S2010,若第三持续时长超过第四预设时长,则根据均处于磁通量量程的状态持续第三持续时长的各个磁通量值,确定用户对耳机设备的操作类型。
若第三持续时长超过第四预设时长,则耳机设备可以根据均处于磁通量量程的状态持续第三持续时长的各个磁通量值来确定用户对耳机设备的操作类型。其中,第四预设时长可以根据需要进行设置,例如设置为1秒。
若第三持续时长不超过第四预设时长,则耳机设备可以将各个磁通量值判定为无效数据,不做处理。
进一步地,在一实施方式中,当耳机设备获取到的磁通量值大于磁通量量程的最大值 时,耳机设备也可以通过算法过滤掉磁通量值中外磁场所产生的部分磁通量。具体地,可以在用户终端例如智能手机中安装磁通量传感器,当耳机设备获取到的磁通量值大于磁通量量程的最大值时,耳机设备可以获取与耳机设备连接的用户终端中磁通量传感器获取的磁通量值,采用耳机设备中磁通量传感器获取的磁通量值减去用户终端中磁通量传感器获取的磁通量值,根据计算结果来确定用户对耳机设备的操作类型。
此外,本申请实施例还提出一种耳机控制装置,装置部署于耳机设备,耳机设备中设置有可通过按压耳机设备而改变相隔距离的磁体和磁通量传感器,参照图4,装置包括:
获取模块10,用于通过磁通量传感器获取磁通量值;
确定模块20,用于根据磁通量值确定用户对耳机设备的操作类型,以根据操作类型对耳机设备进行控制。
进一步地,确定模块20还用于:
获取当前设置的基准值;
统计按照预设频率连续获取到的各个磁通量值与基准值的差值均大于第一预设阈值的状态的第一持续时长;
若第一持续时长超过第一预设时长且小于第二预设时长,则确定用户对耳机设备的操作类型为点击类型;
若第一持续时长超过第二预设时长且小于第三预设时长,则确定用户对耳机设备的操作类型为长按类型。
进一步地,装置还包括:
统计模块,用于统计按照预设频率连续获取到的各个磁通量值的极差小于第二预设阈值的状态的第二持续时长;
设置模块,用于若第二持续时长超过第三预设时长,则将极差小于第二预设阈值的状态持续第二持续时长的各个磁通量值的平均值设置为新的基准值。
进一步地,确定模块20还用于:
获取预设的磁通量量程;
当磁通量值处于磁通量量程内时,确定磁通量值是有效数据;
根据属于有效数据的磁通量值确定用户对耳机设备的操作类型。
进一步地,获取模块10还用于:
当确定耳机设备处于无外磁场干扰和无外力按压的环境时,通过磁通量传感器获取初始磁通量值;
装置还包括:
计算模块,用于根据初始磁通量值计算得到磁体与磁通量传感器的初始距离;在初始距离基础上加上预设的距离变化范围得到距离量程;根据距离量程计算得到磁通量量程。
进一步地,确定模块20还用于:
获取预设的磁通量量程;
统计按照预设频率连续获取到的各个磁通量值均处于磁通量量程的状态的第三持续时长;
若第三持续时长超过第四预设时长,则根据均处于磁通量量程的状态持续第三持续时长的各个磁通量值,确定用户对耳机设备的操作类型。
进一步地,获取模块10还用于:
对磁通量传感器采集的原始数值采用增益值进行增益后作为获取到的磁通量值,其中,增益值通过将第三预设阈值与初始数值计算比值得到,初始数值为耳机设备处于无外磁场干扰和无外力按压的环境时,通过磁通量传感器采集的原始数值。
本申请耳机控制装置的具体实施方式的拓展内容与上述耳机控制方法各实施例基本相同,在此不做赘述。
本申请耳机设备包括结构壳体、通信模块、主控模块(例如微控制单元MCU)、扬声器、麦克风、存储器等组成。耳机设备中设置有可通过按压耳机设备而改变相隔距离的磁体和磁通量传感器。主控模块可包含微处理器、音频解码单元、电源及电源管理单元、系统所需的传感器和其他有源或无源器件等(可以根据实际功能进行更换、删减或增加),实现无线音频的接收与播放功能。耳机设备可以通过通信模块与用户终端建立通信连接。耳机的存储器中可以存储有耳机控制程序,微处理器可以用于调用存储器中存储的耳机控制程序,并执行以下操作:
通过磁通量传感器获取磁通量值;
根据磁通量值确定用户对耳机设备的操作类型,以根据操作类型对耳机设备进行控制。
进一步地,根据磁通量值确定用户对耳机设备的操作类型的操作包括:
获取当前设置的基准值;
统计按照预设频率连续获取到的各个磁通量值与基准值的差值均大于第一预设阈值的状态的第一持续时长;
若第一持续时长超过第一预设时长且小于第二预设时长,则确定用户对耳机设备的操作类型为点击类型;
若第一持续时长超过第二预设时长且小于第三预设时长,则确定用户对耳机设备的操作类型为长按类型。
进一步地,微处理器还可以用于调用存储器中存储的耳机控制程序,并执行以下操作:
统计按照预设频率连续获取到的各个磁通量值的极差小于第二预设阈值的状态的第二持续时长;
若第二持续时长超过第三预设时长,则将极差小于第二预设阈值的状态持续第二持续时长的各个磁通量值的平均值设置为新的基准值。
进一步地,根据磁通量值确定用户对耳机设备的操作类型的操作包括:
获取预设的磁通量量程;
当磁通量值处于磁通量量程内时,确定磁通量值是有效数据;
根据属于有效数据的磁通量值确定用户对耳机设备的操作类型。
进一步地,获取预设的磁通量量程的操作之前,微处理器还可以用于调用存储器中存储的耳机控制程序,并执行以下操作:
当确定耳机设备处于无外磁场干扰和无外力按压的环境时,通过磁通量传感器获取初始磁通量值;
根据初始磁通量值计算得到磁体与磁通量传感器的初始距离;
在初始距离基础上加上预设的距离变化范围得到距离量程;
根据距离量程计算得到磁通量量程。
进一步地,根据磁通量值确定用户对耳机设备的操作类型的操作包括:
获取预设的磁通量量程;
统计按照预设频率连续获取到的各个磁通量值均处于磁通量量程的状态的第三持续时长;
若第三持续时长超过第四预设时长,则根据均处于磁通量量程的状态持续第三持续时长的各个磁通量值,确定用户对耳机设备的操作类型。
进一步地,通过磁通量传感器获取磁通量值具体包括:
对磁通量传感器采集的原始数值采用增益值进行增益后作为获取到的磁通量值,其中,增益值通过将第三预设阈值与初始数值计算比值得到,初始数值为耳机设备处于无外磁场干扰和无外力按压的环境时,通过磁通量传感器采集的原始数值。
本申请耳机设备和计算机可读存储介质的各实施例,均可参照本申请耳机控制方法各个实施例,此处不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (10)

  1. 一种耳机控制方法,其特征在于,所述方法应用于耳机设备,所述耳机设备中设置有可通过按压耳机设备而改变相隔距离的磁体和磁通量传感器,所述方法包括以下步骤:
    通过所述磁通量传感器获取磁通量值;
    根据所述磁通量值确定用户对所述耳机设备的操作类型,以根据所述操作类型对所述耳机设备进行控制。
  2. 如权利要求1所述的耳机控制方法,其特征在于,所述根据所述磁通量值确定用户对所述耳机设备的操作类型的步骤包括:
    获取当前设置的基准值;
    统计按照预设频率连续获取到的各个所述磁通量值与所述基准值的差值均大于第一预设阈值的状态的第一持续时长;
    若所述第一持续时长超过第一预设时长且小于第二预设时长,则确定用户对所述耳机设备的操作类型为点击类型;
    若所述第一持续时长超过所述第二预设时长且小于第三预设时长,则确定用户对所述耳机设备的操作类型为长按类型。
  3. 如权利要求2所述的耳机控制方法,其特征在于,所述方法还包括:
    统计按照所述预设频率连续获取到的各个所述磁通量值的极差小于第二预设阈值的状态的第二持续时长;
    若所述第二持续时长超过所述第三预设时长,则将极差小于所述第二预设阈值的状态持续所述第二持续时长的各个所述磁通量值的平均值设置为新的基准值。
  4. 如权利要求1所述的耳机控制方法,其特征在于,所述根据所述磁通量值确定用户对所述耳机设备的操作类型的步骤包括:
    获取预设的磁通量量程;
    当所述磁通量值处于所述磁通量量程内时,确定所述磁通量值是有效数据;
    根据属于有效数据的磁通量值确定用户对所述耳机设备的操作类型。
  5. 如权利要求4所述的耳机控制方法,其特征在于,所述获取预设的磁通量量程的步骤之前,还包括:
    当确定所述耳机设备处于无外磁场干扰和无外力按压的环境时,通过所述磁通量传感器获取初始磁通量值;
    根据所述初始磁通量值计算得到所述磁体与所述磁通量传感器的初始距离;
    在所述初始距离基础上加上预设的距离变化范围得到距离量程;
    根据所述距离量程计算得到磁通量量程。
  6. 如权利要求1所述的耳机控制方法,其特征在于,所述根据所述磁通量值确定用户对所述耳机设备的操作类型的步骤包括:
    获取预设的磁通量量程;
    统计按照预设频率连续获取到的各个所述磁通量值均处于所述磁通量量程的状态的第三持续时长;
    若所述第三持续时长超过第四预设时长,则根据均处于所述磁通量量程的状态持续所述第三持续时长的各个所述磁通量值,确定用户对所述耳机设备的操作类型。
  7. 如权利要求1至6任一项所述的耳机控制方法,其特征在于,通过所述磁通量传感器获取磁通量值具体包括:
    对所述磁通量传感器采集的原始数值采用增益值进行增益后作为获取到的磁通量值,其中,所述增益值通过将第三预设阈值与初始数值计算比值得到,所述初始数值为所述耳机设备处于无外磁场干扰和无外力按压的环境时,通过所述磁通量传感器采集的原始数值。
  8. 一种耳机控制装置,其特征在于,所述装置部署于耳机设备,所述耳机设备中设置有可通过按压耳机设备而改变相隔距离的磁体和磁通量传感器,所述装置包括:
    获取模块,用于通过所述磁通量传感器获取磁通量值;
    确定模块,用于根据所述磁通量值确定用户对所述耳机设备的操作类型,以根据所述操作类型对所述耳机设备进行控制。
  9. 一种耳机设备,其特征在于,所述耳机设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的耳机控制程序,所述耳机控制程序被所述处理器执行时实现如权利要求1至7中任一项所述的耳机控制方法的步骤。
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有耳机控制程序,所述耳机控制程序被处理器执行时实现如权利要求1至7中任一项所述的耳机控制方法的步骤。
PCT/CN2022/084588 2022-02-28 2022-03-31 耳机控制方法、装置、耳机设备及存储介质 WO2023159715A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210192999.9A CN114501220B (zh) 2022-02-28 2022-02-28 耳机控制方法、装置、耳机设备及存储介质
CN202210192999.9 2022-02-28

Publications (1)

Publication Number Publication Date
WO2023159715A1 true WO2023159715A1 (zh) 2023-08-31

Family

ID=81484987

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/084588 WO2023159715A1 (zh) 2022-02-28 2022-03-31 耳机控制方法、装置、耳机设备及存储介质

Country Status (2)

Country Link
CN (1) CN114501220B (zh)
WO (1) WO2023159715A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003116196A (ja) * 2001-10-09 2003-04-18 Sharp Corp スピーカ
CN203102172U (zh) * 2013-02-22 2013-07-31 昆盈企业股份有限公司 指标输入装置
CN105212516A (zh) * 2015-09-30 2016-01-06 广州无象数码科技有限公司 一种基于压力检测的健康牙刷及其检测方法
CN105872874A (zh) * 2016-04-20 2016-08-17 广东欧珀移动通信有限公司 应用于蓝牙耳机的终端程序控制方法和装置
CN106792307A (zh) * 2016-11-29 2017-05-31 北京小米移动软件有限公司 无线耳机及耳机调节方法
KR20170119922A (ko) * 2016-04-20 2017-10-30 엘지전자 주식회사 휴대용 음향기기

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9294739B1 (en) * 2014-06-06 2016-03-22 Google Inc. Magnetically coupled waterproof hinge with integrated multi-stage button and state detection
CN106648245B (zh) * 2016-12-27 2020-04-24 珠海市魅族科技有限公司 一种控制命令生成方法及信息输入装置
CN111246085B (zh) * 2020-01-10 2022-01-07 维沃移动通信(杭州)有限公司 一种控制方法、装置及电子设备
CN111371446A (zh) * 2020-04-30 2020-07-03 歌尔科技有限公司 一种电子设备
CN111770407A (zh) * 2020-06-30 2020-10-13 歌尔科技有限公司 耳机状态检测方法、装置、耳机及可读存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003116196A (ja) * 2001-10-09 2003-04-18 Sharp Corp スピーカ
CN203102172U (zh) * 2013-02-22 2013-07-31 昆盈企业股份有限公司 指标输入装置
CN105212516A (zh) * 2015-09-30 2016-01-06 广州无象数码科技有限公司 一种基于压力检测的健康牙刷及其检测方法
CN105872874A (zh) * 2016-04-20 2016-08-17 广东欧珀移动通信有限公司 应用于蓝牙耳机的终端程序控制方法和装置
KR20170119922A (ko) * 2016-04-20 2017-10-30 엘지전자 주식회사 휴대용 음향기기
CN106792307A (zh) * 2016-11-29 2017-05-31 北京小米移动软件有限公司 无线耳机及耳机调节方法

Also Published As

Publication number Publication date
CN114501220B (zh) 2023-02-28
CN114501220A (zh) 2022-05-13

Similar Documents

Publication Publication Date Title
US10600415B2 (en) Method, apparatus, device, and storage medium for voice interaction
JP6489563B2 (ja) 音量調節方法、システム、デバイス及びプログラム
WO2021016899A1 (zh) 一种无线耳机控制方法、装置及无线耳机和存储介质
EP3575924A1 (en) Vad detection microphone and method of operating the same
WO2017032030A1 (zh) 一种音量调节方法及用户终端
CN110677776B (zh) 一种音量调节方法、装置、智能音箱及存储介质
TWI633425B (zh) 麥克風裝置
WO2014183529A1 (zh) 切换移动终端通话模式的方法、装置及存储介质
CN109994111B (zh) 一种交互方法、装置及移动终端
CN105120063A (zh) 一种输入语音的音量提示方法及电子设备
CN106888327B (zh) 语音播放方法及装置
CN103248751A (zh) 一种实现电子设备功能控制的方法及电子设备
US20230037824A1 (en) Methods for reducing error in environmental noise compensation systems
CN105677192A (zh) 移动终端的控制方法及控制装置
WO2019137220A1 (zh) 锁屏状态下的音量调节方法、移动终端及存储介质
WO2017032031A1 (zh) 一种音量调节方法及用户终端
CN106603801B (zh) 一种通话录音方法及装置
WO2022233308A1 (zh) 佩戴检测方法、可穿戴设备及存储介质
CN113920975B (zh) 降噪参数设置方法、装置、耳机设备及存储介质
WO2023159715A1 (zh) 耳机控制方法、装置、耳机设备及存储介质
TW201423587A (zh) 被叫提示系統及方法
CN106791226B (zh) 通话故障检测方法及系统
CN104598032A (zh) 一种屏幕控制方法和装置
CN112804612A (zh) 耳机控制方法、装置、耳机以及计算机可读存储介质
TW200428861A (en) Method for managing a calling in on a cellular phone

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22927994

Country of ref document: EP

Kind code of ref document: A1